• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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