SA Bugzilla – Bug 6044
filesize filter
Last modified: 2009-01-15 05:23:54 UTC
Hello , using Spamassassin with OTRS Ticketing System are sometimes in trouble. Big Emails with 1 mb and greater does spamassassin let loop endless. OTRS just use '/usr/bin/spamassassin | grep -i "X-Spam-Status: yes" ' to check mails. To solve this it will be great to add a directive "max_filesize 1024k" to local.cf The default value can be max_filesize 0 to check every mail. Also Spam is always often under 1 mb. So it also can speed up the transfere of mails. best regards Kiman
If you're interested in performance, you should be using the spamc/spamd combination to scan mail, not the spamassassin script. Spamc automatically will skip passing emails over 250k to spamd for scanning, unless you tell it otherwise on the command line. The spamassassin script is only intended for very low-volume mail and/or manual testing, because it creates a new perl instance every time it's called. It is ungodly slow because of this, and should not be used for scanning mail streams with any decent volume of mail. That's not to say such a plugin can't be made, but it seems pointless. Using spamc causes this benefit automatically, and aborts substantially faster than any plugin ever could cause the spamassassin script to abort.
Of course, there isn't much to add. :) When using the plain 'spamassassin' script, it's the duty of the calling app in your mail processing chain to not pass large mails to SA in the first place. The startup penalty for plain 'spamassassin' is just too much for simply bailing out after a size check. I recommend using the lightweight spamc with the daemonized spamd (no startup penalty) for anyone who feels the need to run SA. > Spamc automatically will skip passing emails over 250k to spamd for scanning, > unless you tell it otherwise on the command line. The default is 500 kB. Kiman, assuming the command you mentioned is used in a pipe, you can simply substitute spamassassin by spamc if you are running spamd on your system. IMHO this is WONTFIX or WORKSFORME (with spamc/spamd).
> IMHO this is WONTFIX or WORKSFORME (with spamc/spamd) You shouldn't be ashamed to act on your opinion :-) I'll go ahead and close it as WONTFIX. Kiman, don't be insulted, you are correct that big files shouldn't be scanned, but using spamc/spamd instead of he spamassassin script is the better solution that is already implemented.