Possible to enable "scan outgoing mail for spam" exim option PER ACCOUNT?

electric

Well-Known Member
Nov 5, 2001
789
10
318
Hello,

In the Exim Configuration area of WHM, there is this option:

-------------------
Scan outgoing messages for spam and reject based on defined Apache SpamAssassin™ score
-------------------

Is it possible to enable this on a per account basis?

We don't want to enable it for the entire server, because we have a lot of accounts and I think it would add a lot of additional resource usage load on the server. However, I feel this would be very nice to enable for a few trouble accounts that I suspect are sending spam.

Thanks.
 

cPDavidL

Linux Analyst II
Oct 15, 2012
79
18
133
cPanel Access Level
Root Administrator
Greetings!

The way that exim hands messages to SpamAssassin for scanning, that transport does not have a readily available means for applying for only certain accounts.

The options for the outgoing spamassassin scan, can be found in the Exim Configuration Manager - Advanced Editor tab labeled as "outgoing_spam_scan" or "outgoing_spam_scan_over_int" depending on which option is selected.(Filter based on default SpamAssassin score, or filter based on custom score, respectively) You may notice that conditions are specified for when the scan is applied:

Code:
warn
        condition   = ${if forany{<, $recipients}{!match_domain{${domain:$item}}{:+relay_domains}}}
        set acl_m_outbound_recipient = 1

warn
        condition   = $acl_m_outbound_recipient
        condition   = ${if <={$message_size}{1000K}}
        condition   = ${if !eq{$originator_uid}{0}}
        condition   = ${perl{spamd_is_available}}
        set acl_m_spam_scan_enabled  = 1
It may well be possible to customize those entries to apply only the scan to a specific list of senders. The exact syntax to use, will need to be sorted by your administrator. Reference documentation on Exim conditions can be found at 15. Generic options for routers

Have a great day!