| 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>dccproc.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 |
</STYLE>
|
| 10 |
</HEAD>
|
| 11 |
<BODY>
|
| 12 |
<PRE>
|
| 13 |
<!-- Manpage converted by man2html 3.0.1 -->
|
| 14 |
<B><A HREF="dccproc.html">dccproc(8)</A></B> Distributed Checksum Clearinghouse <B><A HREF="dccproc.html">dccproc(8)</A></B>
|
| 15 |
|
| 16 |
|
| 17 |
</PRE>
|
| 18 |
<H2><A NAME="NAME">NAME</A></H2><PRE>
|
| 19 |
<B>dccproc</B> -- Distributed Checksum Clearinghouse Procmail Interface
|
| 20 |
|
| 21 |
|
| 22 |
</PRE>
|
| 23 |
<H2><A NAME="SYNOPSIS">SYNOPSIS</A></H2><PRE>
|
| 24 |
<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>]
|
| 25 |
[<B>-a</B> <I>IP-address</I>] [<B>-f</B> <I>env</I><B>_</B><I>from</I>] [<B>-t</B> <I>targets</I>]
|
| 26 |
[<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>]
|
| 27 |
[<B>-S</B> <I>header</I>] [<B>-i</B> <I>infile</I>] [<B>-o</B> <I>outfile</I>] [<B>-l</B> <I>logdir</I>]
|
| 28 |
[<B>-L</B> <I>ltype,facility.level</I>]
|
| 29 |
|
| 30 |
|
| 31 |
</PRE>
|
| 32 |
<H2><A NAME="DESCRIPTION">DESCRIPTION</A></H2><PRE>
|
| 33 |
<B>Dccproc</B> copies a complete SMTP message from standard input or a file to
|
| 34 |
standard output or another file. As it copies the message, it computes
|
| 35 |
the DCC checksums for the message, reports them to a DCC server, and adds
|
| 36 |
a header line to the message. Another program such as <B>procmail(1)</B> can
|
| 37 |
use the added header line to filter mail. Dccproc does not support any
|
| 38 |
thresholds of its own, because equivalent effects can be achieved with
|
| 39 |
regular expressions and you can apply dccproc several times using differ-
|
| 40 |
ent DCC servers and then score mail based what all of the DCC servers
|
| 41 |
say.
|
| 42 |
|
| 43 |
Error messages are sent to stderr as well as the system log. Connect
|
| 44 |
stderr and stdout to the same file to see errors in context, but direct
|
| 45 |
stderr to /dev/null to keep DCC error messages out of the mail. The <B>-i</B>
|
| 46 |
option can also be used to separate the error messages.
|
| 47 |
|
| 48 |
<B>Dccproc</B> sends reports of checksums related to mail received by DCC
|
| 49 |
clients and queries about the total number of reports of particular
|
| 50 |
checksums. A DCC server receives no mail, address, headers, or other
|
| 51 |
information, but only cryptographically secure checksums of such informa-
|
| 52 |
tion. A DCC server cannot determine the text or other information that
|
| 53 |
corresponds to the checksums it receives. It only acts as a clearing-
|
| 54 |
house of counts of checksums computed by clients.
|
| 55 |
|
| 56 |
For the sake of privacy for even the checksums of private mail, the
|
| 57 |
checksums of senders of purely internal mail or other mail that is known
|
| 58 |
to not be unsolicited bulk can be listed in a whitelist to not be
|
| 59 |
reported to the DCC server.
|
| 60 |
|
| 61 |
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>
|
| 62 |
is more efficient than <B>dccproc</B> because it is a daemon, but that has costs
|
| 63 |
in complexity. See <B><A HREF="dccsight.html">dccsight(8)</A></B> for a way to use previously computed
|
| 64 |
checksums.
|
| 65 |
|
| 66 |
<A NAME="OPTIONS"><B>OPTIONS</B></A>
|
| 67 |
The following options are available:
|
| 68 |
|
| 69 |
<A NAME="OPTION-V"><B>-V</B></A> displays the version of the DCC <B>procmail(1)</B> interface.
|
| 70 |
|
| 71 |
<A NAME="OPTION-d"><B>-d</B></A> enables debugging output from the DCC client library. Additional <B>-d</B>
|
| 72 |
options increase the number of messages. One causes error messages
|
| 73 |
to be sent to STDERR as well as the system log.
|
| 74 |
|
| 75 |
<A NAME="OPTION-A"><B>-A</B></A> adds to existing X-DCC headers (if any) of the brand of the current
|
| 76 |
server instead of replacing existing headers.
|
| 77 |
|
| 78 |
<A NAME="OPTION-Q"><B>-Q</B></A> only queries the DCC server about the checksums of messages instead
|
| 79 |
of reporting and then querying. This is useful when <B>dccproc</B> is used
|
| 80 |
to filter mail that has already been reported to a DCC server by
|
| 81 |
another DCC client such as <B><A HREF="dccm.html">dccm(8)</A></B>. This can also be useful when
|
| 82 |
applying a private white or black list to mail that has already been
|
| 83 |
reported to a DCC server. No single mail message be reported to a
|
| 84 |
DCC server more than once per recipient, such as would happen if
|
| 85 |
<B>dccproc</B> is not given <B>-Q</B> when processing a stream of mail that has
|
| 86 |
already been seen by a DCC client. Additional reports of a message
|
| 87 |
increase its apparent "bulkness."
|
| 88 |
|
| 89 |
<A NAME="OPTION-C"><B>-C</B></A> outputs only the X-DCC header and the checksums for the message.
|
| 90 |
|
| 91 |
<A NAME="OPTION-H"><B>-H</B></A> outputs only the X-DCC header.
|
| 92 |
|
| 93 |
<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>
|
| 94 |
describing what might have been the envelope of the message. All of
|
| 95 |
the information for the envelope lines comes from arguments to
|
| 96 |
<B>dccproc</B> including <B>-a</B> and <B>-R</B>. No lines are generated for which no
|
| 97 |
information is available, such as the envelope recipient.
|
| 98 |
|
| 99 |
<A NAME="OPTION-R"><B>-R</B></A> says the first Received line has a standard "name (name [IP
|
| 100 |
address])..." format and that the address is the IP address of the
|
| 101 |
SMTP client that would otherwise be provided with <B>-a</B>. If the local
|
| 102 |
SMTP server adds a Received line with some other format or does not
|
| 103 |
add a Received line, the <B>-a</B> option should be used.
|
| 104 |
|
| 105 |
<A NAME="OPTION-h"><B>-h</B></A> <I>homedir</I>
|
| 106 |
overrides the default DCC home directory, which is often /var/dcc.
|
| 107 |
|
| 108 |
<A NAME="OPTION-m"><B>-m</B></A> <I>map</I>
|
| 109 |
specifies a name or path of the memory mapped parameter file instead
|
| 110 |
of the default <I>map</I> in the DCC home directory. It should be created
|
| 111 |
with the <B>new map</B> operation of the <B><A HREF="cdcc.html">cdcc(8)</A></B> command.
|
| 112 |
|
| 113 |
<A NAME="OPTION-w"><B>-w</B></A> <I>whiteclnt</I>
|
| 114 |
specifies an optional file containing SMTP client IP addresses and
|
| 115 |
SMTP headers of mail that do not need X-DCC headers and whose check-
|
| 116 |
sums should not be reported to the DCC server. It can also contain
|
| 117 |
checksums of spam. If the pathname is not absolute, it is relative
|
| 118 |
to the DCC home directory. Thus, individual users with private
|
| 119 |
whitelists usually specify them with absolute paths. Common
|
| 120 |
whitelists shared by users must be in the DCC home directory or one
|
| 121 |
of its subdirectories and owned by the set-UID user of <B>dccproc</B>. It
|
| 122 |
is useful to <I>include</I> a common or system-wide whitelist in private
|
| 123 |
lists.
|
| 124 |
|
| 125 |
The format of the <B>dccproc</B> whiteclnt file is the same as the
|
| 126 |
<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
|
| 127 |
<B>dccproc</B> whitelist is optional. Unless <B>-w</B> is used, <B>dccproc</B> uses only
|
| 128 |
the whitelist in the DCC server, which is rarely sufficient.
|
| 129 |
|
| 130 |
Because the contents of the <I>whiteclnt</I> file are used frequently, a
|
| 131 |
companion file is automatically created and maintained. It has the
|
| 132 |
same pathname but with an added suffix of <I>.dccw</I>. It contains a mem-
|
| 133 |
ory mapped hash table of the main file.
|
| 134 |
|
| 135 |
A local whitelist entry ("OK) or two or more semi-whitelistings
|
| 136 |
("OK2") for one of the message's checksums prevents all of the mes-
|
| 137 |
sage's checksums from being reported to the DCC server and the addi-
|
| 138 |
tion of a <I>X-DCC</I> header line by <B>dccproc</B>. Because it is run by or on
|
| 139 |
behalf of a single user, <B>dccproc</B> ignores <I>env</I><B>_</B><I>To</I> entries in the
|
| 140 |
<I>whiteclnt</I> file. Users who don't want to use <B>dccproc</B> shouldn't.
|
| 141 |
|
| 142 |
<A NAME="OPTION-T"><B>-T</B></A> <I>tmpdir</I>
|
| 143 |
changes the default directory for temporary files from the default.
|
| 144 |
The default is the directory specified with <B>-l</B> or the system default
|
| 145 |
if there <B>-l</B> is not used. The system default is often <I>/tmp</I>.
|
| 146 |
|
| 147 |
<A NAME="OPTION-a"><B>-a</B></A> <I>IP-address</I>
|
| 148 |
specifies the IP address (not the host name) of the immediately pre-
|
| 149 |
vious SMTP client. It is often not available. See also <B>-R</B>.
|
| 150 |
|
| 151 |
<A NAME="OPTION-f"><B>-f</B></A> <I>env</I><B>_</B><I>from</I>
|
| 152 |
specifies the RFC 821 envelope "Mail From" value with which the mes-
|
| 153 |
sage arrived. It is often not available. If <B>-f</B> is not present, the
|
| 154 |
contents of the first Return-Path: or UNIX style From_ header is
|
| 155 |
used. The <I>env</I><B>_</B><I>from</I> string is often but need not be bracketed with
|
| 156 |
"<>".
|
| 157 |
|
| 158 |
<A NAME="OPTION-t"><B>-t</B></A> <I>targets</I>
|
| 159 |
specifies the number of addressees of the message if other than 1.
|
| 160 |
The string <I>many</I> instead of a number asserts that there were too many
|
| 161 |
addressees and that the message is unsolicited bulk email.
|
| 162 |
|
| 163 |
<A NAME="OPTION-x"><B>-x</B></A> <I>exitcode</I>
|
| 164 |
specifies the code or status with which <B>dccproc</B> exits if the <B>-c</B>
|
| 165 |
thresholds are reached or the <B>-w</B> <I>whiteclnt</I> file blacklists the mes-
|
| 166 |
sage, unless the message is whitelisted.
|
| 167 |
|
| 168 |
The default value is EX_NOUSER. EX_NOUSER is 67 on many systems.
|
| 169 |
Use 0 to always exit successfully.
|
| 170 |
|
| 171 |
<A NAME="OPTION-c"><B>-c</B></A> <I>type,</I>[<I>log-thold,</I>]<I>rej-thold</I>
|
| 172 |
sets logging and "spam" thresholds for checksum <I>type</I>. Each logged
|
| 173 |
message placed in a separate file in the directory specified with
|
| 174 |
<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>,
|
| 175 |
<I>Received</I>, <I>Body</I>, <I>Fuz1</I>, and <I>Fuz2</I>. The string <I>ALL</I> sets thresholds for
|
| 176 |
all types, but is unlikely to be useful except for setting logging
|
| 177 |
thresholds. The string <I>CMN</I> specifies the commonly used checksums
|
| 178 |
<I>Body</I>, <I>Fuz1</I>, and <I>Fuz2</I>. <I>Rej-thold</I> and <I>log-thold</I> must be numbers, the
|
| 179 |
string <I>NEVER</I>, or the string <I>MANY</I> indicating millions of targets.
|
| 180 |
Counts from the DCC server as large as the threshold for any single
|
| 181 |
type are taken as sufficient evidence that the message should be
|
| 182 |
logged or rejected.
|
| 183 |
|
| 184 |
<I>Log-thold</I> is the threshold at which messages are logged. It can be
|
| 185 |
handy to log messages at a lower threshold to find solicited bulk
|
| 186 |
mail sources such as mailing lists. Messages that reach at least
|
| 187 |
one of their rejection thresholds or that have complicated combina-
|
| 188 |
tions of white- and blacklisting are logged regardless of logging
|
| 189 |
thresholds.
|
| 190 |
|
| 191 |
<I>Rej-thold</I> is the threshold at which messages are considered "bulk,"
|
| 192 |
and so should cause the X-DCC header line to contain the string
|
| 193 |
"bulk" and <B>dccproc</B> to exit with the value set by <B>-x</B>.
|
| 194 |
|
| 195 |
The checksums of locally white-listed messages are not checked with
|
| 196 |
the DCC server and so only the number of targets of the current
|
| 197 |
instance of a white-listed message are compared against the thresh-
|
| 198 |
olds.
|
| 199 |
|
| 200 |
The default is <B>-c</B> <I>ALL,NEVER</I>, so that nothing is discarded or logged.
|
| 201 |
A common choice is <B>-c</B> <I>CMN,25,50</I> to reject or discard mail with com-
|
| 202 |
mon bodies except as overridden by the whitelist of the DCC server
|
| 203 |
and <B>-g</B> and <B>-w</B>.
|
| 204 |
|
| 205 |
<A NAME="OPTION-g"><B>-g</B></A> [<I>not-</I>]<I>type</I>
|
| 206 |
indicates that white-listed, <I>OK</I> or <I>OK2</I>, counts from the DCC server
|
| 207 |
for a type of checksum are to be believed. They should be ignored
|
| 208 |
if prefixed with <I>not-</I>. <I>Type</I> is one of the same set of strings as
|
| 209 |
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
|
| 210 |
all three are honored, and hence the need for <I>not-</I>.
|
| 211 |
|
| 212 |
<A NAME="OPTION-S"><B>-S</B></A> <I>hdr</I>
|
| 213 |
adds to the list of substitute or locally chosen headers that are
|
| 214 |
checked with the <B>-w</B> <I>whiteclnt</I> file and sent to the DCC server. The
|
| 215 |
checksum of the last header of type <I>hdr</I> found in the message is
|
| 216 |
checked. As many as 6 different substitute headers can be speci-
|
| 217 |
fied, but only the checksum of the first of the 6 will be sent to
|
| 218 |
the DCC server.
|
| 219 |
|
| 220 |
<A NAME="OPTION-i"><B>-i</B></A> <I>infile</I>
|
| 221 |
specifies an input file for the entire message instead of standard
|
| 222 |
input. If not absolute, the pathname is interpreted relative to the
|
| 223 |
directory in which <B>dccproc</B> was started.
|
| 224 |
|
| 225 |
<A NAME="OPTION-o"><B>-o</B></A> <I>outfile</I>
|
| 226 |
specifies an output file for the entire message including headers
|
| 227 |
instead of standard output. If not absolute, the pathname is inter-
|
| 228 |
preted relative to the directory in which <B>dccproc</B> was started.
|
| 229 |
|
| 230 |
<A NAME="OPTION-l"><B>-l</B></A> <I>logdir</I>
|
| 231 |
specifies a directory for copies of messages whose checksum target
|
| 232 |
counts exceed <B>-c</B> thresholds. The format of each file is affected by
|
| 233 |
<B>-E</B>. If <I>logdir</I> is not an absolute path, it is relative to the direc-
|
| 234 |
tory in which <B>dccproc</B> is started. If <I>logdir</I> starts with <I>D?</I>, log
|
| 235 |
files are put into subdirectories of the form <I>logdir/JJJ</I> where <I>JJJ</I>
|
| 236 |
is the current julian day. <I>H?logdir</I> puts logs files into subdirec-
|
| 237 |
tories of the form <I>logdir/JJJ/HH</I> where <I>HH</I> is the current hour.
|
| 238 |
<I>M?logdir</I> puts log files into subdirectories of the form
|
| 239 |
<I>logdir/JJJ/HH/MM</I> where <I>MM</I> is the current minute. See the FILES sec-
|
| 240 |
tion below concerning the contents of the files.
|
| 241 |
|
| 242 |
The directory is relative to the DCC home directory if it is not
|
| 243 |
absolute
|
| 244 |
|
| 245 |
<A NAME="OPTION-L"><B>-L</B></A> <I>ltype,facility.level</I>
|
| 246 |
specifies how messages should be logged. <I>Ltype</I> must be <I>error</I> or
|
| 247 |
<I>info</I> to indicate which of the two types of messages are being con-
|
| 248 |
trolled. <I>Level</I> must be a <B>syslog(3)</B> level among <I>EMERG</I>, <I>ALERT</I>, <I>CRIT</I>,
|
| 249 |
<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>,
|
| 250 |
<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
|
| 251 |
<I>LOCAL0</I> through <I>LOCAL7</I>. The default is equivalent to
|
| 252 |
<B>-L</B> <I>info,MAIL.NOTICE</I> <B>-L</B> <I>error,MAIL.ERR</I>
|
| 253 |
Something like this turns off the log messages:
|
| 254 |
<B>-L</B> <I>notice,MAIL.debug</I> <B>-L</B> <I>error,MAIL.DEBUG</I>
|
| 255 |
|
| 256 |
<B>dccproc</B> exits 0 on success and with the <B>-x</B> value if the <B>-c</B> thresholds are
|
| 257 |
reached or the <B>-w</B> <I>whiteclnt</I> file blacklists the message. If at all pos-
|
| 258 |
sible, the input mail message is output to standard output or the <B>-o</B>
|
| 259 |
<I>outfile</I> despite errors. If possible, error messages are put into the
|
| 260 |
system log instead of being mixed with the output mail message. The exit
|
| 261 |
status is zero for errors so that the mail message will not be rejected.
|
| 262 |
|
| 263 |
|
| 264 |
</PRE>
|
| 265 |
<H2><A NAME="FILES">FILES</A></H2><PRE>
|
| 266 |
<A NAME="FILE-/var/dcc">/var/dcc</A> DCC home directory in which other files are found.
|
| 267 |
<A NAME="FILE-map">map</A> memory mapped file in the DCC home directory of information
|
| 268 |
concerning DCC servers.
|
| 269 |
<A NAME="FILE-whiteclnt">whiteclnt</A> contains the client whitelist in the format described in
|
| 270 |
<B><A HREF="dcc.html">dcc(8)</A></B>.
|
| 271 |
<A NAME="FILE-whiteclnt.dccw">whiteclnt.dccw</A>
|
| 272 |
is a memory mapped hash table corresponding to the <I>whiteclnt</I>
|
| 273 |
file.
|
| 274 |
<A NAME="FILE-tmpdir">tmpdir</A> contains temporary files created and deleted as <B>dccproc</B> pro-
|
| 275 |
cesses the message.
|
| 276 |
<A NAME="FILE-logdir">logdir</A> is an optional directory specified with <B>-l</B> and containing
|
| 277 |
marked mail. Each file in the directory contains one message,
|
| 278 |
at least one of whose checksums reached one of its <B>-c</B> thresh-
|
| 279 |
olds. The entire body of the SMTP message including its
|
| 280 |
header is followed by the checksums for the message.
|
| 281 |
|
| 282 |
|
| 283 |
</PRE>
|
| 284 |
<H2><A NAME="EXAMPLES">EXAMPLES</A></H2><PRE>
|
| 285 |
<A NAME="FILE-The">The</A> following <B>procmailrc(5)</B> rule adds an X-DCC header to passing mail
|
| 286 |
|
| 287 |
:0 f
|
| 288 |
| /usr/local/bin/dccproc -ERw whiteclnt
|
| 289 |
|
| 290 |
<A NAME="FILE-This">This</A> <B>procmailrc(5)</B> recipe rejects mail with total counts of 10 or larger
|
| 291 |
<A NAME="FILE-for">for</A> the commonly used checksums:
|
| 292 |
|
| 293 |
:0 fW
|
| 294 |
| /usr/local/bin/dccproc -ERw whiteclnt -ccmn,10
|
| 295 |
:0 e
|
| 296 |
{
|
| 297 |
EXITCODE=67
|
| 298 |
:0
|
| 299 |
/dev/null
|
| 300 |
}
|
| 301 |
|
| 302 |
|
| 303 |
</PRE>
|
| 304 |
<H2><A NAME="SEE-ALSO">SEE ALSO</A></H2><PRE>
|
| 305 |
<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>,
|
| 306 |
<B><A HREF="dccsight.html">dccsight(8)</A></B>, <B>mail(1)</B>, <B>procmail(1)</B>.
|
| 307 |
|
| 308 |
|
| 309 |
</PRE>
|
| 310 |
<H2><A NAME="HISTORY">HISTORY</A></H2><PRE>
|
| 311 |
<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
|
| 312 |
<A NAME="FILE-describes">describes</A> version 1.2.50.
|
| 313 |
|
| 314 |
|
| 315 |
</PRE>
|
| 316 |
<H2><A NAME="BUGS">BUGS</A></H2><PRE>
|
| 317 |
<B>dccproc</B> uses <B>-c</B> where <B><A HREF="dccm.html">dccm(8)</A></B> uses <B>-t</B>.
|
| 318 |
|
| 319 |
FreeBSD 4.9 June 13, 2004 FreeBSD 4.9
|
| 320 |
</PRE>
|
| 321 |
<HR>
|
| 322 |
<ADDRESS>
|
| 323 |
Man(1) output converted with
|
| 324 |
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
|
| 325 |
modified for the DCC $Date 2001/04/29 03:22:18 $
|
| 326 |
</ADDRESS>
|
| 327 |
</BODY>
|
| 328 |
</HTML>
|