File: dccifd.html

package info (click to toggle)
dcc 1.2.74-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,552 kB
  • ctags: 4,041
  • sloc: ansic: 41,034; perl: 2,310; sh: 2,186; makefile: 224
file content (578 lines) | stat: -rw-r--r-- 36,695 bytes parent folder | download | duplicates (2)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
    <TITLE>dccifd.8</TITLE>
    <META http-equiv="Content-Style-Type" content="text/css">
    <STYLE type="text/css">
        BODY {background-color:white; color:black}
    </STYLE>
</HEAD>
<BODY>
<PRE>
<!-- Manpage converted by man2html 3.0.1 -->
<B><A HREF="dccifd.html">dccifd(8)</A></B>                   System Manager's Manual                  <B><A HREF="dccifd.html">dccifd(8)</A></B>


</PRE>
<H2><A NAME="NAME">NAME</A></H2><PRE>
     <B>dccifd</B> -- Distributed Checksum Clearinghouse Program Interface


</PRE>
<H2><A NAME="SYNOPSIS">SYNOPSIS</A></H2><PRE>
     <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>-p</B> <I>/sock</I> | <I>host,port,rhost/bits</I>] [<B>-o</B> <I>/sock</I> | <I>host,port</I>]
            [<B>-D</B> <I>local-domain</I>] [<B>-r</B> <I>rejection-msg</I>] [<B>-m</B> <I>map</I>] [<B>-w</B> <I>whiteclnt</I>]
            [<B>-U</B> <I>userdirs</I>] [<B>-a</B> <I>IGNORE|REJECT</I>] [<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>] [<B>-l</B> <I>logdir</I>] [<B>-R</B> <I>rundir</I>] [<B>-T</B> <I>tmpdir</I>]
            [<B>-j</B> <I>maxjobs</I>] [<B>-B</B> <I>dnsbl-option</I>] [<B>-L</B> <I>ltype,facility.level</I>]


