Allow spamassassin to scan emails larger than 250KB

Hi Josh et al,

I’ve recently had so very spam-y emails delivered to my inbox, and they didn’t have any of the X-Spam-* headers.

I tested the sa-learn command manually to see what it made of those emails.

$ sudo sa-learn --dbpath /home/user-data/mail/spamassassin/ --spam /home/user-data/mail/mailboxes/mydomain.com/my.name/.Spam/cur/* --debug 2>&1 | less

The (very verbose) output included:

Mar 27 01:58:07.923 [22282] info: archive-iterator: skipping large message: file size 990944, limit 262144 bytes

A bit of googling of that error message either pointed to spampd which passes the messages to spamassassin, or to the perl module Mail::SpamAssassin::ArchiveIterator.

$ perldoc Mail::SpamAssassin::ArchiveIterator

The perl module has a default “max file size” of 256 KiB which matches the error message from sa-learn. It looked like the spampd would just not pass larger messages to spamassasin at all, though I couldn’t find anywhere that was being logged.

I saw some mention of setting the max message file size in config files, and tried editing /etc/defaults/spampd and /etc/spamassassin/local.cf without success.

Would it be possible to raise the limits used by spampd or Mail::SpamAssassin::ArchiveIterator? I did see a suggestion of having spampd truncate larger messages down to a reasonable size before passing to spamassassin for testing. http://www.gossamer-threads.com/lists/spamassassin/users/184551

Cheers,

Dave

Currently I’m getting one or two spam emails per day which are larger than 250KB. It’s frustrating that there is no way for me to mark these as spam, as neither the learning process, or the filtering process will even consider these emails due to their size. The size of these messages is generally due to them having attached zipfiles etc.

Should be fixed in the next update:

Thanks.

Wonderful. Many thanks, Josh!