• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Spamassassin: Increase max message size

D__Soz

New Pleskian
How do I increase the maximum message size that Spamassassin will scan?

Spammers seem are aware of the default size, and simply attach images with their message to go over that.
 
I haven't really put this through rigorous testing yet, but here is my very hacky attempt at modifying the max message size.

Code:
mv /usr/bin/spamc /usr/bin/spamc-orig

Create /usr/bin/spamc with this as the contents:

Code:
#!/bin/sh
ARGS=`echo $@ | sed "s/\-s\ 256000/\-s\ 1024000/g"`
/usr/bin/spamc-orig $ARGS

Change 1024000 to whatever you want your max message size to be.

Finally, make sure you change the permissions on the newly created file, e.g.: chmod +x /usr/bin/spamc
 
Evan F,

Very nice work around!

Every day I have been getting about 6 spam emails close to 750K in size. I've written rules to catch them, but there they were.

And this morning I was very happy to see them filtered into my trash.

Thank you!
 
Also worked for me, thanks!

If the MTA's call to spamc didn't already have the size argument "-s" then the spamc config file would work – /etc/mail/spamassassin/spamc.conf.

I couldn't find qmail's call to spamc (Plesk/CentOS).

JC
 
Hello!
In plesk 11.5.30 there is an option to configure max mail size for spamassassin.
You should modify parameter SA_MAX_MAIL_SIZE in /etc/psa/psa.conf :
Code:
# SpamAssassin max mail size (in bytes)
SA_MAX_MAIL_SIZE 256000
 
Hello!
In plesk 11.5.30 there is an option to configure max mail size for spamassassin.
You should modify parameter SA_MAX_MAIL_SIZE in /etc/psa/psa.conf :
Code:
# SpamAssassin max mail size (in bytes)
SA_MAX_MAIL_SIZE 256000

Do I need to restart service(s) after that mod? What's the shell command?

thanks,
JC
 
Back
Top