</PRE>
<H2><A NAME="DESCRIPTION">DESCRIPTION</A></H2><PRE>
     <B>Dccifd</B> is a daemon intended to connect spam filters such as SpamAssasin
     and mail transfer agents (MTAs) other than sendmail to DCC servers.  The
     MTA or filter <B>dccifd</B> which in turn reports related checksums to the near-
     est DCC server.  DCCIFD then adds an <I>X-DCC</I> SMTP header line to the mes-
     sage.  The MTA is told to reject the message if it is unsolicited bulk.

     <B>Dccifd</B> is similar to the DCC sendmail milter interface, <B><A HREF="dccm.html">dccm(8)</A></B> and the
     DCC Procmail interface, <B><A HREF="dccproc.html">dccproc(8)</A></B>.  <B>dccifd</B> is more efficient than
     dccproc but not restricted to use with sendmail.  All three send reports
     of checksums related to mail received by DCC clients and queries about
     the total number of reports of particular checksums.

     MTA programs generally use a simple ASCII protocol to send a mail message
     including its SMTP envelope to the daemon.  <B>Dccifd</B> responds with an indi-
     cation of whether the message is unsolicited bulk and an optional copy of
     the message with an <I>X-DCC</I> header added.  The protocol is described below
     and in the <I>include/dccif.h</I> file in the DCC source.  There is a sample C
     interface routine in the <I>dcclib/dccif.c</I> file in the DCC source and the
     <I>dcclib.a</I> library generated from the source.  A <I>Perl</I> version of the inter-
     face routine is in <I>dccifd/dccif.pl</I>.  Test or demonstration programs in
     the style of <B><A HREF="dccproc.html">dccproc(8)</A></B> that use those interface routines are in
     <I>dccifd/dccif-test</I>.

     A subset of ESMTP can be used instead of the ASCII protocol to connect
     <B>dccifd</B> to postfix as a "Before-Queue Content Filter."  See the <B>-o</B> flag.

     Since the checksums of messages that are whitelisted locally by the <B>-w</B>
     <I>whiteclnt</I> file are not reported to the DCC server, <B>dccifd</B> knows nothing
     about the total recipient counts for their checksums and so cannot add
     <I>X-DCC</I> header lines to such messages.

     The list of servers that <B>dccifd</B> contacts is in a memory mapped file
     shared by local DCC clients.  The file is maintained with <B><A HREF="cdcc.html">cdcc(8)</A></B>.  Turn
     on the daemon and put its parameters in the <I>dcc</I><B>_</B><I>conf</I>.  Start the daemon
     with the <I>start-dccifd</I> script.

   <A NAME="OPTIONS"><B>OPTIONS</B></A>
     The following options are available:

     <A NAME="OPTION-V"><B>-V</B></A>   displays the version of the DCC program interface.

     <A NAME="OPTION-d"><B>-d</B></A>   enables debugging output from the DCC client library.  Additional <B>-d</B>
          options increase the number of messages.  A single <B>-d</B> causes aborted
          SMTP transactions to be logged.

     <A NAME="OPTION-b"><B>-b</B></A>   causes the daemon to not detach itself from the controlling tty and
          put itself into the background.

     <A NAME="OPTION-x"><B>-x</B></A>   causes the daemon to try "extra hard" to contact a DCC server.
          Since it is usually more important to deliver mail than to report
          its checksums, <B>dccifd</B> normally does not delay too long while trying
          to contact a DCC server.  It also will not try again for several
          seconds after a failure.  With <B>-x</B>, it will always try to contact the
          DCC server and it will tell the MTA to answer the DATA command with
          a 4yz temporary failure.

     <A NAME="OPTION-A"><B>-A</B></A>   adds to existing X-DCC headers in the message instead of replacing
          existing headers of the brand of the current server.

     <A NAME="OPTION-N"><B>-N</B></A>   neither adds, deletes, nor replaces existing X-DCC headers in the
          message.  Each message is logged, rejected, and otherwise handled
          the same.

     <A NAME="OPTION-Q"><B>-Q</B></A>   only queries the DCC server about the checksums of messages instead
          of reporting and querying.  This is useful when <B>dccifd</B> is used to
          filter mail that has already been reported to a DCC server by
          another DCC client.  This can also be useful when applying a private
          white or black list to mail that has already been reported to a DCC
          server.  No single mail message should be reported to a DCC server
          more than once per recipient, because each report will increase the
          apparent "bulkness" of the message.

     <A NAME="OPTION-G"><B>-G</B></A> <I>on</I> | <I>off</I> | <I>noIP</I> | <I>IPmask/xx</I>
          controls <I>greylisting</I>.  At least one working greylist server must be
          listed in the <I>map</I> file in the DCC home directory.  If more than one
          is named, they must "flood" or change checksums and they must use
          the same <B>-G</B> parameters.  See <B><A HREF="dccd.html">dccd(8)</A></B>.  Usually all DCC client pro-
          cesses of dccm or dccifd should use the same <B>-G</B> parameters.

          <I>IPmask/xx</I> and <I>noIP</I> remove part or all of the IP address from the
          greylist triple.  The CIDR block size, <I>xx</I>, must be between 1 and
          128.  96 is added to block sizes smaller than 33 to make them appro-
          priate for the IPv6 addresses used by the DCC.  <I>IPmask/96</I> differs
          from <I>noIP</I> because the former retains the IPv4 to IPv6 mapping pre-
          fix.

     <A NAME="OPTION-W"><B>-W</B></A>   turns off DCC filtering by default to ease managing systems where
          only a minority of users want unsolicited bulk mail to be rejected.
          This is equivalent to a <I>option</I> <I>dcc-off</I> line in the main <B>-w</B> <I>whiteclnt</I>
          file.  When DCC filtering is off, the DCC server is queried and the
          <I>X-DCC</I> header is added but the message is marked to be delivered
          regardless of target counts and thresholds.

          DCC filtering is enabled for a mailbox when <B>-W</B> is not used and there
          is no <I>option</I> <I>dcc-off</I> line in the main or per-user <I>whiteclnt</I> file or
          there is a <I>option</I> <I>dcc-on</I> pine in the per-user <I>whiteclnt</I> file for the
          mailbox.  DCC filtering can also be enabled with an "OK2" entry for
          the fully qualified mailbox in the main or per-user <I>whiteclnt</I> file.

          Messages sent <I>only</I> to target addresses that are listed in the global
          or relevant per-user <B>-w</B> <I>whiteclnt</I> file with "OK" are not reported to
          the DCC server and so are not rejected and do not receive <I>X-DCC</I>
          headers.

     <A NAME="OPTION-h"><B>-h</B></A> <I>homedir</I>
          overrides the default DCC home directory, which is often /var/dcc.

     <A NAME="OPTION-p"><B>-p</B></A> <I>/sock/name</I> | <I>host,port,rhost/bits</I>
          overrides the default address at which programs contact <B>dccifd</B>.  The
          default is a UNIX domain socket named dccifd in the DCC home direc-
          tory.

          The second form specifies a local host name or IP address, a local
          TCP port number, and the host names or IP addresses of computers
          that can use <B>dccifd</B>.  127.0.0.1 or <I>localhost</I> are common choices for
          <I>host</I>.  The string <I>@</I> specifies IN_ADDRANY or all local IP addresses.
          127.0.0.0/8 is a common choice for <I>rhost/bits</I>.

     <A NAME="OPTION-o"><B>-o</B></A> <I>/sock</I> | <I>host,port</I>
          enables SMTP proxy mode instead of the ASCII protocol and specifies
          the address of the SMTP server for which <B>dccifd</B> acts as SMTP client.
          When <I>/sock</I> is <I>/var/null</I>, <B>dccifd</B> acts as if there were downstream
          SMTP server that always answers "250 ok".  The string <I>@</I> specifies
          the same IP address as the incoming TCP connection.

          See below concerning the subset of ESMTP used in this mode.

     <A NAME="OPTION-m"><B>-m</B></A> <I>map</I>
          specifies a name or path of the memory mapped parameter file instead
          of the default <I>map</I> in the DCC home directory.  It should be created
          with the <B><A HREF="cdcc.html">cdcc(8)</A></B> command.

     <A NAME="OPTION-w"><B>-w</B></A> <I>whiteclnt</I>
          specifies an optional file containing SMTP client IP addresses, SMTP
          envelope values, and header values of mail that is not spam, does
          not need a X-DCC header, and whose checksums should not be reported
          to the DCC server.  Local whitelist <I>env</I><B>_</B><I>To</I> values are handy for
          whitelisting or exempting destination addresses such as Postmaster
          from filtering and for blacklisting or marking addresses that should
          never receive mail.  Mail sent to blacklisted addresses or with
          other blacklisted values such as From or env_From values is reported
          to the DCC server as spam or with target counts of millions.

          If the pathname <I>whiteclnt</I> is not absolute, it is relative to the DCC
          home directory.  The format of the <B>dccifd</B> whiteclnt file is the same
          as the <I>whitelist</I> 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>.  See <B><A HREF="dcc.html">dcc(8)</A></B> for a description of DCC white and
          blacklists.  Because the contents of the <I>whiteclnt</I> file are used
          frequently, a companion file is automatically created and main-
          tained.  It has the same pathname but with an added suffix of <I>.dccw</I>
          and contains a memory mapped hash table of the main file.

          A local whitelist entry ("OK") or two or more semi-white listings
          ("OK2") for one of the message's checksums prevents all of the mes-
          sage's checksums from being reported to the DCC server and the addi-
          tion of a <I>X-DCC</I> header line by <B>dccifd</B> (except for env_To checksums
          or when <B>-W</B> is used).  A local whitelist entry for a checksum also
          prevents rejecting the message based on DCC recipient counts as
          specified by <B>-t</B>.  Otherwise, one or more checksums with blacklisting
          entries ("MANY") cause all of the message's checksums to be reported
          to the server with an addressee count of "MANY".

          If the message has a single recipient, an <I>env</I><B>_</B><I>To</I> local <I>whiteclnt</I>
          entry of "OK" for the checksum of its recipient address acts like
          any other <I>whiteclnt</I> entry of "OK."  When the SMTP message has more
          than one recipient, the effects can be complicated.  When a message
          has several recipients with some but not all listed in the <I>whiteclnt</I>
          file, <B>dccifd</B> tries comply with the wishes of the users who want fil-
          tering as well as those who don't by silently not delivering the
          message to those who want filtering (i.e. are not whitelisted) and
          delivering the message to don't want filtering.

          Consider the <B>-W</B> option for implicitly or by default whitelisting
          <I>env</I><B>_</B><I>to</I> values.

     <A NAME="OPTION-U"><B>-U</B></A> <I>userdirs</I>
          enables private whitelists and log files.  Each target of a message
          can have a directory of log files named <I>userdirs/addr/log</I> where <I>addr</I>
          is the local user or mailbox name computed by the MTA.  The name of
          each user's log directory must be <I>log</I>.  If it is not absolute,
          <I>userdirs</I> is relative to the DCC home directory.  The sub-directory
          prefixes for <B>-l</B> <I>logdir</I> are not honored.  The directory containing
          the log files must be named <I>log</I> and it must be writable by the
          <B>dccifd</B> process.  Each log directory must exist or logging for the
          corresponding is silently disabled.  The files created in the log
          directory are owned by the UID of the <B>dccifd</B> process, but they have
          <I>group</I> and <I>other</I> read and write permissions copied from the corre-
          sponding <I>log</I> directory.  To ensure the privacy of mail, it may be
          good to make the directories readable only by <I>owner</I> and <I>group</I>, and
          to use a cron script that changes the owner of each file to match
          the grandparent <I>addr</I> directory.

          There can also be a whitelist named <I>userdirs/addr/whiteclnt</I> for each
          address <I>addr.</I> The name of the file must be <I>whiteclnt</I>.  Any checksum
          that is not white- or blacklisted by an individual addressee's
          whitelist is checked in the <B>-w -whiteclnt</B> list.  A missing per-
          address <I>whiteclnt</I> file is the same as an empty file.  Relative paths
          for whitelists included in per-address files are resolved in the DCC
          home directory.  The <I>whiteclnt</I> files and the <I>addr</I> directories con-
          taining them must be writable by the <B>dccifd</B> process.

     <A NAME="OPTION-a"><B>-a</B></A> <I>IGNORE</I> | <I>REJECT</I>
          specifies the action taken when <B>dccifd</B> is in proxy mode with <B>-o</B> and
          the DCC server counts or <B>-t</B> thresholds say that a message is unso-
          licited bulk.  <I>IGNORE</I> causes the message to be unaffected except for
          adding the <I>X-DCC</I> header line to the message.  This turns off DCC
          filtering.

          Spam can also be <I>REJECT</I>ed. The default is <I>REJECT</I>.

          With an action of <I>REJECT</I>, spam sent to both white-listed targets and
          non-white-listed targets is delivered to white-listed targets and if
          possible, silently discarded for non-white-listed targets.  This is
          not possible if there are too many non-white-listed targets to be
          saved in a buffer of about 500 bytes.

          The effects of the <B>-w</B> <I>whiteclnt</I> are not affected by <B>-a</B>.

     <A NAME="OPTION-t"><B>-t</B></A> <I>type,</I>[<I>log-thold,</I>]<I>rej-thold</I>
          sets logging and "spam" thresholds for checksum <I>type</I>.  The checksum
          types are <I>IP</I>, <I>env</I><B>_</B><I>From</I>, <I>From</I>, <I>Message-ID</I>, <I>Received</I>, <I>Body</I>, <I>Fuz1</I>, and
          <I>Fuz2</I>.  The string <I>ALL</I> sets thresholds for all types, but is unlikely
          to be useful except for setting logging thresholds.  The string <I>CMN</I>
          specifies the commonly used checksums <I>Body</I>, <I>Fuz1</I>, and <I>Fuz2</I>.
          <I>Rej-thold</I> and <I>log-thold</I> must be numbers, the string <I>NEVER</I>, or the
          string <I>MANY</I> indicating millions of targets.  Counts from the DCC
          server as large as the threshold for any single type are taken as
          sufficient evidence that the message should be logged or rejected.

          <I>Log-thold</I> is the threshold at which messages are logged.  It can be
          handy to log messages at a lower threshold to find solicited bulk
          mail sources such as mailing lists.  If no logging threshold is set,
          only rejected mail and messages with complicated combinations of
          white and blacklisting are logged.  Messages that reach at least one
          of their rejection thresholds are logged regardless of logging
          thresholds.

          <I>Rej-thold</I> is the threshold at which messages are considered "bulk,"
          and so should be rejected if not whitelisted.

          The checksums of locally whitelisted messages are not checked with
          the DCC server and so only the number of targets of the current
          instance of a whitelisted message are compared against the thresh-
          olds.

          The default is <B>-t</B> <I>ALL,NEVER</I>, so that nothing is rejected or logged.
          A common choice is <B>-t</B> <I>CMN,25,50</I> to reject mail with common bodies
          except as overridden by the whitelist of the DCC server and local
          <B>-g</B>, and <B>-w</B>.

     <A NAME="OPTION-g"><B>-g</B></A> [<I>not-</I>]<I>type</I>
          indicates that whitelisted, <I>OK</I> or <I>OK2</I>, counts from the DCC server
          for a type of checksum are to be believed.  They should be ignored
          if prefixed with <I>not-</I>.  <I>Type</I> is one of the same set of strings as
          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
          all three are honored, and hence the need for <I>not-</I>.

     <A NAME="OPTION-S"><B>-S</B></A> <I>hdr</I>
          adds to the list of substitute or locally chosen headers that are
          checked with the <B>-w</B> <I>whiteclnt</I> file and sent to the DCC server.  The
          checksum of the last header of type <I>hdr</I> found in the message is
          checked.  <I>Hdr</I> can be <I>HELO</I> to specify the SMTP envelope HELO value.
          <I>Hdr</I> can also be <I>mail</I><B>_</B><I>host</I> to specify the host name from the
          Mail_from value in the SMTP envelope.  As many as 6 different sub-
          stitute headers can be specified, but only the checksum of the first
          of the 6 will be sent to the DCC server.

     <A NAME="OPTION-l"><B>-l</B></A> <I>logdir</I>
          specifies a directory in which files containing copies of messages
          processed by <B>dccifd</B> are kept.  All messages logged are copied to the
          <B>-l</B> <I>logdir</I> directory.  They can also be copied to per-user directo-
          ries specified with <B>-U</B>.  Information about other recipients of a
          message is deleted from the per-user copies.

          If <I>logdir</I> starts with <I>D?</I>, log files are put into subdirectories of
          the form <I>logdir/JJJ</I> where <I>JJJ</I> is the current julian day.  <I>H?logdir</I>
          puts logs files into subdirectories of the form <I>logdir/JJJ/HH</I> where
          <I>HH</I> is the current hour.  <I>M?logdir</I> puts log files into subdirectories
          of the form <I>logdir/JJJ/HH/MM</I> where <I>MM</I> is the current minute.  See
          the FILES section below concerning the contents of the files.

          The directory is relative to the DCC home directory if it is not
          absolute

     <A NAME="OPTION-R"><B>-R</B></A> <I>rundir</I>
          specifies the "run" directory where the UNIX domain socket and file
          containing the daemon's process ID are stored.  The default value is
          often /var/run/dcc.

     <A NAME="OPTION-T"><B>-T</B></A> <I>tmpdir</I>
          changes the default directory for temporary files from the default.
          The default is the directory specified with <B>-l</B> or the system default
          if there <B>-l</B> is not used.  The system default is often <I>/tmp</I>.

     <A NAME="OPTION-D"><B>-D</B></A> <I>local-domain</I>
          specifies a host name by which the system is known.  There can be
          several <B>-D</B> settings.

          To find the per-user log directory and whitelist for each mail
          recipient, <B>dccifd</B> must know each recipient's user name.  The default
          ASCII protocol includes an optional user name with each recipient
          SMTP address.  When that user name is absent or when the subset of
          ESMTP enabled with <B>-o</B> is used, each mail address is checked against
          the list of <B>-D</B> <I>local-domains</I>.  If there is at least one match, the
          part of the recipient address remaining after matching the longest
          <I>local-domain</I> is taken as the user name.  The matching is anchored at
          the right or the end of the recipient address.  It must start at a
          period (.) or at-sign (@) in the domain name part of the address.

     <A NAME="OPTION-r"><B>-r</B></A> <I>rejection-msg</I>
          specifies the rejection message for unsolicited bulk mail or for
          mail temporarily blocked by <I>greylisting</I> when <B>-G</B> is specified.  The
          first <I>rejection-msg</I> replaces the default bulk mail rejection mes-
          sage, "5.7.1 550 mail %s from %s rejected by DCC" The second
          replaces "4.2.1 452 mail %s from %s greylist temporary embargoed".
          There can be zero, one, or two "%s" strings.  The first is replaced
          an empty string and the second is replaced by the IP address of the
          SMTP client.

          A common alternate for the bulk mail rejection message is "4.7.1 451
          Access denied by DCC" to tell the sender to continue trying.  Use a
          4yz response with caution, because it is likely to delay for days a
          delivery failure message for false positives.  If the bulk mail
          rejection message does not start with a recognized error type and
          number, type 5.7.1 and 550 or 4.2.1 and 452 are used.

     <A NAME="OPTION-j"><B>-j</B></A> <I>maxjobs</I>
          limits the number of simultaneous requests that will be processed.
          The default value is the maximum number that seems to be possible
          given the number of open files, select() bit masks, and so forth
          that are available.

     <A NAME="OPTION-B"><B>-B</B></A> <I>dnsbl-option</I>
          enables DNS blacklist checks of the SMTP client IP address, SMTP
          envelope Mail_From sender domain name, and of host names in URLs in
          the message body.  Body URL blacklisting has far too many false pos-
          itives to use on abuse mailboxes.  It is less effective than
          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-
          tions where greylisting cannot be used.

          <I>Dnsbl-option</I> is either of the form <I>set:option</I> or of the form
          <I>domain</I>[<I>,IPaddr</I>[<I>,bltype</I>]].  <I>Domain</I> is a DNS blacklist domain such as
          example.com that will be searched.  <I>IPaddr</I> is the IP address in the
          DNS blacklist that indicates that the mail message is spam.
          127.0.0.1 is assumed if <I>IPaddr</I> is absent.  IPv6 addresses can be
          specified with the usual colon (:) notation.  Names can be used
          instead of numeric addresses.  The type of DNS blacklist is speci-
          fied by <I>bltype</I> as <I>name</I>, <I>IPv4</I>, or <I>IPv6</I>.  Given an envelope sender
          domain name or a domain name in a URL of spam.domain.org and a
          blacklist of type <I>name</I>, spam.domain.org.example.com will be tried.
          Blacklist types of <I>IPv4</I> and <I>IPv6</I> require that the domain name in a
          URL be resolved into an IPv4 or IPv6 address.  The address is then
          written as a reversed string of decimal octets to check the DNS
          blacklist, as in 2.0.0.127.example.com,

          More than one blacklist can be specified.  They are searched in
          order.  All searching is stopped at the first positive result.  Pos-
          itive results are ignored after being logged unless an <I>option</I>
          <I>DNSBL-on</I> line appears in the global or per-user <I>whiteclnt</I> file.

          <B>-B</B> <I>set:debug</I> sends more messages about all DNS resolutions to the
          system log.

          <B>-B</B> <I>set:msg-secs=S</I> limits <B>dccifd</B> to <I>S</I> seconds total for checking all
          DNS blacklists.  The default is 20.

          <B>-B</B> <I>set:URL-secs=S</I> limits <B>dccifd</B> to at most <I>S</I> seconds resolving and
          checking any single URL.  The default is 5.  Some spam contains
          dozens of URLs and that some "spamvertised" URLs contain host names
          that need minutes to resolve.  Busy mail systems cannot afford to
          spend minutes checking each incoming mail message.  In order to use
          typical single-threaded DNS resolver libraries, <B><A HREF="dccm.html">dccm(8)</A></B> and
          <B><A HREF="dccifd.html">dccifd(8)</A></B> use fleets of helper processes.

          <B>-B</B> <I>set:no-envelope</I> says that SMTP client IP addresses and sender
          Mail_From domain names should not be checked in the following black-
          lists.  <B>-B</B> <I>set:envelope</I> restores the default for subsequently named
          blacklists.

          <B>-B</B> <I>set:no-body</I> says that URLs in the message body should not be
          checked in the in the following blacklists.  <B>-B</B> <I>set:body</I> restores
          the default for later blacklists.

          <B>-B</B> <I>set:no-MX</I> says MX servers of sender Mail_From domain names and
          host names in URLs should not be checked in the following black-
          lists.  <B>-B</B> <I>set:MX</I> restores the default.

     <A NAME="OPTION-L"><B>-L</B></A> <I>ltype,facility.level</I>
          specifies how messages should be logged.  <I>Ltype</I> must be <I>error</I> or
          <I>info</I> to indicate which of the two types of messages are being con-
          trolled.  <I>Level</I> must 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>, <I>INFO</I>, and <I>DEBUG</I>.  <I>Facility</I> must be among <I>AUTH</I>,
          <I>AUTHPRIV</I>, <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> through <I>LOCAL7</I>.  The default is equivalent to

                <B>-L</B> <I>info,MAIL.NOTICE</I> <B>-L</B> <I>error,MAIL.ERR</I>

     <B>dccifd</B> normally sends counts of mail rejected and so forth the system log
     at midnight.  The SIGUSR1 signal sends an immediate report to the system
     log.  The reports will be repeated every 24 hours at the same minute as
     the signal instead of at midnight.

   <A NAME="Protocol"><B>Protocol</B></A>
     <B>Dccifd</B> uses a simple ASCII protocol to receive mail messages to be
     checked and to return results.  For each message, the MTA must open a
     connection to the interface daemon, send options, envelope recipients,
     and the message, receive the results, and close the connection.

     Instead of the ASCII protocol, a subset of ESMTP is enabled by <B>-o</B>.  Only
     the familiar HELO, EHLO, Mail, Rcpt, DATA, RSET, and QUIT commands and
     the Postfix extensions XFORWARD and XCLIENT are honored.  Since SMTP has
     no provisions for user names, the protocol enabled by <B>-o</B> depends on a
     list of local domain names specified with <B>-D</B> to find per-user log direc-
     tories and whitelist files.  If neither XFORWARD nor XCLIENT are used,
     <B>dccifd</B> uses the IP address of the MTA and the value of the HELO command.

     In the ASCII protocol, each of the following lines are sent in order to
     <B>dccifd</B>.  Each ends with a newline ('\n') character.
       options     zero or more blank-separated strings among:
                     <I>spam</I>        the message is already known to be spam
                     <I>body</I>        return all of the headers with the added
                                 <I>X-DCC</I> header line and the body
                     <I>header</I>      return the <I>X-DCC</I> header
                     <I>query</I>       ask the DCC server about the message without
                                 reporting it as if <B>dccifd</B> were running with
                                 <B>-Q</B>.
                     <I>grey-query</I>  only query the greylist server for this mes-
                                 sage.  <B>-G</B> <I>on</I> must be in use.
                     <I>no-reject</I>   suppress the overall, one character line 'R'
                                 result.  This can be useful when using <B>dccifd</B>
                                 only for greylisting.
       client      IP address of the SMTP client in a "dotted" or "coloned"
                   ASCII string and reverse-DNS host name.  If the host name
                   is present, it must follow a carriage return character
                   ('\r') after the IP address.  The client IP address must be
                   present and non-null if the host name is present.  If the
                   client IP address is absent, then the IP address and host
                   name are taken from the first Received header if it has the
                   standard "name (name [IP address])..." format.
       HELO        SMTP HELO value or nothing, followed by a newline charac-
                   ter.
       sender      or SMTP <I>Mail</I> <I>From</I> command value
       recipients  or SMTP <I>Rcpt</I> <I>To</I> values followed by corresponding local user
                   names, one pair to a line.  Each optional local user name
                   is separated from the corresponding recipient address by a
                   carriage return ('\r').  A local user name can be null if
                   it is not known.  Recipients that lack local user names
                   will lack per-user log files and will not invoke a per-user
                   whitelist.

     The last recipient-user name pair is followed by an empty line and the
     headers and body of the message.  The end of the body of the mail message
     is signaled by the MTA half-closing the connection.  See <B>shutdown(2)</B>.

     <B>Dccifd</B> responds with three things.  First is a one character line of the
     overall result advising the MTA to
       A    accept the message for all recipients and answer the SMTP DATA
            command with a 2yz result.
       G    answer with a 4yz result to embargo the message for greylisting.
       R    reject the message and answer the DATA command with a 5yz result.
       S    accept the message for some recipients and so answer the DATA com-
            mand with a 2yz result.
       T    temporary failure by the DCC system and so answer with a 4yz
            result.

     Second is a line of 'A', 'G', and 'R' characters indicating that the mes-
     sage should be accepted and delivered or discarded for each corresponding
     recipient.  Limitations in the SMTP protocol allows only a single result
     for the DATA command for all recipients that were not rejected before
     body of the message was offered with the DATA command.  To accept the
     message for some recipients and reject it for others, the MTA must tell
     the SMTP client it is accepting the message for all recipients and then
     discard it for those that would reject it.

     Finally, if the <I>body</I> or <I>header</I> strings are in the first line of <I>options</I>
     sent by the MTA to the daemon, then the <I>X-DCC</I> header line or the entire
     body with the <I>X-DCC</I> header line follows.


