Symptoms
- Plesk Obsidian running on a Linux-based operating system
-
Emails with a large file in attachments (above 256 KB) are delivered to mailboxes without being checked by SpamAssassin
-
When such an email is received, the following message appears in
/var/log/maillog
:plesk spamc[28423]: skipped message, greater than max message size (256000 bytes)
-
These emails are also ignored by the mailbox-level blacklist
Cause
By default, SpamAssassin does not check messages with attachments larger than 256KB. That is so, because messages that contain attachments up to 256KB do not require a great amount of resources and time to be processed and therefore do not cause extra load on the server resources.
If checks are made on larger attachments, this may cause heavy load on a server, due to which the default settings scan only relatively small attachments.
The mailbox-level blacklist is a SpamAssassin blacklist. When SpamAssassin ignores emails with large files and does not scan them, it does not check the domain name against its own blacklist. Due to this, such messages are delivered.
Resolution
-
Connect to the Plesk server via SSH
-
Open the file
/etc/psa/psa.conf
with your favorite command-line text editor -
Find the line
SpamAssassin max mail size (in bytes)
and increase the value of theSA_MAX_MAIL_SIZE
parameterNote: The value of
SA_MAX_MAIL_SIZE
is in bytes. In the example below, SpamAssassin will check all messages with the size up to 768KB:# SpamAssassin max mail size (in bytes)
SA_MAX_MAIL_SIZE 768000 -
Save the changes and close the file