Mercurial > notdcc
comparison dccm.html.in @ 0:c7f6b056b673
First import of vendor version
author | Peter Gervai <grin@grin.hu> |
---|---|
date | Tue, 10 Mar 2009 13:49:58 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c7f6b056b673 |
---|---|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> | |
2 <HTML> | |
3 <HEAD> | |
4 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> | |
5 <TITLE>dccm.0.8</TITLE> | |
6 <META http-equiv="Content-Style-Type" content="text/css"> | |
7 <STYLE type="text/css"> | |
8 BODY {background-color:white; color:black} | |
9 ADDRESS {font-size:smaller} | |
10 IMG.logo {width:6em; vertical-align:middle} | |
11 </STYLE> | |
12 </HEAD> | |
13 <BODY> | |
14 <PRE> | |
15 <!-- Manpage converted by man2html 3.0.1 --> | |
16 <B><A HREF="dccm.html">dccm(8)</A></B> Distributed Checksum Clearinghouse <B><A HREF="dccm.html">dccm(8)</A></B> | |
17 | |
18 | |
19 </PRE> | |
20 <H2><A NAME="NAME">NAME</A></H2><PRE> | |
21 <B>dccm</B> -- Distributed Checksum Clearinghouse Milter Interface | |
22 | |
23 | |
24 </PRE> | |
25 <H2><A NAME="SYNOPSIS">SYNOPSIS</A></H2><PRE> | |
26 <B>dccm</B> [<B>-VdbxANQ</B>] [<B>-G</B> <I>on</I> | <I>off</I> | <I>noIP</I> | <I>IPmask/xx</I>] [<B>-h</B> <I>homedir</I>] [<B>-I</B> <I>user</I>] | |
27 [<B>-p</B> <I>protocol:filename</I> | <I>protocol:port@host</I>] [<B>-m</B> <I>map</I>] | |
28 [<B>-w</B> <I>whiteclnt</I>] [<B>-U</B> <I>userdirs</I>] [<B>-a</B> <I>IGNORE</I> | <I>REJECT</I> | <I>DISCARD</I>] | |
29 [<B>-t</B> <I>type,</I>[<I>log-thold,</I>]<I>rej-thold</I>] [<B>-g</B> [<I>not-</I>]<I>type</I>] [<B>-S</B> <I>header</I>] | |
30 [<B>-l</B> <I>logdir</I>] [<B>-R</B> <I>rundir</I>] [<B>-r</B> <I>rejection-msg</I>] [<B>-j</B> <I>maxjobs</I>] | |
31 [<B>-B</B> <I>dnsbl-option</I>] [<B>-L</B> <I>ltype,facility.level</I>] | |
32 | |
33 | |
34 </PRE> | |
35 <H2><A NAME="DESCRIPTION">DESCRIPTION</A></H2><PRE> | |
36 <B>dccm</B> is a daemon built with the sendmail milter interface intended to | |
37 connect <B>sendmail(8)</B> to DCC servers. When built with the milter filter | |
38 machinery and configured to talk to <B>dccm</B> in the <I>sendmail.cf</I> file, send- | |
39 mail passes all email to <B>dccm</B> which in turn reports related checksums to | |
40 the nearest DCC server. <B>dccm</B> then adds an <I>X-DCC</I> SMTP header line to the | |
41 message. Sendmail is told to reject the message if it is unsolicited | |
42 bulk mail. | |
43 | |
44 <B>Dccm</B> sends reports of checksums related to mail received by DCC clients | |
45 and queries about the total number of reports of particular checksums. A | |
46 DCC server receives <I>no</I> mail, address, headers, or other information, but | |
47 only cryptographically secure checksums of such information. A DCC | |
48 server cannot determine the text or other information that corresponds to | |
49 the checksums it receives. Its only acts as a clearinghouse of counts | |
50 for checksums computed by clients. For complete privacy as far as the | |
51 DCC is concerned, the checksums of purely internal mail or other mail | |
52 that is known to not be unsolicited bulk can be listed in a whitelist to | |
53 not be reported to the DCC server. | |
54 | |
55 Since the checksums of messages that are whitelisted locally by the <B>-w</B> | |
56 <I>whiteclnt</I> file are not reported to the DCC server, <B>dccm</B> knows nothing | |
57 about the total recipient counts for their checksums and so cannot add | |
58 <I>X-DCC</I> header lines to such messages. Sendmail does not tell <B>dccm</B> about | |
59 messages that are not received by sendmail via SMTP, including messages | |
60 submitted locally and received via UUCP, and so they also do not receive | |
61 <I>X-DCC</I> header lines. | |
62 | |
63 Enable the daemon and put its parameters in the <I>dcc</I><B>_</B><I>conf</I> file and start | |
64 the daemon with the <I>@libexecdir@/start-dccm</I> or <I>var/dcc/libexec/rcDCC</I> | |
65 script. | |
66 | |
67 The list of servers that <B>dccm</B> contacts is in the memory mapped file <I>map</I> | |
68 shared by local DCC clients. The file is maintained with <B><A HREF="cdcc.html">cdcc(8)</A></B>. | |
69 | |
70 <A NAME="OPTIONS"><B>OPTIONS</B></A> | |
71 The following options are available: | |
72 | |
73 <A NAME="OPTION-V"><B>-V</B></A> displays the version of <B>dccm</B>. | |
74 | |
75 <A NAME="OPTION-d"><B>-d</B></A> enables debugging output from the DCC client software. Additional | |
76 <B>-d</B> options increase the number of messages. A single <B>-d</B> | |
77 aborted SMTP transactions including those from some "dictionary | |
78 attacks." | |
79 | |
80 <A NAME="OPTION-b"><B>-b</B></A> causes the daemon to not detach itself from the controlling tty and | |
81 put itself into the background. | |
82 | |
83 <A NAME="OPTION-x"><B>-x</B></A> causes the daemon to try "extra hard" to contact a DCC server. | |
84 Since it is usually more important to deliver mail than to report | |
85 its checksums, <B>dccm</B> normally does not delay too long while trying to | |
86 contact a DCC server. It will not try again for several seconds | |
87 after a failure. With <B>-x</B>, it will always try to contact the DCC | |
88 server and it will tell the MTA to answer the DATA command with a | |
89 4yz temporary failure. | |
90 | |
91 <A NAME="OPTION-A"><B>-A</B></A> adds to existing X-DCC headers in the message instead of replacing | |
92 existing headers of the brand of the current server. | |
93 | |
94 <A NAME="OPTION-N"><B>-N</B></A> neither adds, deletes, nor replaces existing X-DCC headers in the | |
95 message. Each message is logged, rejected, and otherwise handled | |
96 the same. | |
97 | |
98 <A NAME="OPTION-Q"><B>-Q</B></A> only queries the DCC server about the checksums of messages instead | |
99 of reporting and querying. This is useful when <B>dccm</B> is used to fil- | |
100 ter mail that has already been reported to a DCC server by another | |
101 DCC client. No single mail message should be reported to a DCC | |
102 server more than once per recipient, because each report will | |
103 increase the apparent "bulkness" of the message. | |
104 | |
105 It is better to use <I>MXDCC</I> lines in the global <I>whiteclnt</I> file for | |
106 your MX mail servers that use DCC than <B>-Q</B>. | |
107 | |
108 <A NAME="OPTION-G"><B>-G</B></A> <I>on</I> | <I>off</I> | <I>noIP</I> | <I>IPmask/xx</I> | |
109 controls <I>greylisting</I>. At least one working greylist server must be | |
110 listed in the <I>map</I> file in the DCC home directory. If more than one | |
111 is named, they must "flood" or change checksums and they must use | |
112 the same <B>-G</B> parameters. See <B><A HREF="dccd.html">dccd(8)</A></B>. Usually all dccm or dccifd | |
113 DCC client processes use the same <B>-G</B> parameters. | |
114 | |
115 <I>IPmask/xx</I> and <I>noIP</I> remove part or all of the IP address from the | |
116 greylist triple. The CIDR block size, <I>xx</I>, must be between 1 and | |
117 128. 96 is added to block sizes smaller than 33 to make them appro- | |
118 priate for the IPv6 addresses used by the DCC. <I>IPmask/96</I> differs | |
119 from <I>noIP</I> for IPv4 addresses, because the former retains the IPv4 to | |
120 IPv6 mapping prefix. | |
121 | |
122 <A NAME="OPTION-h"><B>-h</B></A> <I>homedir</I> | |
123 overrides the default DCC home directory, <I>@prefix@</I>. | |
124 | |
125 <A NAME="OPTION-I"><B>-I</B></A> <I>user</I> | |
126 specifies the UID and GID of the process. | |
127 | |
128 <A NAME="OPTION-p"><B>-p</B></A> <I>protocol:filename</I> | <I>protocol:port@host</I> | |
129 specifies the protocol and address by which sendmail will contact | |
130 <B>dccm</B>. The default is a UNIX domain socket in the "run" directory, | |
131 <I>@dcc_rundir@/dccm</I>. (See also <B>-R)</B> This protocol and address must | |
132 match the value in <I>sendmail.cf</I>. This mechanism can be used to con- | |
133 nect <B>dccm</B> on one computer to sendmail on another computer when a | |
134 port and host name or IP address are used. | |
135 | |
136 <A NAME="OPTION-m"><B>-m</B></A> <I>map</I> | |
137 specifies a name or path of the memory mapped parameter file instead | |
138 of the default <I>map</I> file in the DCC home directory. It should be | |
139 created with the <B><A HREF="cdcc.html">cdcc(8)</A></B> command. | |
140 | |
141 <A NAME="OPTION-w"><B>-w</B></A> <I>whiteclnt</I> | |
142 specifies an optional file containing filtering parameters as well | |
143 as SMTP client IP addresses, SMTP envelope values, and header values | |
144 of mail that is spam or is not spam and does not need a <I>X-DCC</I> | |
145 header, and whose checksums should not be reported to the DCC | |
146 server. | |
147 | |
148 If the pathname <I>whiteclnt</I> is not absolute, it is relative to the DCC | |
149 home directory. | |
150 | |
151 The format of the <B>dccm</B> whiteclnt file is the same as the <I>whitelist</I> | |
152 files used by <B><A HREF="dbclean.html">dbclean(8)</A></B> and the <I>whiteclnt</I> file used by <B><A HREF="dccproc.html">dccproc(8)</A></B>. | |
153 See <B><A HREF="dcc.html">dcc(8)</A></B> for a description of DCC white and blacklists. Because | |
154 the contents of the <I>whiteclnt</I> file are used frequently, a companion | |
155 file is automatically created and maintained. It has the same path- | |
156 name but with an added suffix of <I>.dccw</I> and contains a memory mapped | |
157 hash table of the main file. | |
158 | |
159 A whitelist entry ("OK") or two or more semi-whitelistings ("OK2") | |
160 for one of the message's checksums prevents all of the message's | |
161 checksums from being reported to the DCC server and the addition of | |
162 a <I>X-DCC</I> header line by <B>dccm</B> A whitelist entry for a checksum also | |
163 prevents rejecting or discarding the message based on DCC recipient | |
164 counts as specified by <B>-a</B> and <B>-t</B>. Otherwise, one or more checksums | |
165 with blacklisting entries ("MANY") cause all of the message's check- | |
166 sums to be reported to the server with an addressee count of "MANY". | |
167 | |
168 If the message has a single recipient, an <I>env</I><B>_</B><I>To</I> <I>whiteclnt</I> entry of | |
169 "OK" for the checksum of its recipient address acts like any other | |
170 <I>whiteclnt</I> entry of "OK." When the SMTP message has more than one | |
171 recipient, the effects can be complicated. When a message has sev- | |
172 eral recipients with some but not all listed in the <I>whiteclnt</I> file, | |
173 <B>dccm</B> tries comply with the wishes of the users who want filtering as | |
174 well as those who don't by silently not delivering the message to | |
175 those who want filtering (i.e. are not whitelisted) and delivering | |
176 the message to don't want filtering. | |
177 | |
178 <A NAME="OPTION-U"><B>-U</B></A> <I>userdirs</I> | |
179 enables per-user <I>whiteclnt</I> files and log directories. Each target | |
180 of a message can have a directory of log files named | |
181 <I>usedirs/${dcc</I><B>_</B><I>userdir}/log</I> where <I>${dcc</I><B>_</B><I>userdir}</I> is the <I>sendmail.cf</I> | |
182 macro described below. If <I>${dcc</I><B>_</B><I>userdir}</I> is not set, | |
183 <I>userdirs/${rcpt</I><B>_</B><I>mailer}/${rcpt</I><B>_</B><I>addr}/log</I> is used. The most likely | |
184 value of <I>mailer</I> is <I>local</I>. Appropriate values for both | |
185 <I>${rcpt</I><B>_</B><I>mailer}</I> and <I>${rcpt</I><B>_</B><I>addr}</I> can be seen by examining <I>env</I><B>_</B><I>To</I> | |
186 lines in <B>-l</B> <I>logdir</I> files. If it is not absolute, <I>userdirs</I> is rela- | |
187 tive to the DCC home directory. The directory containing the log | |
188 files must be named <I>log</I> and it must be writable by the <B>dccm</B> process. | |
189 Each log directory must exist or logging for the corresponding is | |
190 silently disabled. The files created in the log directory are owned | |
191 by the UID of the <B>dccm</B> process, but they have <I>group</I> and <I>other</I> read | |
192 and write permissions copied from the corresponding <I>log</I> directory. | |
193 To ensure the privacy of mail, it may be good to make the directo- | |
194 ries readable only by <I>owner</I> and <I>group</I>, and to use a cron script that | |
195 changes the owner of each file to match the grandparent <I>addr</I> direc- | |
196 tory. | |
197 | |
198 There can also be a per -user whitelist file named | |
199 <I>userdirs/${dcc</I><B>_</B><I>userdir}/whiteclnt</I> or if <I>${dcc</I><B>_</B><I>userdir}</I> is not set, | |
200 <I>userdirs/${rcpt</I><B>_</B><I>mailer}/${rcpt</I><B>_</B><I>addr}</I> per-user whitelist files. Any | |
201 checksum that is not white- or blacklisted by an individual | |
202 addressee's <I>whiteclnt</I> file is checked in the main <B>-w -whiteclnt</B> | |
203 file. A missing per-addressee <I>whiteclnt</I> file is the same as an | |
204 empty file. Relative paths for files included in per-addressee | |
205 files are resolved in the DCC home directory. The <I>whiteclnt</I> files | |
206 and the <I>addr</I> directories containing them must be writable by the | |
207 <B>dccm</B> process. | |
208 | |
209 <I>Option</I> lines in per-user whiteclnt files can be used to modify many | |
210 aspects of <B>dccm</B> filtering, as described in the main dcc man page. | |
211 For example, an <I>option</I> <I>dcc-off</I> line turns off DCC filtering for | |
212 individual mailboxes. | |
213 | |
214 <A NAME="OPTION-a"><B>-a</B></A> <I>IGNORE</I> | <I>REJECT</I> | <I>DISCARD</I> | |
215 specifies the action taken when DCC server counts or <B>-t</B> thresholds | |
216 say that a message is unsolicited and bulk. <I>IGNORE</I> causes the mes- | |
217 sage to be unaffected except for adding the <I>X-DCC</I> header line to the | |
218 message. This turns off DCC filtering. | |
219 | |
220 Spam can also be <I>REJECT</I>ed or accepted and silently <I>DISCARD</I>ed without | |
221 being delivered to local mailboxes. The default is <I>REJECT</I>. | |
222 | |
223 Mail forwarded via IP addresses marked <I>MX</I> or <I>MXDCC</I> in the main | |
224 <I>whiteclnt</I> file is treated as if <B>-a</B> <I>DISCARD</I> were specified. This | |
225 prevents "bouncing" spam. | |
226 | |
227 Determinations that mail is or is not spam from sendmail via | |
228 <I>${dcc</I><B>_</B><I>isspam}</I> or <I>${dcc</I><B>_</B><I>notspam}</I> macros override <B>-a</B>. The effects of | |
229 the <B>-w</B> <I>whiteclnt</I> are not affected by <B>-a</B>. | |
230 | |
231 <A NAME="OPTION-t"><B>-t</B></A> <I>type,</I>[<I>log-thold,</I>]<I>rej-thold</I> | |
232 sets logging and "spam" thresholds for checksum <I>type</I>. The checksum | |
233 types are <I>IP</I>, <I>env</I><B>_</B><I>From</I>, <I>From</I>, <I>Message-ID</I>, <I>substitute</I>, <I>Received</I>, | |
234 <I>Body</I>, <I>Fuz1</I>, <I>Fuz2</I>, <I>rep-total</I>, and <I>rep</I>. The first six, <I>IP</I> through | |
235 <I>substitute</I>, have no effect except when a local DCC server configured | |
236 with <B>-K</B> is used. The <I>substitute</I> thresholds apply to the first sub- | |
237 stitute heading encountered in the mail message. The string <I>ALL</I> | |
238 sets thresholds for all types, but is unlikely to be useful except | |
239 for setting logging thresholds. The string <I>CMN</I> specifies the com- | |
240 monly used checksums <I>Body</I>, <I>Fuz1</I>, and <I>Fuz2</I>. <I>Rej-thold</I> and <I>log-thold</I> | |
241 must be numbers, the string <I>NEVER</I>, or the string <I>MANY</I> indicating | |
242 millions of targets. Counts from the DCC server as large as the | |
243 threshold for any single type are taken as sufficient evidence that | |
244 the message should be logged or rejected. | |
245 | |
246 <I>Log-thold</I> is the threshold at which messages are logged. It can be | |
247 handy to log messages at a lower threshold to find solicited bulk | |
248 mail sources such as mailing lists. If no logging threshold is set, | |
249 only rejected mail and messages with complicated combinations of | |
250 white and blacklisting are logged. Messages that reach at least one | |
251 of their rejection thresholds are logged regardless of logging | |
252 thresholds. | |
253 | |
254 <I>Rej-thold</I> is the threshold at which messages are considered "bulk," | |
255 and so should be rejected or discarded if not whitelisted. | |
256 | |
257 DCC Reputation thresholds in the commercial version of the DCC are | |
258 controlled by thresholds on checksum types <I>rep</I> and <I>rep-total</I>. Mes- | |
259 sages from an IP address that the DCC database says has sent more | |
260 than <B>-t</B> <I>rep-total,log-thold</I> messages are logged. A DCC Reputation | |
261 is computed for messages received from IP addresses that have sent | |
262 more than <B>-t</B> <I>rep-total,log-thold</I> messages. The DCC Reputation of an | |
263 IP address is the percentage of its messages that have been detected | |
264 as bulk or having at least 10 recipients. The defaults are equiva- | |
265 lent to <B>-t</B> <I>rep,never</I> and <B>-t</B> <I>rep-total,never,20</I>. | |
266 | |
267 Bad DCC Reputations do not reject mail unless enabled by an <I>option</I> | |
268 <I>DCC-rep-on</I> line in a <I>whiteclnt</I> file. | |
269 | |
270 The checksums of locally whitelisted messages are not checked with | |
271 the DCC server and so only the number of targets of the current copy | |
272 of a whitelisted message are compared against the thresholds. | |
273 | |
274 The default is <I>ALL,NEVER</I>, so that nothing is discarded, rejected, or | |
275 logged. A common choice is <I>CMN,25,50</I> to reject or discard mail with | |
276 common bodies except as overridden by the whitelist of the DCC | |
277 server, the sendmail <I>${dcc</I><B>_</B><I>isspam}</I> and <I>${dcc</I><B>_</B><I>notspam}</I> macros, and | |
278 <B>-g</B>, and <B>-w</B>. | |
279 | |
280 <A NAME="OPTION-g"><B>-g</B></A> [<I>not-</I>]<I>type</I> | |
281 indicates that whitelisted, <I>OK</I> or <I>OK2</I>, counts from the DCC server | |
282 for a type of checksum are to be believed. They should be ignored | |
283 if prefixed with <I>not-</I>. <I>Type</I> is one of the same set of strings as | |
284 for <B>-t</B>. Only <I>IP</I>, <I>env</I><B>_</B><I>From</I>, and <I>From</I> are likely choices. By default | |
285 all three are honored, and hence the need for <I>not-</I>. | |
286 | |
287 <A NAME="OPTION-S"><B>-S</B></A> <I>hdr</I> | |
288 adds to the list of substitute or locally chosen headers that are | |
289 checked with the <B>-w</B> <I>whiteclnt</I> file and sent to the DCC server. The | |
290 checksum of the last header of type <I>hdr</I> found in the message is | |
291 checked. <I>Hdr</I> can be <I>HELO</I> to specify the SMTP envelope HELO value. | |
292 <I>Hdr</I> can also be <I>mail</I><B>_</B><I>host</I> to specify the sendmail "resolved" host | |
293 name from the Mail_from value in the SMTP envelope. As many as six | |
294 different substitute headers can be specified, but only the checksum | |
295 of the first of the six will be sent to the DCC server. | |
296 | |
297 <A NAME="OPTION-l"><B>-l</B></A> <I>logdir</I> | |
298 specifies a directory in which files containing copies of messages | |
299 processed by <B>dccm</B> are kept. They can be copied to per-user directo- | |
300 ries specified with <B>-U</B>. Information about other recipients of a | |
301 message is deleted from the per-user copies. | |
302 | |
303 See the FILES section below concerning the contents of the files. | |
304 See also the <I>option</I> <I>log-subdirectory-{day,hour,minute}</I> lines in | |
305 <I>whiteclnt</I> files described in <B><A HREF="dcc.html">dcc(8)</A></B>. | |
306 | |
307 The directory is relative to the DCC home directory if it is not | |
308 absolute | |
309 | |
310 <A NAME="OPTION-R"><B>-R</B></A> <I>rundir</I> | |
311 specifies the "run" directory where the UNIX domain socket and file | |
312 containing the daemon's process ID are stored. The default value is | |
313 @dcc_rundir@ . | |
314 | |
315 <A NAME="OPTION-r"><B>-r</B></A> <I>rejection-msg</I> | |
316 specifies the rejection message in <B>-o</B> proxy mode for unsolicited | |
317 bulk mail or for mail temporarily blocked by <I>greylisting</I> when <B>-G</B> is | |
318 specified. The first <B>-r</B> <I>rejection-msg</I> replaces the default bulk | |
319 mail rejection message, "5.7.1 550 mail %ID from %CIP rejected by | |
320 DCC". The second replaces "4.2.1 452 mail %ID from %CIP temporary | |
321 greylist embargoed". The third <B>-r</B> <I>rejection-msg</I> replaces the | |
322 default SMTP rejection message "5.7.1 550 %ID bad reputation; see | |
323 http://commercial-dcc.rhyolite.com/cgi-bin/reps.cgi?tgt=%CIP" for | |
324 mail with bad DCC Reputations. If <I>rejection-msg</I> is the zero-length | |
325 string, the <B>-r</B> setting is counted but the corresponding message is | |
326 not changed. | |
327 | |
328 <I>Rejection-msg</I> can contain specific information about the mail mes- | |
329 sage. The following strings starting with % are replaced with the | |
330 corresponding values: | |
331 %ID message ID such as the unique part of log file name or | |
332 sendmail queue ID | |
333 %CIP SMTP client IP address | |
334 %BTYPE type of DNS blacklist hit, such as "SMTP client", | |
335 "mail_host", or "URL NS" | |
336 %BTGT IP address or name declared bad by DNS blacklist | |
337 %BPROBE domain name found in DNS blacklist such as | |
338 4.3.2.10.example.com | |
339 %BRESULT value of the %BPROBE domain name found in DNS black- | |
340 list | |
341 | |
342 A common alternate for the bulk mail rejection message is "4.7.1 451 | |
343 Access denied by DCC" to tell the sending mail system to continue | |
344 trying. Use a 4yz response with caution, because it is likely to | |
345 delay for days a delivery failure message for false positives. If | |
346 the rejection message does not start with an RFC 1893 status code | |
347 and RFC 2821 reply code, 5.7.1 and 550 or 4.2.1 and 452 are used. | |
348 | |
349 See also <B>-B</B> <I>set:rej-msg=rejection-msg</I> to set the status message for | |
350 mail rejected by DNS blacklists. | |
351 | |
352 <A NAME="OPTION-j"><B>-j</B></A> <I>maxjobs</I> | |
353 limits the number of simultaneous requests that will be processed. | |
354 The default value is the maximum number that seems to be possible | |
355 given system limits on open files, select() bit masks, and so forth. | |
356 Start <B>dccm</B> with <B>-d</B> and see the starting message in the system log to | |
357 see the limit. | |
358 | |
359 <A NAME="OPTION-B"><B>-B</B></A> <I>dnsbl-option</I> | |
360 enables DNS blacklist checks of the SMTP client IP address, SMTP | |
361 envelope Mail_From sender domain name, and of host names in URLs in | |
362 the message body. Body URL blacklisting has too many false posi- | |
363 tives to use on abuse mailboxes. It is less effective than | |
364 greylisting with <B><A HREF="dccm.html">dccm(8)</A></B> or <B><A HREF="dccifd.html">dccifd(8)</A></B> but can be useful in situa- | |
365 tions where greylisting cannot be used. | |
366 | |
367 <I>Dnsbl-option</I> is either one of the <B>-B</B> <I>set:option</I> forms or | |
368 <B>-B</B> <I>domain</I>[<I>,IPaddr</I>[<I>/xx</I>[<I>,bltype</I>]]] | |
369 <I>Domain</I> is a DNS blacklist domain such as example.com that will be | |
370 searched. <I>IPaddr</I>[<I>/xxx</I>] is the string "any" an IP address in the DNS | |
371 blacklist that indicates that the mail message should be rejected, | |
372 or a CIDR block covering results from the DNS blacklist. | |
373 "127.0.0.2" is assumed if <I>IPaddr</I> is absent. IPv6 addresses can be | |
374 specified with the usual colon (:) notation. Names can be used | |
375 instead of numeric addresses. The type of DNS blacklist is speci- | |
376 fied by <I>bltype</I> as <I>name</I>, <I>IPv4</I>, or <I>IPv6</I>. Given an envelope sender | |
377 domain name or a domain name in a URL of spam.domain.org and a | |
378 blacklist of type <I>name</I>, spam.domain.org.example.com will be tried. | |
379 Blacklist types of <I>IPv4</I> and <I>IPv6</I> require that the domain name in a | |
380 URL sender address be resolved into an IPv4 or IPv6 address. The | |
381 address is then written as a reversed string of decimal octets to | |
382 check the DNS blacklist, as in 2.0.0.127.example.com, | |
383 | |
384 More than one blacklist can be specified and blacklists can be | |
385 grouped. All searching within a group is stopped at the first posi- | |
386 tive result. | |
387 | |
388 Positive results are ignored after being logged unless an | |
389 <I>option</I> <I>DNSBL-on</I> line appears in the global or per-user <I>whiteclnt</I> | |
390 file. | |
391 | |
392 <B>-B</B> <I>set:no-client</I> | |
393 says that SMTP client IP addresses and reverse DNS domain names | |
394 should not be checked in the following blacklists. | |
395 <B>-B</B> <I>set:client</I> restores the default for the following black- | |
396 lists. | |
397 | |
398 <B>-B</B> <I>set:no-mail</I><B>_</B><I>host</I> | |
399 says that SMTP envelope Mail_From sender domain names should | |
400 not be checked in the following blacklists. <B>-B</B> <I>set:mail</I><B>_</B><I>host</I> | |
401 restores the default. | |
402 | |
403 <B>-B</B> <I>set:no-URL</I> | |
404 says that URLs in the message body should not be checked in the | |
405 in the following blacklists. <B>-B</B> <I>set:URL</I> restores the default. | |
406 | |
407 <B>-B</B> <I>set:no-MX</I> | |
408 says MX servers of sender Mail_From domain names and host names | |
409 in URLs should not be checked in the following blacklists. | |
410 <B>-B</B> <I>set:MX</I> restores the default. | |
411 | |
412 <B>-B</B> <I>set:no-NS</I> | |
413 says DNS servers of sender Mail_From domain names and host | |
414 names in URLs should not be checked in the following black- | |
415 lists. <B>-B</B> <I>set:NS</I> restores the default. | |
416 | |
417 <B>-B</B> <I>set:defaults</I> | |
418 is equivalent to all of <B>-B</B> <I>set:no-temp-fail</I> <B>-B</B> <I>set:client</I> | |
419 <B>-B</B> <I>set:mail</I><B>_</B><I>host</I> <B>-B</B> <I>set:URL</I> <B>-B</B> <I>set:MX</I> and <B>-B</B> <I>set:NS</I> | |
420 | |
421 <B>-B</B> <I>set:group=X</I> | |
422 adds later DNS blacklists specified with | |
423 <B>-B</B> <I>domain</I>[<I>,IPaddr</I>[<I>/xx</I>[<I>,bltype</I>]]] | |
424 to group 1, 2, or 3. | |
425 | |
426 <B>-B</B> <I>set:debug=X</I> | |
427 sets the DNS blacklist logging level | |
428 | |
429 <B>-B</B> <I>set:msg-secs=S</I> | |
430 limits <B>dccm</B> to <I>S</I> seconds total for checking all DNS blacklists. | |
431 The default is 25. | |
432 | |
433 <B>-B</B> <I>set:URL-secs=S</I> | |
434 limits <B>dccm</B> to at most <I>S</I> seconds resolving and checking any | |
435 single URL. The default is 11. Some spam contains dozens of | |
436 URLs and that some "spamvertised" URLs contain host names that | |
437 need minutes to resolve. Busy mail systems cannot afford to | |
438 spend minutes checking each incoming mail message. | |
439 | |
440 <B>-B</B> <I>set:rej-msg=rejection-msg</I> | |
441 sets the SMTP rejection message for the following blacklists. | |
442 <I>Rejection-msg</I> must be in the same format as for <B>-r</B>. If | |
443 <I>rejection-msg</I> is null, the default is restored. The default | |
444 DNS blacklist rejection message is the first message set with | |
445 <B>-r</B>. | |
446 | |
447 <B>-B</B> <I>set:temp-fail</I> | |
448 causes <B>dccm</B> to the MTA to answer the SMTP DATA command with | |
449 452 4.2.1 mail %ID from %CIP temporary delayed for DNSBL | |
450 if any DNS answer required for a DNSBL in the current group | |
451 times out, including resolving names in URLs. | |
452 | |
453 <B>-B</B> <I>set:no-temp-fail</I> | |
454 restores the default of assuming a negative answer for DNS | |
455 responses that take too long. | |
456 | |
457 <B>-B</B> <I>set:maxjobs=X</I> | |
458 sets maximum number of helper processes to <I>X</I>. In order to use | |
459 typical single-threaded DNS resolver libraries, <B>dccm</B> uses | |
460 fleets of helper processes. It is rarely a good idea to change | |
461 the default, which is the same as the maximum number of simul- | |
462 taneous jobs set with <B>-j</B>. | |
463 | |
464 <B>-B</B> <I>set:progpath=@libexecdir@/dns-helper</I> | |
465 changes the path to the helper program. | |
466 | |
467 <A NAME="OPTION-L"><B>-L</B></A> <I>ltype,facility.level</I> | |
468 specifies how messages should be logged. <I>Ltype</I> must be <I>error</I>, <I>info</I>, | |
469 or <I>off</I> to indicate which of the two types of messages are being con- | |
470 trolled or to turn off all <B>syslog(3)</B> messages from <B>dccm</B>. <I>Level</I> must | |
471 be a <B>syslog(3)</B> level among <I>EMERG</I>, <I>ALERT</I>, <I>CRIT</I>, <I>ERR</I>, <I>WARNING</I>, <I>NOTICE</I>, | |
472 <I>INFO</I>, and <I>DEBUG</I>. <I>Facility</I> must be among <I>AUTH</I>, <I>AUTHPRIV</I>, <I>CRON</I>, | |
473 <I>DAEMON</I>, <I>FTP</I>, <I>KERN</I>, <I>LPR</I>, <I>MAIL</I>, <I>NEWS</I>, <I>USER</I>, <I>UUCP</I>, and <I>LOCAL0</I> through | |
474 <I>LOCAL7</I>. The default is equivalent to | |
475 <B>-L</B> <I>info,MAIL.NOTICE</I> <B>-L</B> <I>error,MAIL.ERR</I> | |
476 | |
477 <B>dccm</B> normally sends counts of mail rejected and so forth the to system | |
478 log at midnight. The SIGUSR1 signal sends an immediate report to the | |
479 system log. They will be repeated every 24 hours instead of at midnight. | |
480 | |
481 | |
482 </PRE> | |
483 <H2><A NAME="SENDMAIL-MACROS">SENDMAIL MACROS</A></H2><PRE> | |
484 Sendmail can affect <B>dccm</B> with the values of some <I>sendmail.cf</I> macros. | |
485 These macro names must be added to the Milter.macros option statements in | |
486 <I>sendmail.cf</I> as in the example "Feature" file dcc.m4. | |
487 | |
488 <I>${dcc</I><B>_</B><I>isspam}</I> causes a mail message to be reported to the DCC server as | |
489 having been addressed to "MANY" recipients. The | |
490 <I>${dcc</I><B>_</B><I>isspam}</I> macro is ignored if the <I>${dcc</I><B>_</B><I>notspam}</I> macro | |
491 is set to a non-null string | |
492 | |
493 If the value of the <I>${dcc</I><B>_</B><I>isspam}</I> is null, <B>dccm</B> uses SMTP | |
494 rejection messages controlled by <B>-a</B> and <B>-r</B>. If the value | |
495 of the <I>${dcc</I><B>_</B><I>isspam}</I> macro starts with "DISCARD", the mail | |
496 message is silently discarded as with <B>-a</B> <I>DISCARD.</I> If value | |
497 of the macro not null and does not start with "DISCARD", | |
498 it is used as the SMTP error message given to the SMTP | |
499 client trying to send the rejected message. The message | |
500 starts with an optional SMTP error type and number fol- | |
501 lowed by text. | |
502 | |
503 The <B>-a</B> option does not effect messages marked spam with | |
504 <I>${dcc</I><B>_</B><I>isspam}</I>. When the <I>${dcc</I><B>_</B><I>isspam}</I> macro is set, the | |
505 message is rejected or discarded despite local or DCC | |
506 database whitelist entries. The local whitelist does con- | |
507 trol whether the message's checksums will be reported to | |
508 the DCC server and an <I>X-DCC</I> SMTP header line will be | |
509 added. | |
510 | |
511 <I>${dcc</I><B>_</B><I>notspam}</I> | |
512 causes a message not be considered unsolicited bulk | |
513 despite evidence to the contrary. It also prevents <B>dccm</B> | |
514 from reporting the checksums of the message to the DCC | |
515 server and from adding an <I>X-DCC</I> header line. | |
516 | |
517 When the macro is set by the <I>sendmail.cf</I> rules, | |
518 <I>${dcc</I><B>_</B><I>notspam}</I> macros overrides DCC threshlds that say the | |
519 message should be rejected as well as the effects of the | |
520 <I>${dcc</I><B>_</B><I>isspam}</I> macro. | |
521 | |
522 <I>${dcc</I><B>_</B><I>mail</I><B>_</B><I>host}</I> | |
523 specifies the name of the SMTP client that is sending the | |
524 message. This macro is usually the same as the <I>mail</I><B>_</B><I>host</I> | |
525 macro. They can differ when a sendmail "smart relay" is | |
526 involved. The <I>${dcc</I><B>_</B><I>mail</I><B>_</B><I>host}</I> macro does not work if | |
527 <I>FEATURE(delay</I><B>_</B><I>checks)</I> is used. | |
528 | |
529 <I>${dcc</I><B>_</B><I>userdir}</I> | |
530 is the per-user whitelist and log directory for a recipi- | |
531 ent. If the macro is not set in sendmail.cf, | |
532 $&{rcpt_mailer}/$&{rcpt_addr} is assumed, but with the | |
533 recipient address converted to lower case. Whatever value | |
534 is used, the directory name after the last slash (/) char- | |
535 acter is converted to lower case. Any value containing | |
536 the string "/../" is ignored. | |
537 | |
538 This macro also does not work if <I>FEATURE(delay</I><B>_</B><I>checks)</I> is | |
539 used. | |
540 | |
541 The following two lines in a sendmail mc file have the | |
542 same effect as not defining the ${dcc_userdir} macro, pro- | |
543 vided <I>FEATURE(dcc)</I> is also used and the sendmail | |
544 <I>cf/feature</I> directory has a symbolic link to the | |
545 <I>misc/dcc.m4</I> file. | |
546 | |
547 SLocal_check_rcpt | |
548 R$* $: $1 $(macro {dcc_userdir} $@ $&{rcpt_mailer}/$&{rcpt_addr} $)) | |
549 | |
550 | |
551 </PRE> | |
552 <H2><A NAME="FILES">FILES</A></H2><PRE> | |
553 <A NAME="FILE-@prefix@">@prefix@</A> is the DCC home directory in which other files are found. | |
554 <A NAME="FILE-@libexecdir@/start">@libexecdir@/start</A>-dccm | |
555 is a script used to <B>dccm</B>. | |
556 <A NAME="FILE-dcc/dcc_conf">dcc/dcc_conf</A> | |
557 contains parameters used by the scripts to start DCC daemons | |
558 and cron jobs. | |
559 <A NAME="FILE-logdir">logdir</A> is an optional directory specified with <B>-l</B> and containing | |
560 marked mail. Each file in the directory contains one message, | |
561 at least one of whose checksums reached its <B>-t</B> thresholds or | |
562 that is interesting for some other reason. Each file starts | |
563 with lines containing the date when the message was received, | |
564 the IP address of the SMTP client, and SMTP envelope values. | |
565 Those lines are followed by the body of the SMTP message | |
566 including its header as it was received by sendmail and with- | |
567 out any new or changed header lines. Only approximately the | |
568 first 32 KBytes of the body are recorded unless modified by | |
569 <I>./configure</I> <I>--with-max-log-size=xx</I> The checksums for the mes- | |
570 sage follow the body. They are followed by lines indicating | |
571 that the <I>${dcc</I><B>_</B><I>isspam}</I> or <I>${dcc</I><B>_</B><I>notspam}</I> <I>sendmail.cf</I> macros | |
572 were set or one of the checksums is white- or blacklisted by | |
573 the <B>-w</B> <I>whiteclnt</I> file. Each file ends with the <I>X-DCC</I> header | |
574 line added to the message and the disposition of the message | |
575 including SMTP status message if appropriate. | |
576 <A NAME="FILE-map">map</A> is the memory mapped file of information concerning DCC | |
577 servers in the DCC home directory. | |
578 <A NAME="FILE-whiteclnt">whiteclnt</A> contains the client whitelist in the format described in | |
579 <B><A HREF="dcc.html">dcc(8)</A></B>. | |
580 <A NAME="FILE-whiteclnt.dccw">whiteclnt.dccw</A> | |
581 is a memory mapped hash table of the <I>whiteclnt</I> file. | |
582 <A NAME="FILE-dccm.pid">dccm.pid</A> in the <B>-R</B> <I>rundir</I> directory contains daemon's process ID. The | |
583 string ``dccm'' is replaced by the file name containing the | |
584 daemon to facilitate running multiple daemons, probably con- | |
585 nected to remote instances of sendmail using TCP/IP instead of | |
586 a UNIX domain socket. See also <B>-R</B>. | |
587 <A NAME="FILE-@dcc_rundir@/dccm">@dcc_rundir@/dccm</A> | |
588 is the default UNIX domain socket used by the sendmail milter | |
589 interface. See also <B>-R</B>. | |
590 <A NAME="FILE-sendmail.cf">sendmail.cf</A> | |
591 is the <B>sendmail(8)</B> control file. | |
592 <A NAME="FILE-misc/dcc.m4">misc/dcc.m4</A> | |
593 sendmail mc file that should have a symbolic link in the send- | |
594 mail cf/feature directory so that <I>FEATURE(dcc)</I> can be used in | |
595 a sendmail mc file. | |
596 | |
597 | |
598 </PRE> | |
599 <H2><A NAME="EXAMPLES">EXAMPLES</A></H2><PRE> | |
600 <B>Dccm</B> should be started before sendmail with something like the script | |
601 <I>@libexecdir@/start-dccm.</I> It looks for common DCC parameters in the | |
602 <I>dcc</I><B>_</B><I>conf</I> file in the DCC home directory, <I>@prefix@.</I> | |
603 | |
604 Those numbers should modified to fit local conditions. It might be wise | |
605 to replace the "100" numbers with much larger values or with "MANY" until | |
606 a few weeks of monitoring the log directory show that sources of mailing | |
607 lists are in the server's whitelist file (see <B><A HREF="dccd.html">dccd(8)</A></B>) or the local | |
608 <I>whiteclnt</I> file. | |
609 | |
610 It is usually necessary to regularly delete old log files with a script | |
611 like @libexecdir@/cron-dccd. | |
612 | |
613 On systems unlike modern FreeBSD and other UNIX-like systems which | |
614 include sendmail milter support, sendmail must be built with the milter | |
615 interface, such as by creating a <I>devtools/Site/site.config.m4</I> or similar | |
616 file containing something like the following lines: | |
617 | |
618 APPENDDEF(`conf_sendmail_ENVDEF', `-D_FFR_MILTER=1') | |
619 APPENDDEF(`conf_libmilter_ENVDEF', `-D_FFR_MILTER=1') | |
620 | |
621 Appropriate lines invoking the milter interface must be added to | |
622 <I>sendmail.cf.</I> That can be done by putting a symbolic link to the the | |
623 misc/dcc.m4 file in the DCC source to the sendmail cf/feature directory | |
624 and adding the line | |
625 | |
626 FEATURE(dcc) | |
627 | |
628 to the local .mc file. | |
629 | |
630 Note that <B>dccm</B> should not be used with the Postfix milter mechanism. | |
631 Instead use <B><A HREF="dccifd.html">dccifd(8)</A></B> as a before-queue filter as described in that man | |
632 page. | |
633 | |
634 | |
635 </PRE> | |
636 <H2><A NAME="SEE-ALSO">SEE ALSO</A></H2><PRE> | |
637 <B><A HREF="cdcc.html">cdcc(8)</A></B>, <B><A HREF="dbclean.html">dbclean(8)</A></B>, <B><A HREF="dcc.html">dcc(8)</A></B>, <B><A HREF="dccd.html">dccd(8)</A></B>, <B><A HREF="dblist.html">dblist(8)</A></B>, <B><A HREF="dccifd.html">dccifd(8)</A></B>, <B><A HREF="dccproc.html">dccproc(8)</A></B>, | |
638 <B><A HREF="dccsight.html">dccsight(8)</A></B>, <B>sendmail(8)</B>. | |
639 | |
640 | |
641 </PRE> | |
642 <H2><A NAME="HISTORY">HISTORY</A></H2><PRE> | |
643 Distributed Checksum Clearinghouses are based on an idea of Paul Vixie. | |
644 Implementation of <B>dccm</B> was started at Rhyolite Software in 2000. This | |
645 document describes version 1.3.103. | |
646 | |
647 | |
648 </PRE> | |
649 <H2><A NAME="BUGS">BUGS</A></H2><PRE> | |
650 <B>dccm</B> uses <B>-t</B> where <B><A HREF="dccproc.html">dccproc(8)</A></B> uses <B>-c</B>. | |
651 | |
652 Systems without <B>setrlimit(2)</B> and <B>getrlimit(2)</B> RLIMIT_NOFILE can have | |
653 problems with the default limit on the number of simultaneous jobs, the | |
654 value of <B>-j</B>. Every job requires four open files. These problems are | |
655 usually seen with errors messages that say something like | |
656 dccm[24448]: DCC: accept() returned invalid socket | |
657 A fix is to use a smaller value for <B>-j</B> or to allow <B>dccm</B> to open more | |
658 files. Sendmail version 8.13 and later can be told to poll() instead of | |
659 select with SM_CONF_POLL. Some older versions of sendmail knew about | |
660 FFR_USE_POLL. One of the following lines in your devtools/Site/site.con- | |
661 fig.m4 file can help: | |
662 | |
663 APPENDDEF(`conf_libmilter_ENVDEF', `-DSM_CONF_POLL') | |
664 APPENDDEF(`conf_libmilter_ENVDEF', `-DFFR_USE_POLL') | |
665 | |
666 On many systems with sendmail 8.11.3 and preceding, a bug in the sendmail | |
667 milter mechanism causes <B>dccm</B> to die with a core file when given a signal. | |
668 | |
669 February 26, 2009 | |
670 </PRE> | |
671 <HR> | |
672 <ADDRESS> | |
673 Man(1) output converted with | |
674 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a> | |
675 modified for the DCC $Date 2001/04/29 03:22:18 $ | |
676 <BR> | |
677 <A HREF="http://www.dcc-servers.net/dcc/"> | |
678 <IMG SRC="http://logos.dcc-servers.net/border.png" | |
679 class=logo ALT="DCC logo"> | |
680 </A> | |
681 <A HREF="http://validator.w3.org/check?uri=referer"> | |
682 <IMG class=logo ALT="Valid HTML 4.01 Strict" | |
683 SRC="http://www.w3.org/Icons/valid-html401"> | |
684 </A> | |
685 </ADDRESS> | |
686 </BODY> | |
687 </HTML> |