summaryrefslogtreecommitdiff
blob: 49035c0ac5a52a715eaa916186b3c61757359e6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Simple install instructions by raker @ g.o
updates by gustavoz
updates by SteveB
---------------------------------------------------------------

For Sendmail:
-------------
Add these lines in /etc/mail/sendmail.mc before MAILER(local):
INPUT_MAIL_FILTER(`spamassassin', `S=local:/var/run/spamass-milter.sock, F=, T=C:15m;S:4m;R:4m;E:10m')dnl
define(`confMILTER_MACROS_CONNECT',`b, j, _, {daemon_name}, {if_name}, {if_addr}')dnl
define(`confMILTER_MACROS_ENVRCPT',`r, v, Z')

When that's done run this command:
	m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

Restart associated services:
	/etc/init.d/sendmail stop
	/etc/init.d/spamass-milter start
	/etc/init.d/sendmail start

OPTIONAL: To run it automatically after booting:
	rc-update add spamass-milter default
	rc-update add sendmail default


For Postfix >= 2.3.0 and < 2.4.0:
---------------------------------
Add those lines to /etc/postfix/main.cf:
smtpd_milters = unix:/var/run/milter/spamass-milter.sock
milter_end_of_data_macros = b i j _ {daemon_name} {if_name} {if_addr} {mail_addr}
milter_default_action = accept

Change in /etc/conf.d/spamass-milter the socket group owner to mail:
SOCKET_GROUP="mail"

Change in /etc/conf.d/spamass-milter the options for spamass-milter to include "-m":
OPTIONS="${OPTIONS} -m"

Restart associated services:
	/etc/init.d/postfix stop
	/etc/init.d/spamass-milter start
	/etc/init.d/postfix start

OPTIONAL: To run it automatically after booting:
	rc-update add spamass-milter default
	rc-update add postfix default


For Postfix >= 2.4.0:
---------------------
Same settings as for Postfix >= 2.3.0 (see above) but you can now use the option "-m"
in /etc/conf.d/spamass-milter.