Spam scan forwarders

Arieh

Verified User
Joined
May 27, 2008
Messages
1,127
Location
The Netherlands
I want to scan forwarders on spam, I know of this article: http://help.directadmin.com/item.php?id=156

However where should the line be inserted in the latest config (/etc/exim.spamassassin.conf) ?

Default:
Code:
#1.2
# Spam Assassin
spamcheck_director:
  driver = accept
  condition = ${if !eq{$acl_m_spam_assassin_has_run}{1}}
  condition = "${if and { \
                        {!eq {$received_protocol}{spam-scanned}} \
                        {!eq {$received_protocol}{local}} \
                        {exists{/home/${lookup{$domain}lsearch{/etc/virtual/domainowners}{$value}}/.spamassassin/user_prefs}} \
                        {<{$message_size}{500k}} \
                } {1}{0}}"
  retry_use_local_part
  headers_remove = X-Spam-Flag:X-Spam-Report:X-Spam-Status:X-Spam-Level:X-Spam-Checker-Version
  transport = spamcheck
  no_verify

Should it be this?

Code:
#1.2
# Spam Assassin
spamcheck_director:
  driver = accept
  condition = ${if !eq{$acl_m_spam_assassin_has_run}{1}}
  condition = "${if and { \
                        {!eq {$received_protocol}{spam-scanned}} \
                        [b]{!eq {}{${lookup{$local_part}lsearch{/etc/virtual/${domain}/aliases}}}} \[/b]
                        {!eq {$received_protocol}{local}} \
                        {exists{/home/${lookup{$domain}lsearch{/etc/virtual/domainowners}{$value}}/.spamassassin/user_prefs}} \
                        {<{$message_size}{500k}} \
                } {1}{0}}"
  retry_use_local_part
  headers_remove = X-Spam-Flag:X-Spam-Report:X-Spam-Status:X-Spam-Level:X-Spam-Checker-Version
  transport = spamcheck
  no_verify
 
The default exim.spamassassin.conf should already scan forwarders... no changes should be needed.

The default condition to scan, translated:
1) It's not already scanned
2) It didn't arrive locally
3) There is a user_prefs file for the local domain
4) Message is smaller than 500k

Forwarders would be "true" for scanning.

If you're using the EasySpamFigher, then the $acl_m_spam_assassin_has_run setting may be set to 1, meaning the smtp-time SpamAssassin scanning was already done, so the /etc/exim.spamassassin.conf is not triggered.
The ESF smtp-time SA run will still respect the user_prefs settings, and other limits. I believe the only thing it can't do is convert the spam message to be an attachment.

John
 
Thanks John, that clears things up, the KB article is a bit confusing :D Anyway I will configure spamassassin for the users who have forwarders which are forwarding a lot of spam.
 
Back
Top