File: dccproc.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 (383 lines) | stat: -rw-r--r-- 22,638 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
    <TITLE>dccproc.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="dccproc.html">dccproc(8)</A></B>            Distributed Checksum Clearinghouse            <B><A HREF="dccproc.html">dccproc(8)</A></B>


</PRE>
<H2><A NAME="NAME">NAME</A></H2><PRE>
     <B>dccproc</B> -- Distributed Checksum Clearinghouse Procmail Interface


</PRE>
<H2><A NAME="SYNOPSIS">SYNOPSIS</A></H2><PRE>
     <B>dccproc</B> [<B>-VdAQCHER</B>] [<B>-h</B> <I>homedir</I>] [<B>-m</B> <I>map</I>] [<B>-w</B> <I>whiteclnt</I>] [<B>-T</B> <I>tmpdir</I>]
             [<B>-a</B> <I>IP-address</I>] [<B>-f</B> <I>env</I><B>_</B><I>from</I>] [<B>-t</B> <I>targets</I>]
             [<B>-x</B> <I>exitcode</I>] [<B>-c</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>-i</B> <I>infile</I>] [<B>-o</B> <I>outfile</I>] [<B>-l</B> <I>logdir</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>Dccproc</B> copies a complete SMTP message from standard input or a file to
     standard output or another file.  As it copies the message, it computes
     the DCC checksums for the message, reports them to a DCC server, and adds
     a header line to the message.  Another program such as <B>procmail(1)</B> can
     use the added header line to filter mail.  Dccproc does not support any
     thresholds of its own, because equivalent effects can be achieved with
     regular expressions and you can apply dccproc several times using differ-
     ent DCC servers and then score mail based what all of the DCC servers
     say.

     Error messages are sent to stderr as well as the system log.  Connect
     stderr and stdout to the same file to see errors in context, but direct
     stderr to /dev/null to keep DCC error messages out of the mail.  The <B>-i</B>
     option can also be used to separate the error messages.

     <B>Dccproc</B> sends reports of checksums related to mail received by DCC
     clients and queries about the total number of reports of particular
     checksums.  A DCC server receives no mail, address, headers, or other
     information, but only cryptographically secure checksums of such informa-
     tion.  A DCC server cannot determine the text or other information that
     corresponds to the checksums it receives.  It only acts as a clearing-
     house of counts of checksums computed by clients.

     For the sake of privacy for even the checksums of private mail, the
     checksums of senders of purely internal mail or other mail that is known
     to not be unsolicited bulk can be listed in a whitelist to not be
     reported to the DCC server.

     When <B>sendmail(8)</B> is used, <B><A HREF="dccm.html">dccm(8)</A></B> is a better DCC interface.  <B><A HREF="dccifd.html">Dccifd(8)</A></B>
     is more efficient than <B>dccproc</B> because it is a daemon, but that has costs
     in complexity.  See <B><A HREF="dccsight.html">dccsight(8)</A></B> for a way to use previously computed
     checksums.

   <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 <B>procmail(1)</B> 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.  One causes error messages
          to be sent to STDERR as well as the system log.

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

     <A NAME="OPTION-Q"><B>-Q</B></A>   only queries the DCC server about the checksums of messages instead
          of reporting and then querying.  This is useful when <B>dccproc</B> is used
          to filter mail that has already been reported to a DCC server by
          another DCC client such as <B><A HREF="dccm.html">dccm(8)</A></B>.  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, such as would happen
          if <B>dccproc</B> is not given <B>-Q</B> when processing a stream of mail that has
          already been seen by a DCC client.  Additional reports of a message
          increase its apparent "bulkness."

     <A NAME="OPTION-C"><B>-C</B></A>   outputs only the X-DCC header and the checksums for the message.

     <A NAME="OPTION-H"><B>-H</B></A>   outputs only the X-DCC header.

     <A NAME="OPTION-E"><B>-E</B></A>   adds lines to the start of the log file turned on with <B>-l</B> and <B>-c</B>
          describing what might have been the envelope of the message.  All of
          the information for the envelope lines comes from arguments to
          <B>dccproc</B> including <B>-a</B> and <B>-R</B>.  No lines are generated for which no
          information is available, such as the envelope recipient.

     <A NAME="OPTION-R"><B>-R</B></A>   says the first Received line has a standard "name (name [IP
          address])..."  format and that the address is the IP address of the
          SMTP client that would otherwise be provided with <B>-a</B>.  If the local
          SMTP server adds a Received line with some other format or does not
          add a Received line, the <B>-a</B> option should be used.

     <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-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>new map</B> operation of 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 and
          SMTP headers of mail that do not need X-DCC headers and whose check-
          sums should not be reported to the DCC server.  It can also contain
          checksums of spam.  If the pathname is not absolute, it is relative
          to the DCC home directory.  Thus, individual users with private
          whitelists usually specify them with absolute paths.  Common
          whitelists shared by users must be in the DCC home directory or one
          of its subdirectories and owned by the set-UID user of <B>dccproc</B>.  It
          is useful to <I>include</I> a common or system-wide whitelist in private
          lists.

          The format of the <B>dccproc</B> whiteclnt file is the same as the
          <I>whitelist</I> file required by <B><A HREF="dbclean.html">dbclean(8)</A></B> and <B><A HREF="dccm.html">dccm(8)</A></B>.  Unlike dccm, the
          <B>dccproc</B> whitelist is optional.  Unless <B>-w</B> is used, <B>dccproc</B> uses only
          the whitelist in the DCC server, which is rarely sufficient.

          Because the contents of the <I>whiteclnt</I> file are used frequently, a
          companion file is automatically created and maintained.  It has the
          same pathname but with an added suffix of <I>.dccw</I>.  It contains a mem-
          ory mapped hash table of the main file.

          A local whitelist entry ("OK) or two or more semi-whitelistings
          ("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>dccproc</B>.  Because it is run by or on
          behalf of a single user, <B>dccproc</B> ignores <I>env</I><B>_</B><I>To</I> entries in the
          <I>whiteclnt</I> file.  Users who don't want to use <B>dccproc</B> shouldn't.

     <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-a"><B>-a</B></A> <I>IP-address</I>
          specifies the IP address (not the host name) of the immediately pre-
          vious SMTP client.  It is often not available.  See also <B>-R</B>.

     <A NAME="OPTION-f"><B>-f</B></A> <I>env</I><B>_</B><I>from</I>
          specifies the RFC 821 envelope "Mail From" value with which the mes-
          sage arrived.  It is often not available.  If <B>-f</B> is not present, the
          contents of the first Return-Path: or UNIX style From_ header is
          used.  The <I>env</I><B>_</B><I>from</I> string is often but need not be bracketed with
          "&lt;&gt;".

     <A NAME="OPTION-t"><B>-t</B></A> <I>targets</I>
          specifies the number of addressees of the message if other than 1.
          The string <I>many</I> instead of a number asserts that there were too many
          addressees and that the message is unsolicited bulk email.

     <A NAME="OPTION-x"><B>-x</B></A> <I>exitcode</I>
          specifies the code or status with which <B>dccproc</B> exits if the <B>-c</B>
          thresholds are reached or the <B>-w</B> <I>whiteclnt</I> file blacklists the mes-
          sage, unless the message is whitelisted.

          The default value is EX_NOUSER.  EX_NOUSER is 67 on many systems.
          Use 0 to always exit successfully.

     <A NAME="OPTION-c"><B>-c</B></A> <I>type,</I>[<I>log-thold,</I>]<I>rej-thold</I>
          sets logging and "spam" thresholds for checksum <I>type</I>.  Each logged
          message placed in a separate file in the directory specified with
          <B>-l</B>.  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.  Messages that reach at least
          one of their rejection thresholds or that have complicated combina-
          tions of white- and blacklisting are logged regardless of logging
          thresholds.

          <I>Rej-thold</I> is the threshold at which messages are considered "bulk,"
          and so should cause the X-DCC header line to contain the string
          "bulk" and <B>dccproc</B> to exit with the value set by <B>-x</B>.

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

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

     <A NAME="OPTION-g"><B>-g</B></A> [<I>not-</I>]<I>type</I>
          indicates that white-listed, <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>-c</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.  As many as 6 different substitute headers can be speci-
          fied, but only the checksum of the first of the 6 will be sent to
          the DCC server.

     <A NAME="OPTION-i"><B>-i</B></A> <I>infile</I>
          specifies an input file for the entire message instead of standard
          input.  If not absolute, the pathname is interpreted relative to the
          directory in which <B>dccproc</B> was started.

     <A NAME="OPTION-o"><B>-o</B></A> <I>outfile</I>
          specifies an output file for the entire message including headers
          instead of standard output.  If not absolute, the pathname is inter-
          preted relative to the directory in which <B>dccproc</B> was started.

     <A NAME="OPTION-l"><B>-l</B></A> <I>logdir</I>
          specifies a directory for copies of messages whose checksum target
          counts exceed <B>-c</B> thresholds.  The format of each file is affected by
          <B>-E</B>.  If <I>logdir</I> is not an absolute path, it is relative to the direc-
          tory in which <B>dccproc</B> is started.  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 subdirec-
          tories 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 sec-
          tion below concerning the contents of the files.

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

     <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>dccproc</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>dccproc</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>
          Something like this turns off the log messages:
                <B>-L</B> <I>notice,MAIL.debug</I> <B>-L</B> <I>error,MAIL.DEBUG</I>

     <B>dccproc</B> exits 0 on success and with the <B>-x</B> value if the <B>-c</B> thresholds are
     reached or the <B>-w</B> <I>whiteclnt</I> file blacklists the message.  If at all pos-
     sible, the input mail message is output to standard output or the <B>-o</B>
     <I>outfile</I> despite errors.  If possible, error messages are put into the
     system log instead of being mixed with the output mail message.  The exit
     status is zero for errors so that the mail message will not be rejected.


</PRE>
<H2><A NAME="FILES">FILES</A></H2><PRE>
     <A NAME="FILE-/var/dcc">/var/dcc</A>   DCC home directory in which other files are found.
     <A NAME="FILE-map">map</A>        memory mapped file in the DCC home directory of information
                concerning DCC servers.
     <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 corresponding to the <I>whiteclnt</I>
                file.
     <A NAME="FILE-tmpdir">tmpdir</A>     contains temporary files created and deleted as <B>dccproc</B> pro-
                cesses the message.
     <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 message,
                at least one of whose checksums reached one of its <B>-c</B> thresh-
                olds.  The entire body of the SMTP message including its
                header is followed by the checksums for the message.


</PRE>
<H2><A NAME="EXAMPLES">EXAMPLES</A></H2><PRE>
     <A NAME="FILE-The">The</A> following <B>procmailrc(5)</B> rule adds an X-DCC header to passing mail

         :0 f
         | /usr/local/bin/dccproc -ERw whiteclnt

     <A NAME="FILE-This">This</A> <B>procmailrc(5)</B> recipe rejects mail with total counts of 10 or larger
     <A NAME="FILE-for">for</A> the commonly used checksums:

         :0 fW
         | /usr/local/bin/dccproc -ERw whiteclnt -ccmn,10
         :0 e
         {
             EXITCODE=67
             :0
             /dev/null
         }


</PRE>
<H2><A NAME="SEE-ALSO">SEE ALSO</A></H2><PRE>
     <B><A HREF="cdcc.html">cdcc(8)</A></B>, <B><A HREF="dcc.html">dcc(8)</A></B>, <B><A HREF="dbclean.html">dbclean(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="dccm.html">dccm(8)</A></B>,
     <B><A HREF="dccsight.html">dccsight(8)</A></B>, <B>mail(1)</B>, <B>procmail(1)</B>.


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


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

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>