Spamassasin not scanning after spamblocker install

BrianUK

Verified User
Joined
Feb 4, 2006
Messages
89
I installed spamblock via http://help.directadmin.com/item.php?id=576 but now spamassassin doesn't appear to be scanning emails. Before I did the install I was getting

Code:
spamd: result: Y 25

in the logs now nothing, exim.conf still has the spamassasin config in it. The diff between my old exim.conf and new one is

Code:
102a103,104
> av_scanner = clamd:127.0.0.1 3310
>
473a476,487
>
> deny message = This message contains malformed MIME ($demime_reason)
> demime = *
> condition = ${if >{$demime_errorlevel}{2}{1}{0}}
> deny message = This message contains a virus or other harmful content ($malware_name)
> demime = *
> malware = */defer_ok
> deny message = This message contains an attachment of a type which we  do not accept (.$found_extension)
> demime = bat:com:pif:prf:scr:vbs
> warn message = X-Antivirus-Scanner: Clean mail though you should still use an Antivirus
>
>
559,570c573,584
< #spamcheck_director:
< #  driver = accept
< #  condition = "${if and { \
< #                     {!def:h_X-Spam-Flag:} \
< #                     {!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
< #  transport = spamcheck
< #  no_verify
---
> spamcheck_director:
>   driver = accept
>   condition = "${if and { \
>                       {!def:h_X-Spam-Flag:} \
>                       {!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
>   transport = spamcheck
>   no_verify

Also after every email logs show

Code:
2016-03-27 10:28:19 1ak6za-00049H-SC Completed
2016-03-27 10:29:01 WARNING: purging the environment.
 Suggested action: use keep_environment and add_environment.

spamd is running
Code:
root     13870     1  0 10:18 ?        00:00:01 /usr/bin/spamd -d -c -m 5 --pidfile=/var/run/spamd.pid
root     13879 13870  0 10:18 ?        00:00:00 spamd child
root     13883 13870  0 10:18 ?        00:00:00 spamd child
root     18739  6510  0 10:39 pts/1    00:00:00 grep spamd

Is there a gui for BlockCracking?
http://www.directadmin.com/features.php?id=1645
 
Last edited:
The "keep_environment" notice would be here:
http://forum.directadmin.com/showthread.php?t=52798

likely means you'd need a
Code:
./build update
to have CB2 add the variable to the exim.variables.conf.

When EasySpamFighter is installed, SpamAssassin scanning should be done at smtp-time via:
Code:
/etc/exim.easy_spam_fighter/check_message.conf
which sets the variable
Code:
set acl_m_spam_assassin_has_run = 1
which is why the post-smtp-time SA scanning is not done in /etc/exim.spamassassin.conf.

Newer exim.conf files don't have the spamcheck_director in the exim.conf itself, they use:
.include_if_exists /etc/exim.spamassassin.conf

to load in the spamcheck_director, but that file also includes the variable check on $acl_m_spam_assassin_has_run, to see if the SA was already run, so it's not run twice.

Check the headers of your emails to see what is added. You'd be looking for X-Spam-Status, which should be added either by the smtp-time SA run (exim.easy_spam_fighter/check_message.conf), or by the post-smtp-time SA run (/etc/exim.spamassassin.conf). If you are using EasySpamFighter, it should be the smtp-time via check_message.conf.

Paste us the headers of the message if you're not sure.
Also any errors from the /var/log/exim/mainlog (leave out the keep_environment messages, as that just needs a CB2 update and ./build exim_conf)

John
 
Back
Top