Scan outgoing mail for SPAM

scrupul0us

Verified User
Joined
Jan 8, 2011
Messages
63
Location
New York
cPanel uses the following:

Code:
acl_not_smtp:

# BEGIN INSERT outgoing_spam_scan
warn
        condition   = ${if <= {$message_size}{200K}{${if forall{<, $recipients}{match_domain{${domain:$item}}{+local_domains}}{0}{1}}}{0}}
        condition   = ${if eq{$originator_uid}{0}{0}{1}}
        set acl_c_outgoing_spam_scan = 1

deny    message     = This message was classified as SPAM and may not be delivered
        condition   = ${if eq{$acl_c_outgoing_spam_scan}{1}{1}{0}}
        spam        = cpaneleximscanner/defer_ok
        log_message = "SpamAssassin as cpaneleximscanner detected OUTGOING not smtp message as spam ($spam_score)"

warn
        log_message = "SpamAssassin as cpaneleximscanner detected OUTGOING not smtp message as NOT spam ($spam_score)"
        condition   = ${if eq{$acl_c_outgoing_spam_scan}{1}{1}{0}}
        add_header = X-OutGoing-Spam-Status: No, score=$spam_score

# END INSERT outgoing_spam_scan

...
...
...

acl_smtp_data:

# BEGIN INSERT outgoing_spam_scan
warn
        condition   = ${if <= {$message_size}{200K}{1}{0}}
        condition   = ${if forall{<, $recipients}{match_domain{${domain:$item}}{+local_domains}}{0}{1}}
        set acl_c_outgoing_spam_scan = 1

deny    message     = This message was classified as SPAM and may not be delivered
        condition   = ${if eq{$acl_c_outgoing_spam_scan}{1}{1}{0}}
        spam        = ${if eq{$acl_m1}{}{cpaneleximscanner}{$acl_m1}}/defer_ok
        log_message = "SpamAssassin as ${if eq{$acl_m1}{}{cpaneleximscanner}{$acl_m1}} detected OUTGOING smtp message as spam ($spam_score)"

warn
        log_message = "SpamAssassin as ${if eq{$acl_m1}{}{cpaneleximscanner}{$acl_m1}} detected OUTGOING smtp message as NOT spam ($spam_score)"
        condition   = ${if eq{$acl_c_outgoing_spam_scan}{1}{1}{0}}
        add_header = X-OutGoing-Spam-Status: No, score=$spam_score


# END INSERT outgoing_spam_scan

I *THINK* the only thing that needs to be changed in a few places is

Code:
cpaneleximscanner

TO

Code:
spamc:true

Hard to say for sure, but has anyone got something like this working?

Thoughts? =)
 
Licensing issues how? It's open source... You'd simply use SpamC in place cpaneleximscanner... the rest can be derived by reading the Exim docs
 
I don't have time to study SpamBlocker source code right now; you're welcome to try it and let me know what you find.

Jeff
 
Back
Top