]> git.donarmstrong.com Git - deb_pkgs/spamass-milter.git/blob - debian/README.Debian
add ENVRCPT stuff to README.Debian
[deb_pkgs/spamass-milter.git] / debian / README.Debian
1 --------------------------------------------------------------
2   Integrating spamass-milter into your sendmail installation
3 --------------------------------------------------------------
4
5 You will need to edit /etc/mail/sendmail.mc and add an
6 INPUT_MAIL_FILTER line that connects to the spamass-milter socket.
7
8 By default the spamass-milter socket is
9 /var/run/spamass/spamass.sock; so your INPUT_MAIL_FILTER should look
10 something like:
11
12  # spamassassin settings
13  INPUT_MAIL_FILTER(`spamassassin',
14          `S=local:/var/run/spamass/spamass.sock, F=,
15          T=S:4m;R:4m;E:10m')dnl
16  define(`confMILTER_MACROS_CONNECT',`t, b, j, _, {daemon_name}, {if_name}, {if_addr}')dnl
17  define(`confMILTER_MACROS_HELO',`s, {tls_version}, {cipher}, {cipher_bits}, {cert_subject}, {cert_issuer}')dnl
18  define(`confMILTER_MACROS_ENVRCPT',`b, i, j, r, v, Z, _')dnl
19
20 Briefly, the F=, tells sendmail to just pass the connection through if
21 the milter fails. This is most likely the setting you want. If you
22 want to temporarily fail a connection, you can set F=T. You almost
23 definitely don't want to reject connections, but if necessary, you can
24 do that by setting F=R.
25
26 You may also need to adjust these timeout settings, as spamd can be
27 sluggish on a slow machine. S is the timeout for sending information
28 from the MTA to a filter. R is the timeout for reading a reply from
29 the filter. E is the overall timeout between sending end-of-message to
30 filter and waiting for the final acknowledgment.
31
32 The settings above seem to work well on a Celeron 466 that receives
33 around 1000 emails an hour. You may wish to adjust them according to
34 your needs.
35
36 See http://www.sendmail.com/partner/resources/development/milter_api/installation.html
37 and http://www.sendmail.org/m4/adding_mailfilters.html#INPUT_MAIL_FILTER
38 for more information on milters.
39
40 --------------------------------------------------------------
41   Integrating spamass-milter into your postfix installation
42 --------------------------------------------------------------
43
44 You need to edit /etc/postfix/main.cf and configure smptpd_milters so
45 that postfix connects to the spamass-milter socket. Something like:
46
47   # spamass-milter configuration
48   smtpd_milters = unix:/var/spool/postfix/spamass/spamass.sock
49
50 should work. See http://www.postfix.org/MILTER_README.html or
51 /usr/share/doc/postfix/MILTER_README.gz (in postfix-doc) for
52 information on how to set tempfail and the various timeouts that the
53 sendmail configuration above uses.
54
55 You'll also want to change /etc/default/spamass-milter to use the
56 SOCKET above, and also enable RUNAS so that it runs as the same user
57 that will be connecting to the socket.
58
59 -------------------------------------------------------------
60   Adjusting how spamass-milter is started
61 -------------------------------------------------------------
62
63 You can adjust how spamass-milter starts, and the options it calls
64 spamc with by adjusting /etc/default/spamass-milter. OPTIONS is passed
65 directly to spamass-milter by /etc/init.d/spamass-milter.
66
67 -------------------------------------------------------------
68 Debugging spamass-milter
69 -------------------------------------------------------------
70
71 As spamass-milter is still undergoing development, you may see bugs
72 from time to time.
73
74 If spamass-milter is segfaulting (SEGV or SIG 11) please build a
75 debugging version of the spamass-milter package and install it:
76
77 mkdir temp;
78 cd temp;
79 apt-get source spamass-milter;
80 apt-get build-dep spamass-milter;
81 cd spamass-milter-*;
82 DEB_BUILD_OPTIONS='nostrip' CXXFLAGS='-O0 -g' fakeroot debian/rules clean binary;
83 dpkg -i spamass-milter*.deb;
84
85 Then turn on coredumps (ulimit -c unlimited), and start spamass-milter
86 as usual (/etc/init.d/spamass-milter start).
87
88 When spamass-milter cores, run gdb on the core, ala:
89 gdb /usr/sbin/spamass-milter /foo/corefile.pid
90 thread apply all where
91 bt
92 q
93
94 and send the results along with your bug report using reportbug.
95
96  -- Don Armstrong <don@debian.org>, Tue,  2 Jan 2007 08:22:46 -0800