</PRE>
<H2><A NAME="FILES">FILES</A></H2><PRE>
     <A NAME="FILE-/var/dcc">/var/dcc</A>    is the DCC home directory in which other files are found.
     <A NAME="FILE-libexec/start">libexec/start</A>-dccifd
                 is a script often used to the daemon.
     <A NAME="FILE-dcc/dcc_conf">dcc/dcc_conf</A>
                 contains parameters used by the scripts to start DCC daemons
                 and cron jobs.
     <A NAME="FILE-logdir">logdir</A>      is an optional directory specified with <B>-l</B> and containing
                 marked mail.  Each file in the directory contains one mes-
                 sage, at least one of whose checksums reached its <B>-t</B> thresh-
                 olds or that is interesting for some other reason.  Each file
                 starts with lines containing the date when the message was
                 received, the IP address of the SMTP client, and SMTP enve-
                 lope values.  Those lines are followed by the body of the
                 SMTP message including its header as it was received.  Only
                 approximately the first 32 KBytes of the body are recorded
                 unless modified by <I>./configure</I> <I>--with-max-log-size=xx</I> The
                 checksums for the message follow the body.  They are followed
                 by lines indicate that one of the checksums is white- or
                 blacklisted by the <B>-w</B> <I>whiteclnt</I> file.  Each file ends with
                 the <I>X-DCC</I> header line added to the message and the disposi-
                 tion of the message.
     <A NAME="FILE-map">map</A>         is the memory mapped file of information concerning DCC
                 servers in the DCC home directory.
     <A NAME="FILE-whiteclnt">whiteclnt</A>   contains the client whitelist in the format described in
                 <B><A HREF="dcc.html">dcc(8)</A></B>.
     <A NAME="FILE-whiteclnt.dccw">whiteclnt.dccw</A>
                 is a memory mapped hash table of the <I>whiteclnt</I> file.
     <A NAME="FILE-dccifd.pid">dccifd.pid</A>  in the <B>-R</B> <I>rundir</I> directory contains daemon's process ID.


