SpamAssassin scans mail < 500kB. I would like to raise that threshold value.

Christophe1

Verified User
Joined
Aug 24, 2008
Messages
49
Location
Belgium
Unless, of course, that's really not a good idea because of the extra server load?

I found a threshold value of '500K' in /etc/exim.spamassassin.conf. If I change that value to for example 100K or 200K, then that changed value is used. But if I increase that value, the new value doesn't seem to be respected and the limit remains 500K.

I use exim with eximconf release 4.5, spamassassin and blockcracking. I don't use easy spam fighter at this moment.

Due to the huge increase in scams and phishing, I have started adding my own spamassassin rules. This works great and most spam is blocked. However, sometimes I see the same spam slipping through the filter because the spammers increased the email size to sometimes 3 to 4MB by integrating images... So I thought of raising the spamassassin email size threshold to about 5000K.

Any suggestions?

Best regards
Christophe
 
Hi zEitEr

Unfortunately no solution there, but in meantime I found it.
If you want to raise the default message size limit of 500kB to for example 5MB, then:
  1. In /etc/exim.conf under line "#COMMENT#54: spamcheck:" change: "transport_filter = /usr/bin/spamc -u ${lookup{$domain}lsearch*{/etc/virtual/domainowners}{$value}}" to "transport_filter = /usr/bin/spamc -s 5000000 -u ${lookup{$domain}lsearch*{/etc/virtual/domainowners}{$value}}"
  2. In /etc/exim.spamassassin.conf: change "<{$message_size}{500k}} \" to "<{$message_size}{5000k}} \"
I'm curious about the consequences in terms of server load.
Does anyone know if there is an optimization possible where spamassassin only looks at the text in the body and not at integrated images or attachments?

Update after one week: So far I don't experience any problem in terms of server load. Sometimes spamd now uses up to about 125MB of memory, while I never saw spamd using more than 100MB before, but of course that's no problem at all.

Best regards
Christophe
 
Last edited:
Good to know you've managed to find a solution for changing a message size limit.

I don't have a solution for the second issue.
 
Back
Top