1 From: Oliver Egginger <Oliver.Egginger@dvz.fh-giessen.de>
2 Date: 21 May 2003 10:11:16 +0200
6 download the spamassassin package. See
7 http://au.spamassassin.org/downloads.html
9 Define a router in your Exim configuration file.
10 For Exim 4 it could look like this:
16 # When to scan a message :
17 # - it isn't already flagged as spam
18 # - it isn't already scanned
19 # - comes from ABC.DEF.GHI.JKL or MNO.PQR.STU.VWX
20 # - .spamcheck exists for this user
22 "${if and { {!def:h_X-Spam-Flag:} \
23 {!eq {$received_protocol}{spam-scanned}} \
24 {or { {eq {$sender_host_address}{ABC.DEF.GHI.JKL}} \
25 {eq {$sender_host_address}{MNO.PQR.STU.VWX}} \
31 require_files = $home/.spamcheck
36 This router has two advantages (for us):
38 1. You can define the sender host addresses from which you will scan the spam.
39 In my example there are ABC.DEF.GHI.JKL and MNO.PQR.STU.VWX (you have to
40 substiute this by your real IP-Adresses).
42 2. The spamcheck router only runs in dependency of the existence of the
43 .spamcheck file. So your users can decide whether or not they wont to use
44 Spamassassin. Thats important for protection of privacy in germany.
46 If you don't need this you can simplify the router, for example:
52 # When to scan a message :
53 # - it isn't already flagged as spam
54 # - it isn't already scanned
56 "${if and { {!def:h_X-Spam-Flag:} \
57 {!eq {$received_protocol}{spam-scanned}} \
65 In the end you will need a spamcheck transport. This one works well for us:
70 command = /usr/exim/bin/exim -oMr spam-scanned -bS
72 transport_filter = /usr/bin/spamc
73 home_directory = "/tmp"
74 current_directory = "/tmp"
75 # must use a privileged user to set $received_protocol on the way
80 return_fail_output = true
81 return_path_add = false
86 Put the router and the transport on the right places in your exim conf and send
87 the daemon a HUP signal. Thats all.