You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Kent Oyer <ke...@mxguardian.net> on 2024/12/17 19:57:44 UTC

Adding dependencies

What are your thoughts about adding dependencies to SpamAssassin? Currently SA doesn't support RFC 2231 (Character Set and Parameter Continuations) in the Content-Disposition header and only partial support in the Content-Type header. So it's possible to obfuscate a file name using this syntax:
Content-Disposition: attachment; filename*0=invoice.h;
   filename*1=tml
In order to not reinvent the wheel, I'd like to use `parse_content_type` and `parse_content_disposition` from Email::MIME::ContentType but that adds another dependency. Is this ok or should it be avoided? Do I just add the dependency to Makefile.PL and Mail/SpamAssassin/Util/DependencyInfo.pm? Are there any other considerations?
Thanks
Kent

Re: Adding dependencies

Posted by John Hardin <jh...@impsec.org>.
On Tue, 17 Dec 2024, Kent Oyer wrote:

> What are your thoughts about adding dependencies to SpamAssassin?

Please fix your broken rule commit before making other changes. Rules lint 
is failing and that may be blocking rule updates.

See Henrik's post regarding running tests before committing rule changes.


-- 
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
  jhardin@impsec.org                         pgpk -a jhardin@impsec.org
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
   "Bother," said Pooh as he struggled with /etc/sendmail.cf, "it never
   does quite what I want. I wish Christopher Robin was here."
                                            -- Peter da Silva in a.s.r
-----------------------------------------------------------------------
  7 days until Christmas

Re: Adding dependencies

Posted by Henrik Krohns <he...@hege.li>.
On 12/17/2024 9:57 PM, Kent Oyer wrote:
> What are your thoughts about adding dependencies to SpamAssassin? 
> Currently SA doesn't support RFC 2231 (Character Set and Parameter 
> Continuations) in the Content-Disposition header and only partial 
> support in the Content-Type header. So it's possible to obfuscate a 
> file name using this syntax:
>
> Content-Disposition: attachment; filename*0=invoice.h;
>    filename*1=tml
>
> In order to not reinvent the wheel, I'd like to use 
> `parse_content_type` and `parse_content_disposition` 
> from Email::MIME::ContentType but that adds another dependency. Is 
> this ok or should it be avoided? Do I just add the dependency to 
> Makefile.PL and Mail/SpamAssassin/Util/DependencyInfo.pm? Are there 
> any other considerations?
>
> Thanks
> Kent

Generally I think external dependencies have been frowned upon. It's 
usually easier to fix internal than external code. :-)

Email::MIME::ContentType seems to require Text::Unicode which also has 
to be considered.

Both modules would need to be available on few previous versions of all 
major distributions to be considered a hard requirement. They could be 
made optional, so only used if installed, otherwise revert to old SA code.

Just my few unofficial cents, don't remember if there is mandate written 
somewhere.

Cheers,
Henrik