[Exim] Re: Exiscan and Spamassassin

Top Page
Delete this message
Reply to this message
Author: cjackson
Date:  
To: Peter Bowyer
CC: exim-users
Subject: [Exim] Re: Exiscan and Spamassassin
Peter Bowyer writes:

> cjackson <cjackson@???> wrote:
>> cjackson writes:
>>
>>> Hi,
>>>
>>
>> This is an update to my original post and a continued request for
>> assistance. As it turns out, spamd is working fine. The problem
>> appears to be with Exiscan. Exiscan is working because it scans with
>> Clamav. And it scans with spamd. A spam score is reported in the log
>> and the acl succeeds for spam email. The problem is that no header is
>> added for spam email. See acl below:
>>
>> warn  message = X-Spam-Score: $spam_score
>>      spam = mail
>>      logwrite = :main: Spam Score: $spam_score

>>
>> warn  message = X-Spam-Report: $spam_report
>>      spam = mail

>>
>> Seems simple to me but message isn't working. Any ideas
>> extraordinarily welcomed as this niggling problem is holding up the
>> entire project.
>
> 1. You don't have a headers_remove directive somewhere in a router or
> transport which is removing the header, do you?
>
> 2. Try exim -d -bh, this will show you the headers being added by the ACL, a


[snipped]
>
> might help...
>


Yes, thanks. Exiscan is adding the header.

check spam = mail
warn: condition test succeeded
processing "accept"
accept: condition test succeeded
>>Headers added by DATA ACL:

X-Spam-Score: 5.8
X-Spam-Report: Yes, hits=5.8, required=5.0, version=2.64;

unspool_mbox(): unlinking
'/var/spool/exim/scan/1BwfeW-00017e-54/1BwfeW-00017e-54.eml'
unspool_mbox(): unlinking
'/var/spool/exim/scan/1BwfeW-00017e-54/1BwfeW-00017e-54-00000.com'
calling local_scan(); timeout=300
local_scan() returned 0 NULL
LOG: MAIN
<= cjackson@??? H=ip-66-186-241-17.dynamic.eatel.net
(localsurface.com) [66.186.241.17] P=smtp S=383
SMTP>> 250 OK id=1BwfeW-00017e-54

250 OK id=1BwfeW-00017e-54

**** SMTP testing: that is not a real message id!

END

Now this is still a mystery to me because nowhere in my configuration do I
remove any header. It appears that I am using DSPAM but it is commented out
for debugging purposes. DSPAM did add headers successfully. Here's the
configuration.

 # Put header in spam messages
 warn  message = X-Spam-Score: $spam_score ($spam_bar)
       spam = mail
       logwrite = :main: Spam Score: $spam_score


 warn  message = X-Spam-Report: $spam_report
       spam = mail


accept

######################################################################
#                      ROUTERS CONFIGURATION                         #
#               Specifies how addresses are handled                  #
######################################################################
#     THE ORDER IN WHICH THE ROUTERS ARE DEFINED IS IMPORTANT!       #
# An address is passed to each router in turn until it is accepted.  #
######################################################################


begin routers

dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more

system_aliases:
driver = redirect
allow_fail
allow_defer
data = ${lookup{$local_part}lsearch{/etc/aliases}}
user = mail
file_transport = address_file
pipe_transport = address_pipe

user_aliases:
driver = redirect
allow_fail
allow_defer
hide data = ${lookup ldap {user="cn=da_man,dc=domain,dc=com" \
pass=pass dap:///alias=${quote_ldap:$local_part}, \
ou=aliases,\ou=${quote_ldap:$domain},\
dc=domain,dc=com?maildrop?sub?}} \
user = mail

check_account_status:
driver = accept
hide condition = ${if eq {${lookup ldap {user="cn=da_man,dc=domain,dc=com"
\
pass=pass ldap:///cn=${quote_ldap:$local_part}, \
ou=${quote_ldap:$domain}, \
dc=domain,dc=com?accountStatus?}}}{false}{1}{0}} \
transport = account_disabled_autoreply

virtualuser:
 driver = accept
 condition = ${if and { \
       { eq {${lookup ldap {user="cn=da_man,dc=domain,dc=com" \
       pass=pass
ldap:///cn=${quote_ldap:$local_part},ou=${quote_ldap:$domain}, \
       dc=domain,dc=com?forwardOnly?}}}{false}} \
       { or { \
         { eq {$h_X-DSPAM-Result:}{Spam} } \
         { def:h_X-Spam-Score:} \
            } } \
       }{1}{0}}
 transport = virtual_delivery
 no_more


save_copy:
driver = accept
transport = save_delivery
unseen

smarthost:
driver = manualroute
transport = remote_smtp
route_list = * 192.168.190.31

Thanks,
Craig