comparison dccifd.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>dccifd.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="dccifd.html">dccifd(8)</A></B> Distributed Checksum Clearinghouse <B><A HREF="dccifd.html">dccifd(8)</A></B>
17
18
19 </PRE>
20 <H2><A NAME="NAME">NAME</A></H2><PRE>
21 <B>dccifd</B> -- Distributed Checksum Clearinghouse Interface Daemon
22
23
24 </PRE>
25 <H2><A NAME="SYNOPSIS">SYNOPSIS</A></H2><PRE>
26 <B>dccifd</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>/sock</I> | <I>host,port,rhost/bits</I>] [<B>-o</B> <I>/sock</I> | <I>host,port</I>]
28 [<B>-D</B> <I>local-domain</I>] [<B>-m</B> <I>map</I>] [<B>-w</B> <I>whiteclnt</I>] [<B>-U</B> <I>userdirs</I>]
29 [<B>-a</B> <I>IGNORE</I> | <I>REJECT</I> | <I>DISCARD</I>] [<B>-t</B> <I>type,</I>[<I>log-thold,</I>]<I>rej-thold</I>]
30 [<B>-g</B> [<I>not-</I>]<I>type</I>] [<B>-S</B> <I>header</I>] [<B>-l</B> <I>logdir</I>] [<B>-R</B> <I>rundir</I>]
31 [<B>-r</B> <I>rejection-msg</I>] [<B>-T</B> <I>tmpdir</I>] [<B>-j</B> <I>maxjobs</I>]
32 [<B>-B</B> <I>dnsbl-option</I>] [<B>-L</B> <I>ltype,facility.level</I>]
33
34
35 </PRE>
36 <H2><A NAME="DESCRIPTION">DESCRIPTION</A></H2><PRE>
37 <B>dccifd</B> is a daemon intended to connect spam filters such as SpamAssasin
38 and mail transfer agents (MTAs) other than sendmail to DCC servers. The
39 MTA or filter <B>dccifd</B> which in turn reports related checksums to the near-
40 est DCC server and adds an <I>X-DCC</I> SMTP header line to the message. The
41 MTA is told to reject the message if it is unsolicited bulk.
42
43 <B>Dccifd</B> is similar to the DCC sendmail milter interface, <B><A HREF="dccm.html">dccm(8)</A></B> and the
44 DCC Procmail interface, <B><A HREF="dccproc.html">dccproc(8)</A></B>. <B>Dccifd</B> is more efficient than
45 <B><A HREF="dccproc.html">dccproc(8)</A></B> but not restricted to use with sendmail like <B><A HREF="dccm.html">dccm(8)</A></B>. All
46 three send reports of checksums related to mail received by DCC clients
47 and queries about the total number of reports of particular checksums.
48
49 MTA programs use a simple ASCII protocol a subset of SMTP to send a mail
50 message including its SMTP envelope to the daemon. <B>Dccifd</B> responds with
51 an indication of whether the message is unsolicited bulk and an optional
52 copy of the message with an <I>X-DCC</I> header added. The ASCII protocol is
53 described below and in the <I>include/dccif.h</I> file in the DCC source. There
54 is a sample C interface routine in the <I>dcclib/dccif.c</I> file in the DCC
55 source and the <I>dcclib.a</I> library generated from the source. A <I>Perl</I> ver-
56 sion of the interface routine is in <I>dccifd/dccif.pl</I>. Test or demonstra-
57 tion programs in the style of <B><A HREF="dccproc.html">dccproc(8)</A></B> that use those interface rou-
58 tines are in <I>dccifd/dccif-test</I>.
59
60 A subset of ESMTP can be used instead of the ASCII protocol to connect
61 <B>dccifd</B> to postfix as a "Before-Queue Content Filter." See the <B>-o</B> flag.
62
63 Since the checksums of messages that are whitelisted locally by the <B>-w</B>
64 <I>whiteclnt</I> file are not reported to the DCC server, <B>dccifd</B> knows nothing
65 about the total recipient counts for their checksums and so cannot add
66 <I>X-DCC</I> header lines to such messages.
67
68 Enable the daemon and put its parameters in the <I>dcc</I><B>_</B><I>conf</I> file and start
69 the daemon with the <I>start-dccifd</I> script.
70
71 The list of servers that <B>dccifd</B> contacts is in the memory mapped file <I>map</I>
72 shared by local DCC clients. The file is maintained with <B><A HREF="cdcc.html">cdcc(8)</A></B>.
73
74 <A NAME="OPTIONS"><B>OPTIONS</B></A>
75 The following options are available:
76
77 <A NAME="OPTION-V"><B>-V</B></A> displays the version of <B>dccifd</B>.
78
79 <A NAME="OPTION-d"><B>-d</B></A> enables debugging output from the DCC client software. Additional
80 <B>-d</B> options increase the number of messages. A single <B>-d</B>
81 aborted SMTP transactions including those from some "dictionary
82 attacks."
83
84 <A NAME="OPTION-b"><B>-b</B></A> causes the daemon to not detach itself from the controlling tty and
85 put itself into the background.
86
87 <A NAME="OPTION-x"><B>-x</B></A> causes the daemon to try "extra hard" to contact a DCC server.
88 Since it is usually more important to deliver mail than to report
89 its checksums, <B>dccifd</B> normally does not delay too long while trying
90 to contact a DCC server. It will not try again for several seconds
91 after a failure. With <B>-x</B>, it will always try to contact the DCC
92 server and it will tell the MTA to answer the DATA command with a
93 4yz temporary failure.
94
95 <A NAME="OPTION-A"><B>-A</B></A> adds to existing X-DCC headers in the message instead of replacing
96 existing headers of the brand of the current server.
97
98 <A NAME="OPTION-N"><B>-N</B></A> neither adds, deletes, nor replaces existing X-DCC headers in the
99 message. Each message is logged, rejected, and otherwise handled
100 the same.
101
102 <A NAME="OPTION-Q"><B>-Q</B></A> only queries the DCC server about the checksums of messages instead
103 of reporting and querying. This is useful when <B>dccifd</B> is used to
104 filter mail that has already been reported to a DCC server by
105 another DCC client. No single mail message should be reported to a
106 DCC server more than once per recipient, because each report will
107 increase the apparent "bulkness" of the message.
108
109 It is better to use <I>MXDCC</I> lines in the global <I>whiteclnt</I> file for
110 your MX mail servers that use DCC than <B>-Q</B>.
111
112 <A NAME="OPTION-G"><B>-G</B></A> <I>on</I> | <I>off</I> | <I>noIP</I> | <I>IPmask/xx</I>
113 controls <I>greylisting</I>. At least one working greylist server must be
114 listed in the <I>map</I> file in the DCC home directory. If more than one
115 is named, they must "flood" or change checksums and they must use
116 the same <B>-G</B> parameters. See <B><A HREF="dccd.html">dccd(8)</A></B>. Usually all dccm or dccifd
117 DCC client processes use the same <B>-G</B> parameters.
118
119 <I>IPmask/xx</I> and <I>noIP</I> remove part or all of the IP address from the
120 greylist triple. The CIDR block size, <I>xx</I>, must be between 1 and
121 128. 96 is added to block sizes smaller than 33 to make them appro-
122 priate for the IPv6 addresses used by the DCC. <I>IPmask/96</I> differs
123 from <I>noIP</I> for IPv4 addresses, because the former retains the IPv4 to
124 IPv6 mapping prefix.
125
126 <A NAME="OPTION-h"><B>-h</B></A> <I>homedir</I>
127 overrides the default DCC home directory, <I>@prefix@</I>.
128
129 <A NAME="OPTION-I"><B>-I</B></A> <I>user</I>
130 specifies the UID and GID of the process.
131
132 <A NAME="OPTION-p"><B>-p</B></A> <I>/sock/name</I> | <I>host,port,rhost/bits</I>
133 overrides the default address at which programs contact <B>dccifd</B>. The
134 default is a UNIX domain socket named dccifd in the DCC home direc-
135 tory.
136
137 The second form specifies a local host name or IP address, a local
138 TCP port number, and the host names or IP addresses of computers
139 that can use <B>dccifd</B>. 127.0.0.1 or <I>localhost</I> are common choices for
140 <I>host</I>. The string <I>@</I> specifies IN_ADDRANY or all local IP addresses.
141 127.0.0.0/8 is a common choice for <I>rhost/bits</I>.
142
143 <A NAME="OPTION-o"><B>-o</B></A> <I>/sock</I> | <I>host,port</I>
144 enables SMTP proxy mode instead of the ASCII protocol and specifies
145 the output connection when <B>dccifd</B> acts as an SMTP proxy. It is the
146 address of the SMTP server for which <B>dccifd</B> acts as SMTP client.
147 When <I>/sock</I> is <I>/dev/null</I>, <B>dccifd</B> acts as if there were downstream
148 SMTP server that always answers "250 ok". The string <I>@</I> specifies
149 the same IP address as the incoming TCP connection.
150
151 The input to <B>dccifd</B> in SMTP proxy mode is specified with <B>--p</B>. For
152 example, <B>-p</B> <I>127.0.0.1,10025,127.0.0.1/32</I> <B>-o</B> <I>127.0.0.1,10026</I> could be
153 used to connect <B>dccifd</B> with Postfix as described in the documenta-
154 tion in version 2.2.1 Postfix documentation.
155
156 See below concerning the subset of ESMTP used in this mode.
157
158 <A NAME="OPTION-m"><B>-m</B></A> <I>map</I>
159 specifies a name or path of the memory mapped parameter file instead
160 of the default <I>map</I> file in the DCC home directory. It should be
161 created with the <B><A HREF="cdcc.html">cdcc(8)</A></B> command.
162
163 <A NAME="OPTION-w"><B>-w</B></A> <I>whiteclnt</I>
164 specifies an optional file containing filtering parameters as well
165 as SMTP client IP addresses, SMTP envelope values, and header values
166 of mail that is spam or is not spam and does not need a <I>X-DCC</I>
167 header, and whose checksums should not be reported to the DCC
168 server.
169
170 If the pathname <I>whiteclnt</I> is not absolute, it is relative to the DCC
171 home directory.
172
173 The format of the <B>dccifd</B> whiteclnt file is the same as the <I>whitelist</I>
174 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>.
175 See <B><A HREF="dcc.html">dcc(8)</A></B> for a description of DCC white and blacklists. Because
176 the contents of the <I>whiteclnt</I> file are used frequently, a companion
177 file is automatically created and maintained. It has the same path-
178 name but with an added suffix of <I>.dccw</I> and contains a memory mapped
179 hash table of the main file.
180
181 A whitelist entry ("OK") or two or more semi-whitelistings ("OK2")
182 for one of the message's checksums prevents all of the message's
183 checksums from being reported to the DCC server and the addition of
184 a <I>X-DCC</I> header line by <B>dccifd</B> A whitelist entry for a checksum also
185 prevents rejecting or discarding the message based on DCC recipient
186 counts as specified by <B>-a</B> and <B>-t</B>. Otherwise, one or more checksums
187 with blacklisting entries ("MANY") cause all of the message's check-
188 sums to be reported to the server with an addressee count of "MANY".
189
190 If the message has a single recipient, an <I>env</I><B>_</B><I>To</I> <I>whiteclnt</I> entry of
191 "OK" for the checksum of its recipient address acts like any other
192 <I>whiteclnt</I> entry of "OK." When the SMTP message has more than one
193 recipient, the effects can be complicated. When a message has sev-
194 eral recipients with some but not all listed in the <I>whiteclnt</I> file,
195 <B>dccifd</B> tries comply with the wishes of the users who want filtering
196 as well as those who don't by silently not delivering the message to
197 those who want filtering (i.e. are not whitelisted) and delivering
198 the message to don't want filtering.
199
200 <A NAME="OPTION-U"><B>-U</B></A> <I>userdirs</I>
201 enables per-user <I>whiteclnt</I> files and log directories. Each target
202 of a message can have a directory of log files named
203 <I>userdirs/addr/log</I> where <I>addr</I> is the local user or mailbox name com-
204 puted by the MTA. The name of each user's log directory must be
205 <I>log</I>. If it is not absolute, <I>userdirs</I> is relative to the DCC home
206 directory. The directory containing the log files must be named <I>log</I>
207 and it must be writable by the <B>dccifd</B> process. Each log directory
208 must exist or logging for the corresponding is silently disabled.
209 The files created in the log directory are owned by the UID of the
210 <B>dccifd</B> process, but they have <I>group</I> and <I>other</I> read and write permis-
211 sions copied from the corresponding <I>log</I> directory. To ensure the
212 privacy of mail, it may be good to make the directories readable
213 only by <I>owner</I> and <I>group</I>, and to use a cron script that changes the
214 owner of each file to match the grandparent <I>addr</I> directory.
215
216 There can also be a per -user whitelist file named
217 <I>userdirs/addr/whiteclnt</I> for each address <I>addr.</I> Any checksum that is
218 not white- or blacklisted by an individual addressee's <I>whiteclnt</I>
219 file is checked in the main <B>-w -whiteclnt</B> file. A missing per-
220 addressee <I>whiteclnt</I> file is the same as an empty file. Relative
221 paths for files included in per-addressee files are resolved in the
222 DCC home directory. The <I>whiteclnt</I> files and the <I>addr</I> directories
223 containing them must be writable by the <B>dccifd</B> process.
224
225 <I>Option</I> lines in per-user whiteclnt files can be used to modify many
226 aspects of <B>dccifd</B> filtering, as described in the main dcc man page.
227 For example, an <I>option</I> <I>dcc-off</I> line turns off DCC filtering for
228 individual mailboxes.
229
230 <A NAME="OPTION-a"><B>-a</B></A> <I>IGNORE</I> | <I>REJECT</I> | <I>DISCARD</I>
231 specifies the action taken when <B>dccifd</B> is in proxy mode with <B>-o</B> and
232 DCC server counts or <B>-t</B> thresholds say that a message is unsolicited
233 and bulk. <I>IGNORE</I> causes the message to be unaffected except for
234 adding the <I>X-DCC</I> header line to the message. This turns off DCC
235 filtering.
236
237 Spam can also be <I>REJECT</I>ed or (when in proxy mode with <B>-o</B>) accepted
238 and silently <I>DISCARD</I>ed without being delivered to local mailboxes.
239 The default is <I>REJECT</I>.
240
241 Mail forwarded via IP addresses marked <I>MX</I> or <I>MXDCC</I> in the main
242 <I>whiteclnt</I> file is treated as if <B>-a</B> <I>DISCARD</I> were specified. This
243 prevents "bouncing" spam.
244
245 The effects of the <B>-w</B> <I>whiteclnt</I> are not affected by <B>-a</B>.
246
247 <A NAME="OPTION-t"><B>-t</B></A> <I>type,</I>[<I>log-thold,</I>]<I>rej-thold</I>
248 sets logging and "spam" thresholds for checksum <I>type</I>. The checksum
249 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>,
250 <I>Body</I>, <I>Fuz1</I>, <I>Fuz2</I>, <I>rep-total</I>, and <I>rep</I>. The first six, <I>IP</I> through
251 <I>substitute</I>, have no effect except when a local DCC server configured
252 with <B>-K</B> is used. The <I>substitute</I> thresholds apply to the first sub-
253 stitute heading encountered in the mail message. The string <I>ALL</I>
254 sets thresholds for all types, but is unlikely to be useful except
255 for setting logging thresholds. The string <I>CMN</I> specifies the com-
256 monly used checksums <I>Body</I>, <I>Fuz1</I>, and <I>Fuz2</I>. <I>Rej-thold</I> and <I>log-thold</I>
257 must be numbers, the string <I>NEVER</I>, or the string <I>MANY</I> indicating
258 millions of targets. Counts from the DCC server as large as the
259 threshold for any single type are taken as sufficient evidence that
260 the message should be logged or rejected.
261
262 <I>Log-thold</I> is the threshold at which messages are logged. It can be
263 handy to log messages at a lower threshold to find solicited bulk
264 mail sources such as mailing lists. If no logging threshold is set,
265 only rejected mail and messages with complicated combinations of
266 white and blacklisting are logged. Messages that reach at least one
267 of their rejection thresholds are logged regardless of logging
268 thresholds.
269
270 <I>Rej-thold</I> is the threshold at which messages are considered "bulk,"
271 and so should be rejected or discarded if not whitelisted.
272
273 DCC Reputation thresholds in the commercial version of the DCC are
274 controlled by thresholds on checksum types <I>rep</I> and <I>rep-total</I>. Mes-
275 sages from an IP address that the DCC database says has sent more
276 than <B>-t</B> <I>rep-total,log-thold</I> messages are logged. A DCC Reputation
277 is computed for messages received from IP addresses that have sent
278 more than <B>-t</B> <I>rep-total,log-thold</I> messages. The DCC Reputation of an
279 IP address is the percentage of its messages that have been detected
280 as bulk or having at least 10 recipients. The defaults are equiva-
281 lent to <B>-t</B> <I>rep,never</I> and <B>-t</B> <I>rep-total,never,20</I>.
282
283 Bad DCC Reputations do not reject mail unless enabled by an <I>option</I>
284 <I>DCC-rep-on</I> line in a <I>whiteclnt</I> file.
285
286 The checksums of locally whitelisted messages are not checked with
287 the DCC server and so only the number of targets of the current copy
288 of a whitelisted message are compared against the thresholds.
289
290 The default is <I>ALL,NEVER</I>, so that nothing is discarded, rejected, or
291 logged. A common choice is <I>CMN,25,50</I> to reject or discard mail with
292 common bodies except as overridden by the whitelist of the DCC
293 server, the sendmail <I>${dcc</I><B>_</B><I>isspam}</I> and <I>${dcc</I><B>_</B><I>notspam}</I> macros, and
294 <B>-g</B>, and <B>-w</B>.
295
296 <A NAME="OPTION-g"><B>-g</B></A> [<I>not-</I>]<I>type</I>
297 indicates that whitelisted, <I>OK</I> or <I>OK2</I>, counts from the DCC server
298 for a type of checksum are to be believed. They should be ignored
299 if prefixed with <I>not-</I>. <I>Type</I> is one of the same set of strings as
300 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
301 all three are honored, and hence the need for <I>not-</I>.
302
303 <A NAME="OPTION-S"><B>-S</B></A> <I>hdr</I>
304 adds to the list of substitute or locally chosen headers that are
305 checked with the <B>-w</B> <I>whiteclnt</I> file and sent to the DCC server. The
306 checksum of the last header of type <I>hdr</I> found in the message is
307 checked. <I>Hdr</I> can be <I>HELO</I> to specify the SMTP envelope HELO value.
308 <I>Hdr</I> can also be <I>mail</I><B>_</B><I>host</I> to specify the host name from the
309 Mail_from value in the SMTP envelope. As many as six different sub-
310 stitute headers can be specified, but only the checksum of the first
311 of the six will be sent to the DCC server.
312
313 <A NAME="OPTION-l"><B>-l</B></A> <I>logdir</I>
314 specifies a directory in which files containing copies of messages
315 processed by <B>dccifd</B> are kept. They can be copied to per-user direc-
316 tories specified with <B>-U</B>. Information about other recipients of a
317 message is deleted from the per-user copies.
318
319 See the FILES section below concerning the contents of the files.
320 See also the <I>option</I> <I>log-subdirectory-{day,hour,minute}</I> lines in
321 <I>whiteclnt</I> files described in <B><A HREF="dcc.html">dcc(8)</A></B>.
322
323 The directory is relative to the DCC home directory if it is not
324 absolute
325
326 <A NAME="OPTION-R"><B>-R</B></A> <I>rundir</I>
327 specifies the "run" directory where the file containing the daemon's
328 process ID is stored. The default value is <I>@dcc_rundir@</I>.
329
330 <A NAME="OPTION-T"><B>-T</B></A> <I>tmpdir</I>
331 changes the default directory for temporary files from the default.
332 The default is the directory specified with <B>-l</B> or the system default
333 if <B>-l</B> is not used. The system default is often <I>/tmp</I>.
334
335 <A NAME="OPTION-D"><B>-D</B></A> <I>local-domain</I>
336 specifies a host or domain name by which the system is known. There
337 can be several <B>-D</B> settings.
338
339 To find the per-user log directory and whitelist for each mail
340 recipient, <B>dccifd</B> must know each recipient's user name. The ASCII
341 protocol used between and the MTA includes an optional user name
342 with each SMTP recipient address. When the user name is absent when
343 the ASCII protocol is used or when the subset of ESMTP enabled with
344 <B>-o</B> is used, and when the SMTP recipient address includes an <I>at</I> <I>sign</I>
345 (@) each mail address is checked against the list of <I>local-domain</I>s.
346 The part of the recipient address remaining after longest matching
347 <I>local-domain</I> (if any) is taken as the user name. The match is
348 anchored at the right or the end of the recipient address. It must
349 start at a period (.) or <I>at</I> <I>sign</I> (@) in the domain name part of the
350 address.
351
352 If <I>local-domain</I> starts with an asterisk (*) indicating a wildcard,
353 preceding sub-domain names are discarded to compute the user name.
354 Otherwise, the computed user name will include any unmatched sub-
355 domain names.
356
357 The default value of <I>local-domain</I> when there are no <B>-D</B> settings is
358 the host name of the system.
359
360 <A NAME="OPTION-r"><B>-r</B></A> <I>rejection-msg</I>
361 specifies the rejection message in <B>-o</B> proxy mode for unsolicited
362 bulk mail or for mail temporarily blocked by <I>greylisting</I> when <B>-G</B> is
363 specified. The first <B>-r</B> <I>rejection-msg</I> replaces the default bulk
364 mail rejection message, "5.7.1 550 mail %ID from %CIP rejected by
365 DCC". The second replaces "4.2.1 452 mail %ID from %CIP temporary
366 greylist embargoed". The third <B>-r</B> <I>rejection-msg</I> replaces the
367 default SMTP rejection message "5.7.1 550 %ID bad reputation; see
368 http://commercial-dcc.rhyolite.com/cgi-bin/reps.cgi?tgt=%CIP" for
369 mail with bad DCC Reputations. If <I>rejection-msg</I> is the zero-length
370 string, the <B>-r</B> setting is counted but the corresponding message is
371 not changed.
372
373 <I>Rejection-msg</I> can contain specific information about the mail mes-
374 sage. The following strings starting with % are replaced with the
375 corresponding values:
376 %ID message ID such as the unique part of log file name or
377 sendmail queue ID
378 %CIP SMTP client IP address
379 %BTYPE type of DNS blacklist hit, such as "SMTP client",
380 "mail_host", or "URL NS"
381 %BTGT IP address or name declared bad by DNS blacklist
382 %BPROBE domain name found in DNS blacklist such as
383 4.3.2.10.example.com
384 %BRESULT value of the %BPROBE domain name found in DNS black-
385 list
386
387 A common alternate for the bulk mail rejection message is "4.7.1 451
388 Access denied by DCC" to tell the sending mail system to continue
389 trying. Use a 4yz response with caution, because it is likely to
390 delay for days a delivery failure message for false positives. If
391 the rejection message does not start with an RFC 1893 status code
392 and RFC 2821 reply code, 5.7.1 and 550 or 4.2.1 and 452 are used.
393
394 See also <B>-B</B> <I>set:rej-msg=rejection-msg</I> to set the status message for
395 mail rejected by DNS blacklists.
396
397 <A NAME="OPTION-j"><B>-j</B></A> <I>maxjobs</I>
398 limits the number of simultaneous requests that will be processed.
399 The default value is the maximum number that seems to be possible
400 given system limits on open files, select() bit masks, and so forth.
401 Start <B>dccifd</B> with <B>-d</B> and see the starting message in the system log
402 to see the limit.
403
404 <A NAME="OPTION-B"><B>-B</B></A> <I>dnsbl-option</I>
405 enables DNS blacklist checks of the SMTP client IP address, SMTP
406 envelope Mail_From sender domain name, and of host names in URLs in
407 the message body. Body URL blacklisting has too many false posi-
408 tives to use on abuse mailboxes. It is less effective than
409 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-
410 tions where greylisting cannot be used.
411
412 <I>Dnsbl-option</I> is either one of the <B>-B</B> <I>set:option</I> forms or
413 <B>-B</B> <I>domain</I>[<I>,IPaddr</I>[<I>/xx</I>[<I>,bltype</I>]]]
414 <I>Domain</I> is a DNS blacklist domain such as example.com that will be
415 searched. <I>IPaddr</I>[<I>/xxx</I>] is the string "any" an IP address in the DNS
416 blacklist that indicates that the mail message should be rejected,
417 or a CIDR block covering results from the DNS blacklist.
418 "127.0.0.2" is assumed if <I>IPaddr</I> is absent. IPv6 addresses can be
419 specified with the usual colon (:) notation. Names can be used
420 instead of numeric addresses. The type of DNS blacklist is speci-
421 fied by <I>bltype</I> as <I>name</I>, <I>IPv4</I>, or <I>IPv6</I>. Given an envelope sender
422 domain name or a domain name in a URL of spam.domain.org and a
423 blacklist of type <I>name</I>, spam.domain.org.example.com will be tried.
424 Blacklist types of <I>IPv4</I> and <I>IPv6</I> require that the domain name in a
425 URL sender address be resolved into an IPv4 or IPv6 address. The
426 address is then written as a reversed string of decimal octets to
427 check the DNS blacklist, as in 2.0.0.127.example.com,
428
429 More than one blacklist can be specified and blacklists can be
430 grouped. All searching within a group is stopped at the first posi-
431 tive result.
432
433 Positive results are ignored after being logged unless an
434 <I>option</I> <I>DNSBL-on</I> line appears in the global or per-user <I>whiteclnt</I>
435 file.
436
437 <B>-B</B> <I>set:no-client</I>
438 says that SMTP client IP addresses and reverse DNS domain names
439 should not be checked in the following blacklists.
440 <B>-B</B> <I>set:client</I> restores the default for the following black-
441 lists.
442
443 <B>-B</B> <I>set:no-mail</I><B>_</B><I>host</I>
444 says that SMTP envelope Mail_From sender domain names should
445 not be checked in the following blacklists. <B>-B</B> <I>set:mail</I><B>_</B><I>host</I>
446 restores the default.
447
448 <B>-B</B> <I>set:no-URL</I>
449 says that URLs in the message body should not be checked in the
450 in the following blacklists. <B>-B</B> <I>set:URL</I> restores the default.
451
452 <B>-B</B> <I>set:no-MX</I>
453 says MX servers of sender Mail_From domain names and host names
454 in URLs should not be checked in the following blacklists.
455 <B>-B</B> <I>set:MX</I> restores the default.
456
457 <B>-B</B> <I>set:no-NS</I>
458 says DNS servers of sender Mail_From domain names and host
459 names in URLs should not be checked in the following black-
460 lists. <B>-B</B> <I>set:NS</I> restores the default.
461
462 <B>-B</B> <I>set:defaults</I>
463 is equivalent to all of <B>-B</B> <I>set:no-temp-fail</I> <B>-B</B> <I>set:client</I>
464 <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>
465
466 <B>-B</B> <I>set:group=X</I>
467 adds later DNS blacklists specified with
468 <B>-B</B> <I>domain</I>[<I>,IPaddr</I>[<I>/xx</I>[<I>,bltype</I>]]]
469 to group 1, 2, or 3.
470
471 <B>-B</B> <I>set:debug=X</I>
472 sets the DNS blacklist logging level
473
474 <B>-B</B> <I>set:msg-secs=S</I>
475 limits <B>dccifd</B> to <I>S</I> seconds total for checking all DNS black-
476 lists. The default is 25.
477
478 <B>-B</B> <I>set:URL-secs=S</I>
479 limits <B>dccifd</B> to at most <I>S</I> seconds resolving and checking any
480 single URL. The default is 11. Some spam contains dozens of
481 URLs and that some "spamvertised" URLs contain host names that
482 need minutes to resolve. Busy mail systems cannot afford to
483 spend minutes checking each incoming mail message.
484
485 <B>-B</B> <I>set:rej-msg=rejection-msg</I>
486 sets the SMTP rejection message for the following blacklists.
487 <I>Rejection-msg</I> must be in the same format as for <B>-r</B>. If
488 <I>rejection-msg</I> is null, the default is restored. The default
489 DNS blacklist rejection message is the first message set with
490 <B>-r</B>.
491
492 <B>-B</B> <I>set:temp-fail</I>
493 causes <B>dccifd</B> to the MTA to answer the SMTP DATA command with
494 452 4.2.1 mail %ID from %CIP temporary delayed for DNSBL
495 if any DNS answer required for a DNSBL in the current group
496 times out, including resolving names in URLs.
497
498 <B>-B</B> <I>set:no-temp-fail</I>
499 restores the default of assuming a negative answer for DNS
500 responses that take too long.
501
502 <B>-B</B> <I>set:maxjobs=X</I>
503 sets maximum number of helper processes to <I>X</I>. In order to use
504 typical single-threaded DNS resolver libraries, <B>dccifd</B> uses
505 fleets of helper processes. It is rarely a good idea to change
506 the default, which is the same as the maximum number of simul-
507 taneous jobs set with <B>-j</B>.
508
509 <B>-B</B> <I>set:progpath=@libexecdir@/dns-helper</I>
510 changes the path to the helper program.
511
512 <A NAME="OPTION-L"><B>-L</B></A> <I>ltype,facility.level</I>
513 specifies how messages should be logged. <I>Ltype</I> must be <I>error</I>, <I>info</I>,
514 or <I>off</I> to indicate which of the two types of messages are being con-
515 trolled or to turn off all <B>syslog(3)</B> messages from <B>dccifd</B>. <I>Level</I>
516 must be a <B>syslog(3)</B> level among <I>EMERG</I>, <I>ALERT</I>, <I>CRIT</I>, <I>ERR</I>, <I>WARNING</I>,
517 <I>NOTICE</I>, <I>INFO</I>, and <I>DEBUG</I>. <I>Facility</I> must be among <I>AUTH</I>, <I>AUTHPRIV</I>,
518 <I>CRON</I>, <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>
519 through <I>LOCAL7</I>. The default is equivalent to
520 <B>-L</B> <I>info,MAIL.NOTICE</I> <B>-L</B> <I>error,MAIL.ERR</I>
521
522 <B>dccifd</B> normally sends counts of mail rejected and so forth to the system
523 log at midnight. The SIGUSR1 signal sends an immediate report to the
524 system log. The reports will be repeated every 24 hours at the same
525 minute as the signal instead of at midnight.
526
527 <A NAME="Protocol"><B>Protocol</B></A>
528 <B>Dccifd</B> uses a simple ASCII protocol to receive mail messages to be
529 checked and to return results. For each message, the MTA must open a
530 connection to the interface daemon, send options, envelope recipients,
531 and the message, receive the results, and close the connection.
532
533 Instead of the ASCII protocol, a subset of ESMTP is enabled by <B>-o</B>. Only
534 the familiar HELO, EHLO, Mail, Rcpt, DATA, RSET, and QUIT commands and
535 the Postfix extensions XFORWARD and XCLIENT are honored. Since SMTP has
536 no provisions for user names, the protocol enabled by <B>-o</B> depends on a
537 list of local domain names specified with <B>-D</B> to find per-user log direc-
538 tories and whitelist files. If neither XFORWARD nor XCLIENT are used,
539 <B>dccifd</B> uses the IP address of the MTA and the value of the HELO command.
540
541 In the ASCII protocol, each of the following lines are sent in order to
542 <B>dccifd</B>. Each ends with a newline ('\n') character.
543 options zero or more blank-separated strings among:
544 <I>spam</I> the message is already known to be spam
545 <I>body</I> return all of the headers with the added
546 <I>X-DCC</I> header line and the body
547 <I>header</I> return the <I>X-DCC</I> header
548 <I>query</I> ask the DCC server about the message without
549 reporting it, as if <B>dccifd</B> were running with
550 <B>-Q</B>.
551 <I>grey-query</I> only query the greylist server for this mes-
552 sage. <B>-G</B> <I>on</I> must be in use.
553 <I>no-reject</I> suppress the overall, one character line 'R'
554 result. This can be useful when using <B>dccifd</B>
555 only for greylisting.
556 <I>log</I> ensure that this message is logged as if
557 <B>dccifd</B> were running with <B>-t -all,0,</B>
558 client IP address of the SMTP client in a "dotted" or "coloned"
559 ASCII string and reverse-DNS host name. If the host name
560 is present, it must follow a carriage return character
561 ('\r') after the IP address. The client IP address must be
562 present and non-null if the host name is present. The
563 string "0.0.0.0\n" is understood the same as the null
564 string, meaning that both the IP address and host name are
565 absent. If the client IP address is absent, then the IP
566 address and host name are taken from the first non-local
567 Received header if it has the standard "name (name [IP
568 address])..." format. Non-standard Received headers com-
569 monly added by qmail as well as Received headers specifying
570 IP addresses marked <I>MX</I> or <I>MXDCC</I> in the global <B>-w</B> <I>whiteclnt</I>
571 file are skipped.
572 HELO SMTP HELO value or nothing, followed by a newline ('\n')
573 character. If the HELO value is null and the IP address of
574 the SMTP client are not supplied, they will be taken from
575 the same Received: header that supplies the IP address.
576 sender or SMTP <I>Mail</I> <I>From</I> command value for the env_from checksum.
577 If the sender is null, the contents of the first Return-
578 Path: or UNIX style From_ header is used.
579 recipients or SMTP <I>Rcpt</I> <I>To</I> recipient mailboxes followed by correspond-
580 ing local user names, one (mailbox,user) pair to a line.
581 Each optional local user name is separated from the corre-
582 sponding mailbox recipient address by a carriage return
583 ('\r'). A local user name can be null if it is not known,
584 but each recipient mailbox must be non-null. If there are
585 no lines of (mailbox,user) pairs and if the <I>spam</I> option is
586 not included, then the <I>query</I> is assumed. Mailboxes without
587 user names will lack per-user log files and will not invoke
588 a per-user whitelist.
589
590 The last recipient-user name pair is followed by an empty line and the
591 headers and body of the message. The end of the body of the mail message
592 is signaled by the MTA half-closing the connection. See <B>shutdown(2)</B>.
593
594 <B>Dccifd</B> responds with three things. First is a one character line of the
595 overall result advising the MTA:
596 A accept the message for all recipients and answer the SMTP DATA
597 command with a 2yz result.
598 G answer with a 4yz result to embargo the message for greylisting.
599 R reject the message and answer the DATA command with a 5yz result.
600 S accept the message for some recipients and so answer the DATA com-
601 mand with a 2yz result.
602 T temporary failure by the DCC system and so answer with a 4yz
603 result.
604
605 Second is a line of characters indicating the disposition of the message
606 for each corresponding recipient:
607 A deliver the message
608 G discard the message during a greylist embargo
609 R discard the message as spam
610 The SMTP protocol allows only a single result for the DATA command for
611 all recipients that were not rejected before body of the message was
612 offered with the DATA command. To accept the message for some recipients
613 and reject it for others, the MTA must tell the SMTP client it is accept-
614 ing the message for all recipients and then discard it for those that
615 would reject it.
616
617 Finally, if the <I>body</I> or <I>header</I> strings are in the first line of <I>options</I>
618 sent by the MTA to the daemon, then the <I>X-DCC</I> header line or the entire
619 body with the <I>X-DCC</I> header line follows.
620
621
622 </PRE>
623 <H2><A NAME="FILES">FILES</A></H2><PRE>
624 <A NAME="FILE-@prefix@">@prefix@</A> is the DCC home directory in which other files are found.
625 <A NAME="FILE-@libexecdir@/start">@libexecdir@/start</A>-dccifd
626 and
627 <A NAME="FILE-@libexecdir@/rcDCC">@libexecdir@/rcDCC</A>
628 are scripts used to start the daemon.
629 <A NAME="FILE-dcc/dcc_conf">dcc/dcc_conf</A>
630 contains parameters used by the scripts to start DCC daemons
631 and cron jobs.
632 <A NAME="FILE-logdir">logdir</A> is an optional directory specified with <B>-l</B> and containing
633 marked mail. Each file in the directory contains one mes-
634 sage, at least one of whose checksums reached its <B>-t</B> thresh-
635 olds or that is interesting for some other reason. Each file
636 starts with lines containing the date when the message was
637 received, the IP address of the SMTP client, and SMTP enve-
638 lope values. Those lines are followed by the body of the
639 SMTP message including its header as it was received. Only
640 approximately the first 32 KBytes of the body are recorded
641 unless modified by <I>./configure</I> <I>--with-max-log-size=xx</I> The
642 checksums for the message follow the body. They are followed
643 by lines indicate that one of the checksums is white- or
644 blacklisted by the <B>-w</B> <I>whiteclnt</I> file. Each log file ends
645 with the <I>X-DCC</I> header line added to the message and the dis-
646 position of the message.
647 <A NAME="FILE-map">map</A> is the memory mapped file of information concerning DCC
648 servers in the DCC home directory.
649 <A NAME="FILE-whiteclnt">whiteclnt</A> contains the client whitelist in the format described in
650 <B><A HREF="dcc.html">dcc(8)</A></B>.
651 <A NAME="FILE-whiteclnt.dccw">whiteclnt.dccw</A>
652 is a memory mapped hash table of the <I>whiteclnt</I> file.
653 <A NAME="FILE-dccifd.pid">dccifd.pid</A> in the <B>-R</B> <I>rundir</I> directory contains daemon's process ID.
654
655
656 </PRE>
657 <H2><A NAME="EXAMPLES">EXAMPLES</A></H2><PRE>
658 Dccifd can be used as Postfix Before-Queue Content filter. In some tests
659 these values for <B>-p</B> and <B>-o</B> in <I>dcc</I><B>_</B><I>conf</I>.
660
661 DCCIFD_ENABLE=on
662 DCCIFD_ARGS="-p 127.0.0.1,10025,127.0.0.1/32 -o 127.0.0.1,10026
663
664 worked with these lines in /etc/postfix/master.cf
665
666 smtp inet n - n - - smtpd
667 -o smtpd_proxy_filter=127.0.0.1:10025
668 127.0.0.1:10026 inet n - n - - smtpd
669 -o smtpd_authorized_xforward_hosts=127.0.0.0/8
670 -o smtpd_client_restrictions=
671 -o smtpd_helo_restrictions=
672 -o smtpd_sender_restrictions=
673 -o smtpd_recipient_restrictions=permit_mynetworks,reject
674 -o smtpd_data_restrictions=
675 -o mynetworks=127.0.0.0/8
676 -o receive_override_options=no_unknown_recipient_checks
677
678
679 </PRE>
680 <H2><A NAME="SEE-ALSO">SEE ALSO</A></H2><PRE>
681 <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="dccm.html">dccm(8)</A></B>, <B><A HREF="dccproc.html">dccproc(8)</A></B>,
682 <B><A HREF="dccsight.html">dccsight(8)</A></B>,
683
684
685 </PRE>
686 <H2><A NAME="HISTORY">HISTORY</A></H2><PRE>
687 Implementation of <B>dccifd</B> Distributed Checksum Clearinghouses are based on
688 an idea of Paul Vixie with code designed and written at Rhyolite Software
689 starting in 2000. was started at Rhyolite Software in 2002. This docu-
690 ment describes version 1.3.103.
691
692
693 </PRE>
694 <H2><A NAME="BUGS">BUGS</A></H2><PRE>
695 <B>dccifd</B> uses <B>-t</B> where <B><A HREF="dccproc.html">dccproc(8)</A></B> uses <B>-c</B>.
696
697 By default <B>dccifd</B> look for its UNIX domain socket in the DCC home direc-
698 tory, but <B><A HREF="dccm.html">dccm(8)</A></B> looks in its <B>-R</B> <I>rundir</I>.
699
700 Systems without <B>setrlimit(2)</B> and <B>getrlimit(2)</B> RLIMIT_NOFILE can have
701 problems with the default limit on the number of simultaneous jobs, the
702 value of <B>-j</B>. Every job requires four open files. These problems are
703 usually seen with errors messages that say something like
704 dccifd[24448]: DCC: accept(): Result too large
705 A fix is to use a smaller value for <B>-j</B> or to allow <B>dccifd</B> to open more
706 files.
707
708 February 26, 2009
709 </PRE>
710 <HR>
711 <ADDRESS>
712 Man(1) output converted with
713 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
714 modified for the DCC $Date 2001/04/29 03:22:18 $
715 <BR>
716 <A HREF="http://www.dcc-servers.net/dcc/">
717 <IMG SRC="http://logos.dcc-servers.net/border.png"
718 class=logo ALT="DCC logo">
719 </A>
720 <A HREF="http://validator.w3.org/check?uri=referer">
721 <IMG class=logo ALT="Valid HTML 4.01 Strict"
722 SRC="http://www.w3.org/Icons/valid-html401">
723 </A>
724 </ADDRESS>
725 </BODY>
726 </HTML>