</PRE>
<H2><A NAME="SEE-ALSO">SEE ALSO</A></H2><PRE>
     <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>,
     <B><A HREF="dccsight.html">dccsight(8)</A></B>,


</PRE>
<H2><A NAME="HISTORY">HISTORY</A></H2><PRE>
     <A NAME="FILE-Implementation">Implementation</A> of <B>dccifd</B> was started at <A HREF="http://www.rhyolite.com/">Rhyolite Software</A> in 2002.  This
     <A NAME="FILE-describes">describes</A> version 1.2.74.


</PRE>
<H2><A NAME="BUGS">BUGS</A></H2><PRE>
     <B>dccifd</B> uses <B>-t</B> where <B><A HREF="dccproc.html">dccproc(8)</A></B> uses <B>-c</B>.

     <A NAME="FILE-Systems">Systems</A> without <B>setrlimit(2)</B> and <B>getrlimit(2)</B> can have problems with the
     <A NAME="FILE-default">default</A> limit on the number of simultaneous jobs, the value of <B>-j</B>.  Every
     <A NAME="FILE-job">job</A> requires four open files.  These problems are usually seen with
     <A NAME="FILE-errors">errors</A> messages that say something like
           dccifd[24448]: DCC: accept() returned invalid socket
     <A NAME="FILE-A">A</A> fix is to use a smaller value for <B>-j</B> or to allow <B>dccifd</B> to open more
     <A NAME="FILE-files.">files.</A>

FreeBSD 4.9                     March 20, 2005                     FreeBSD 4.9
</PRE>
<HR>
<ADDRESS>
Man(1) output converted with
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
modified for the DCC $Date 2001/04/29 03:22:18 $
</ADDRESS>
</BODY>
</HTML>