1SPAMASS_MILTER(8) BSD System Manager's Manual SPAMASS_MILTER(8)
2
4 spamass-milter — sendmail milter for passing emails through SpamAssassin
5
7 spamass-milter -p socket [-b|-B spamaddress] [-C -rejectcode]
8 [-d debugflags] [-D host] [-e defaultdomain] [-f]
9 [-g group] [-i networks] [-m] [-M] [-P pidfile] [-r nn]
10 [-r -rejectmsg] [-u defaultuser] [-x]
11 [-S -/path/to/sendmail] [-- spamc flags ...]
12
14 The spamass-milter utility is a sendmail milter that checks and modifies
15 incoming email messages with SpamAssassin.
16
17 The following options are available:
18
19 -p socket
20 Specifies the pathname of a socket to create for communication
21 with sendmail. If it is removed, sendmail will not be able to
22 access the milter. This may cause messages to bounce, queue, or
23 be passed through unmiltered, depending on the parameters in
24 sendmail's .cf file.
25
26 -b spamaddress
27 Redirects tagged spam to the specified email address. All enve‐
28 lope recipients are removed, and inserted into the message as
29 ‘X-Spam-Orig-To:’ headers.
30
31 -B spamaddress
32 Same as -b, except the original recipients are retained. Only
33 one of -b and -B may be used.
34
35 -C rejectcode
36 Mail that is rejected is rejected by default with a 5.7.1 code.
37 This option allows that to be overridden. See also, -R -S
38 option.
39
40 -d debugflags
41 Enables logging. debugflags is a comma-separated list of tokens:
42
43 func Entry and exit of internal functions.
44
45 misc Other non-verbose logging.
46
47 net Lookups of the ignored netblocks list.
48
49 poll Low-level I/O to the child spamc process.
50
51 rcpt Recipient processing.
52
53 spamc High-level I/O to the child spamc process.
54
55 str Calls to field lookup and string comparison functions.
56
57 uori Calls to the update_or_insert function.
58
59 1 (historical) Same as func,misc.
60
61 2 (historical) Same as func,misc,poll.
62
63 3 (historical) Same as func,misc,poll,str,uori.
64
65 -D host
66 Connects to a remote spamd server on host, instead of using one
67 on localhost. This option is deprecated; use -- -d host instead.
68
69 -e defaultdomain
70 Pass the full user@domain address to spamc. The default is to
71 pass only the username part on the assumption that all users are
72 local. This flag is useful if you are using an SQL (or other
73 username) backend with spamassassin and have listed the full
74 address there. If the recipient name has no domain part (if the
75 recipient is on the local machine for example), defaultdomain is
76 added. Requires the -u flag.
77
78 -f Causes spamass-milter to fork into the background.
79
80 -g group
81 Makes the socket for communication with the MTA group-writable
82 (mode 0750) and sets the socket's group to group. This option is
83 intended for use with MTA's like Postfix that do not run as root,
84 and is incompatible with Sendmail usage.
85
86 -i networks
87 Ignores messages if the originating IP is in the network(s)
88 listed. The message will be passed through without calling Spa‐
89 mAssassin at all. networks is a comma-separated list, where each
90 element can be either an IP address (nnn.nnn.nnn.nnn), a CIDR
91 network (nnn.nnn.nnn.nnn/nn), or a network/netmask pair
92 (nnn.nnn.nnn.nnn/nnn.nnn.nnn.nnn). Multiple -i flags will append
93 to the list. For example, if you list all your internal net‐
94 works, no outgoing emails will be filtered.
95
96 -m Disables modification of the ‘Subject:’ and ‘Content-Type:’ head‐
97 ers and message body. This is useful when SpamAssassin is con‐
98 figured with ‘defang_mime 0’ and ‘report_header 1’, or when SA is
99 simply used to add headers for postprocessing later. Updating
100 the body through the milter interface can be slow for large mes‐
101 sages.
102
103 -M Like -m, but also disables creation of any SpamAssassin
104 ‘X-Spam-*’ headers as well. Both tagged and untagged mail gets
105 passed through unchanged. To be useful, this option should be
106 used with the -r, -b, or -B flags. If -b is used, the
107 ‘X-Spam-Orig-To:’ headers will still be added.
108
109 -P pidfile
110 Create the file pidfile, containing the processid of the milter.
111
112 -r nn Reject scanned email if it greater than or equal to nn. If -1,
113 reject scanned email if SpamAssassin tags it as spam (useful if
114 you are also using the -u flag, and users have changed their
115 required_hits value).
116
117 For example, if you usually use procmail to redirect tagged email
118 into a separate folder just in case of false positives, you can
119 use -r 15 and reject flagrant spam outright while still receiving
120 low-scoring messages.
121
122 -R rejecttext
123 Mail that is rejected is rejected with the message "Blocked by
124 SpamAssassin". This option allows the user to call with a dif‐
125 ferent message, instead. See also, the -C option
126
127 -S /path/to/sendmail
128 This option is used in conjunction with the -x option to specify
129 a path to sendmail if the default compiled in choice is not sat‐
130 isfactory.
131
132 -u defaultuser
133 Pass the username part of the first recipient to spamc with the
134 -u flag. This allows user preferences files to be used. If the
135 message is addressed to multiple recipients, the username
136 defaultuser is passed instead.
137
138 Note that spamass-milter does not know whether an email is incom‐
139 ing or outgoing, so a message from ⟨user1@localdomain.com⟩ to
140 ⟨user2@yahoo.com⟩ will make spamass-milter pass -u user2 to
141 spamc.
142
143 -x Pass the recipient address through sendmail -bv, which will per‐
144 form virtusertable and alias expansion. The resulting username
145 is then passed to spamc. Requires the -u flag. The spamass-mil‐
146 ter configuration process does its best to find sendmail, but it
147 is possible to override this compiled-in setting via the
148
149 -- spamc flags ...
150 Pass all remaining options to spamc. This allows you to connect
151 to a remote spamd with -d or -p.
152
154 /usr/bin/spamc
155 client interface to SpamAssassin
156
158 spamassassin(1), spamd(1)
159
161 Georg C. F. Greve <greve@gnu.org>
162 Dan Nelson <dnelson@allantgroup.com>
163 Todd Kover <kovert@omniscient.com>
164
165BSD July 25, 2001 BSD