On Sun, Sep 23, 2007 at 03:36:45PM -0400, Daniel D Jones wrote:
> Trying to get spamassassin and exim4 playing together. I do not want exim to
> drop email, only to add headers to the message so that the MUA can filter
> messages according to the users preference.
I've recently done this on my server, comments below.
>
> I have spamassassin running as a deamon on port 783. I've verified that I can
> telnet to the port:
SA should log to /var/log/mail.info, and that's a good place to look
for info...
>
> root@etch:/etc/exim4/conf.d/acl# telnet localhost 783
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
>
> In /etc/exim4/conf.d/main/02_exim4-config_options, I have this line:
>
> spamd_address = 127.0.0.1 783
>
> In /etc/exim4/conf.d/acl/40_exim4-config_check_data, I have:
A great resource for info on this is:
http://www.exim.org/exim-html-current/doc/html/spec_html/ch41.html
what I learned:
>
> warn
> spam = nobody
this only performs the actions below when the mail is actually spam,
otherwise its ignored. use nobody:true to force it to always put the
headers on, because the :true will override the results of checking
for spam content.
> add_header = X-Spam-Score: $spam_score ($spam_bar)
> add_header = X-Spam-Report: $spam_report
the $spam_report can be very long and you probably don't want to put
that on mail that is *not* spam, so set up two tests for spam... see
below:
# this test will always return true and will put the scores and bars
# on *every* mail
warn spam = nobody:true
message = X-Spam_score: $spam_score\n\
X-Spam_score_int: $spam_score_int\n\
X-Spam_bar: $spam_bar\n\
# this is supposed to post the spam status and report only for actual
# spam for later procmail processing
# note that exim caches the results of the original spam=nobody call
# so there is little overhead associated with the second call.
warn spam = nobody
message = X-Spam_status: YES\n\
X-Spam_report: $spam_report
I hope this helps
A
Attachment:
signature.asc
Description: Digital signature