Re: spamassassin and exim in woody
You can integrate spamassassin in two ways, through calling it through
procmail or by directly integrating it into Exim.
The former is a bit easier to setup, and suitable for single-user
machines.
The latter is a bit more complex to setup, but provides a single point
of configuration. Essentially you will pipe incoming messages to the
spamc daemon and then resubmit them to exim to reinject them into the
pool. A system filter will allow you to do something sensible with
messages submitted from spamc depending on their status.
I use the second configuration to provide a pass-thru host filtering
mail aimed at a corporate Exchange server. Here are some details, which
are additional items to add, if you are brave!, to your exim.conf file.
**** Main
In the top (Main Configuration) section of the configuration file I
have:
message_filter = /etc/exim/spam_header_rewrite.filter
The filter file contents:
if first_delivery and
$h_X-Spam-Flag: contains "YES"
then
logfile /var/log/exim/spamlog
logwrite "$tod_log From: $h_From: Subject: $h_Subject: \n \t X-Spam-Status: $h_X-Spam-Status: Sender: $sender_address"
deliver spam@my.domain
seen finish
endif
**** Transports
You may want to do a shadow delivery of mail to a backup area while you
are testing:
shadow_delivery:
driver = appendfile
group = mail
user = mail
mode = 0660
envelope_to_add = true
directory=/home/mailbackup
maildir_format
pipe_to_scanner:
# from
# http://dman.ddts.net/~dman/config_docs/exim3_spamassassin.html
driver = pipe
command = /usr/sbin/exim -oMr scanned-ok -bS
transport_filter = /usr/bin/spamc
bsmtp = all
# the user and group mail have read/write access to this
# folder
home_directory = "/tmp"
current_directory = "/tmp"
# must use a privileged user to set $received_protocol on the
# way back in!
user = mail
group = mail
return_path_add = false
log_output = true
return_fail_output = true
prefix =
suffix =
shadow_transport = shadow_delivery
*** Routers
spamcheck_router:
driver = domainlist
condition = ${if eq {$received_protocol}{scanned-ok}{no}{yes}}
transport = pipe_to_scanner
route_list = my.domain
On 19/03/03, Phil Reynolds (phil@tinsleyviaduct.com) wrote:
> My mail system runs exim and I am wanting to integrate spamassassin
> into it too.
>
> I am not sure of the best way to do this, and would appreciate some
> assistance with the configuration.
>
> I am using the versions of both packages contained in woody.
Rory
--
Rory Campbell-Lange
<rory@campbell-lange.net>
<www.campbell-lange.net>
Reply to: