dccifd(8)
๐
dccifd(8) โ Distributed Checksum Clearinghouse Interface Daemon โจ
System Manager's Manual
๐ธ NAME ๐ธ
dccifd โ the Distributed Checksum Clearinghouse Interface Daemon, aka your fave mail-filtering bestie ๐ซถ
โจ SYNOPSIS โจ
dccifd [-VdbxANPQ] [-G on | off | noIP | IPmask/xx] [-h homedir]
[-I user] [-p /sock | lhost,lport,rhost] [-o /sock | host,port]
[-D local-domain] [-m map] [-w whiteclnt] [-U userdirs]
[-a IGNORE | REJECT | DISCARD] [-t type,[log-thold,]rej-thold]
[-g [not-]type] [-S header] [-l logdir] [-R rundir]
[-r rejection-msg] [-T tmpdir] [-j maxjobs]
[-B dnsbl-option] [-L ltype,facility.level]
๐ฆ DESCRIPTION ๐ฆ
Okay so dccifd is this daemon whose whole vibe is connecting spam filters like SpamAssasin and mail transfer agents (MTAs) that are not sendmail to DCC servers. The MTA or filter hands stuff to dccifd, and dccifd reports the related checksums to the nearest DCC server and adds an X-DCC SMTP header line to the message. Then the MTA gets told to reject the message if it's unsolicited bulk. No cap, that's the whole main-character job ๐
dccifd is similar to the DCC sendmail milter interface, dccm(8), and the DCC Procmail interface, dccproc(8). It's more efficient than dccproc(8) but โ unlike dccm(8) โ it is 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. Iconic little trio honestly ๐
MTA programs use a simple ASCII protocol โ a subset of SMTP โ to send a mail message including its SMTP envelope to the daemon. dccifd responds with an indication of whether the message is unsolicited bulk and an optional copy of the message with an X-DCC header added. The ASCII protocol is described below and in the include/dccif.h file in the DCC source. There's a sample C interface routine in the dcclib/dccif.c file in the DCC source and the dcclib.a library generated from the source. A Perl version of the interface routine is in dccifd/dccif.pl. Test or demonstration programs in the style of dccproc(8) that use those interface routines are in /var/dcc/build/dcc/dccifd/dccif-test.
A subset of ESMTP can be used instead of the ASCII protocol to connect dccifd to postfix as a "Before-Queue Content Filter." See the -o flag. Lots of deets below, bestie ๐
Since the checksums of messages that are whitelisted locally by the -w whiteclnt file are not reported to the DCC server, dccifd knows nothing about the total recipient counts for their checksums and so cannot add X-DCC header lines to such messages. That's just how the cookie crumbles ๐ช
Enable the daemon and put its parameters in the /var/dcc/dcc_conf file and start the daemon with the /usr/libexec/rcDCC or /usr/libexec/start-dccifd scripts.
The list of servers that dccifd contacts is in the memory mapped file /var/dcc/map shared by local DCC clients. The file is maintained with cdcc(8).
โจ OPTIONS โจ
The following options are available โ go off, bestie:
-Vโ displays the version ofdccifd. Two or more-Voptions show the options with which it was built. Version reveal moment โจ-dโ enables debugging output from the DCC client software. Additional-doptions increase the number of messages. A single-dlogs aborted SMTP transactions including those from some "dictionary attacks." Spicy little debug trail ๐ฅ-bโ causes the daemon to not detach itself from the controlling tty and put itself into the background. It stays right there with you, lowkey clingy ๐ซถ-xโ 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,dccifdnormally does not delay too long while trying to contact a DCC server. It will not try again for several seconds after a failure. With-x, it will always try to contact the DCC server and it will tell the MTA to answer theDATAcommand with a4yztemporary failure. Extra effort, extra drama ๐-Aโ adds to existingX-DCCheaders in the message instead of replacing existing headers of the brand of the current server.-Nโ neither adds, deletes, nor replaces existingX-DCCheaders in the message. Each mail message is logged, rejected, and otherwise handled the same.-Pโ theSpamAsassinDCC.pmplugin should watch for "bulk" inX-DCCSMTP header fields, but historically has looked for counts of "many". However, there are situations whendccifdknows that a mail message is extremely bulky and probably spam. For example, mail from a sender that is blacklisted inwhiteclntgets anX-DCCheader that includes bulk. To acommodate that bug inSpamAssassin, by default wheneverdccifdgenerates anX-DCCheader containing "bulk", it also forces theBodycount to "many".-Pturns off that kludge and theBodycontains the count from the DCC server. Bug accommodation era ๐ญ-Qโ only queries the DCC server about the checksums of messages instead of reporting. This is useful whendccifdis used to filter mail that has already been reported to a DCC server by another DCC client. 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. It is better to useMXDCClines in the global/var/dcc/whiteclntfile for your MX mail servers that use DCC than to use-Qwithdccifd. Do not use-Qexcept on mail that you know has been reported to a DCC server. DCC depends on reports of all except known private mail and works only because almost no DCC installations use-Q. So likeโฆ proceed with caution, bestie โ ๏ธ-G on | off | noIP | IPmask/xxโ controls greylisting. At least one working greylist server must be listed in the/var/dcc/mapfile. If more than one is named, they must "flood" or change checksums and they must use the same-Gparameters. Seedccd(8). Usually alldccmordccifdDCC client processes use the same-Gparameters. Also,IPmask/xxandnoIPremove part or all of the IP address from the greylist triple.-h homedirโ overrides the default DCC home directory,/var/dcc.-I userโ specifies the UID and GID of the process.-p /sock/name | lhost,lport,rhostโ overrides the default address at which programs contactdccifd. The default is a UNIX domain socket nameddccifdin the DCC home directory. The second form specifies a local host name or IP address, a local TCP port number, and the host name or IP addresses of computers that can usedccifd.127.0.0.1is a common choices forlhost. The string*forlhostspecifiesIN_ADDRANYor all local IP addresses.127.0.0.1is a common choice forrhost, but it can be axxx.xxx.xxx.xxx/mmCIDR block or axxx.xxx.xxx.xxx-yyy.yyy.yyy.yyyrange of IPv4 or IPv6 addresses.-o /sock | host,portโ enables SMTP proxy mode instead of the ASCII protocol and specifies the output connection whendccifdacts as an SMTP proxy. It is the address of the SMTP server for whichdccifdacts as SMTP client. When/sockis/dev/null,dccifdacts as if there were downstream SMTP server that always answers"250 ok". The string@specifies the same IP address as the incoming TCP connection. The input todccifdin SMTP proxy mode is specified with-p. For example,-p 127.0.0.1,10025,127.0.0.1/32 -o 127.0.0.1,10026could be used to connectdccifdwithPostfixas described in the documentation in version 2.2.1 Postfix documentation. See below concerning the subset of ESMTP used in this mode. Proxy mode is giving main character energy ๐-m mapโ specifies a name or path of the memory mapped parameter file instead of the default/var/dcc/map. It should be created with thecdcc(8)command.-w whiteclntโ specifies an optional file containing filtering parameters as well as SMTP client IP addresses, SMTP envelope values, and header values of mail that is spam or is not spam and does not need aX-DCCheader, and whose checksums should not be reported to the DCC server. If the pathnamewhiteclntis not absolute, it is relative to the DCC home directory. The format of thedccifdwhiteclntfile is the same as the/var/dcc/whitelistfiles used bydbclean(8)and thewhiteclntfile used bydccproc(8). Seedcc(8)for a description of DCC white and blacklists. Because the contents of thewhiteclntfile are used frequently, a companion file is automatically created and maintained. It has the same pathname but with an added suffix of.dccwand contains a memory mapped hash table of the main file. A whitelist entry ("OK") or two or more semi-whitelistings ("OK2") for one of the message's checksums prevents all of the message's checksums from being reported to the DCC server and the addition of aX-DCCheader line bydccifd. A whitelist entry for a checksum also prevents rejecting or discarding the message based on DCC recipient counts as specified by-aand-t. 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, anenv_Towhiteclntentry of"OK"for the checksum of its recipient address acts like any otherwhiteclntentry 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 thewhiteclntfile,dccifdtries comply with the wishes of the users who want filtering 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 users who don't want filtering. Complicated but iconic ๐-U userdirsโ enables per-userwhiteclntfiles and log directories. Each target of a message can have a directory of log files nameduserdirs/addr/logwhereaddris the local user or mailbox name computed by the MTA. The name of each user's log directory must belog. If it is not absolute,userdirsis relative to the DCC home directory. The directory containing the log files must be namedlogand it must be writable by thedccifdprocess. Each log directory must exist or logging for the corresponding one is silently disabled. The files created in the log directory are owned by the UID of thedccifdprocess, but they have group and other read and write permissions copied from the corresponding log directory. To ensure the privacy of mail, it may be good to make the directories readable only by owner and group, and to use acronscript that changes the owner of each file to match the grandparentaddrdirectory. Privacy queen behavior ๐
There can also be a per-user whitelist file named userdirs/addr/whiteclnt for each addressee addr, bestie. So like, any checksum that isn't white- or blacklisted by an individual addressee's per-user whiteclnt file gets checked in the main /var/dcc/whiteclnt file. And a missing per-addressee whiteclnt file is literally the same as an empty one, no drama. Relative paths for files included in per-addressee files are resolved in the DCC home directory. Oh and heads up ๐
โ the whiteclnt files and the addr directories containing them have to be writable by the dccifd process.
Option lines in per-user whiteclnt files can be used to modify many aspects of dccifd filtering, as described in the main dcc man page. For example, an option dcc-off line turns off DCC filtering for individual mailboxes. Cute, right? โจ
โจ OPTIONS โจ
-a IGNORE | REJECT | DISCARDโ specifies the action taken whendccifdis in proxy mode with-oand DCC server counts or-tthresholds say that a message is unsolicited and bulk.IGNOREcauses the message to be unaffected except for adding theX-DCCheader line to the message. This turns off all filtering except greylisting.- Spam can also be
REJECTed or, when in proxy mode with-o, accepted and silentlyDISCARDed without being delivered to local mailboxes. The default isREJECT. - Mail forwarded via IP addresses marked
MXorMXDCCin the main/var/dcc/whiteclntfile is treated as if-a DISCARDwere specified. This prevents "bouncing" spam. ๐ - The effects of the
-wwhiteclnt are not affected by-a.
-t type,[log-thold,]rej-tholdโ sets logging and "spam" thresholds for checksum type. The checksum types areIP,env_From,From,Message-ID,substitute,Received,Body,Fuz1,Fuz2,rep-total, andrep.- The first six,
IPthroughsubstitute, have no effect except when a local DCC server configured with-Kis used. - The
substitutethresholds apply to the firstsubstituteheading encountered in the mail message. - The string
ALLsets thresholds for all types, but is unlikely to be useful except for setting logging thresholds. The stringCMNspecifies the commonly used checksumsBody,Fuz1, andFuz2. - Rej-thold and log-thold must be numbers, the string
NEVER, or the stringMANYindicating 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. - Log-thold 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.
- Rej-thold is the threshold at which messages are considered "bulk," and so should be rejected or discarded if not whitelisted.
- DCC Reputation thresholds in the commercial version of DCC are controlled by thresholds on checksum types
repandrep-total. The DCC Reputations of IP addresses that the DCC database says have sent more thanrep-total,log-tholdare computed and messages from those addresses are logged. Messages from IP addresses with DCC Reputations of at least therep,rej-tholdrejection threshold can be rejected. The DCC Reputation of an IP address is the percentage of its messages known to have been sent to at least 10 recipients. The defaults are equivalent torep,neverandrep-total,never,20. - Bulk DCC Reputations do not reject mail unless enabled by an option
DCC-rep-online in a whiteclnt file. - The checksums of locally whitelisted messages are not checked with the DCC server, and so only the number of targets of the current copy of a whitelisted message are compared against the thresholds.
- The default is
ALL,NEVER, so that nothing is discarded, rejected, or logged. A common choice isCMN,25,50to reject or discard mail with common bodies except as overridden by the whitelist of the DCC server, the sendmail${dcc_isspam}and${dcc_notspam}macros, and-g, and-w. ๐
- The first six,
-g [not-]typeโ indicates that whitelisted,OKorOK2, counts from the DCC server for a type of checksum are to be believed. They should be ignored if prefixed withnot-. Type is one of the same set of strings as for-t. OnlyIP,env_From, andFromare likely choices. By default all three are honored, and hence the need fornot-. ๐ซถ-S hdrโ adds to the list of substitute or locally chosen headers that are checked with the-wwhiteclnt file and sent to the DCC server. The checksum of the last header of type hdr found in the message is checked.- Hdr can be
HELOto specify the SMTP envelopeHELOvalue. - Hdr can also be
mail_hostto specify the host name from theMail_fromvalue in the SMTP envelope. - As many as 8 different substitute headers can be specified, but only the checksum of the first will be sent to the DCC server.
- Hdr can be
-l logdirโ specifies a directory in which files containing copies of messages processed bydccifdare kept. They can be copied to per-user directories specified with-U. Information about other recipients of a message is deleted from the per-user copies. ๐ธ- If logdir is in the form
D?dir, log files are put into subdirectories of dir the formdir/JJJwhereJJJis the current julian day.H?dirputs logs files into subdirectories of the formdir/JJJ/HHwhereHHis the current hour.M?dirputs log files into subdirectories of the formdir/JJJ/HH/MMwhereMMis the current minute. - The directory is relative to the DCC home directory if it is not absolute.
- Option
log-subdirectory-{day,hour,minute}lines in whiteclnt files described indcc(8)are an equivalent mechanism for per-user log directories. Also see the FILES section below concerning the contents of log files.
- If logdir is in the form
-R rundirโ specifies the "run" directory where the file containing the daemon's process ID is stored. The default value is/var/run/dcc. ๐-T tmpdirโ changes the default directory for temporary files from the default. The default is the directory specified with-lor the system default if-lis not used. The system default is often/tmp.-D local-domainโ specifies a host or domain name by which the system is known. There can be several-Dsettings.- To find the per-user log directory and whitelist for each mail recipient,
dccifdmust know each recipient's user name. The ASCII protocol used between and the MTA includes an optional user name with each SMTP recipient address. When the user name is absent when the ASCII protocol is used or when the subset of ESMTP enabled with-ois used, and when the SMTP recipient address includes an at sign (@), each mail address is checked against the list of local-domains. The part of the recipient address remaining after longest matching local-domain (if any) is taken as the user name. The match 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. - If local-domain starts with an asterisk (
*) indicating a wildcard, preceding sub-domain names are discarded to compute the user name. Otherwise, the computed user name will include any unmatched sub-domain names. - The default value of local-domain when there are no
-Dsettings is the host name of the system.
- To find the per-user log directory and whitelist for each mail recipient,
-r rejection-msgโ specifies the rejection message in-oproxy mode for unsolicited bulk mail or for mail temporarily blocked by greylisting when-Gis specified.- The first
-r rejection-msgreplaces the default bulk mail rejection message,"5.7.1 550 mail %ID from %CIP rejected by DCC". - The second replaces
"4.2.1 452 mail %ID from %CIP temporary greylist embargoed". - The third
-r rejection-msgreplaces the default SMTP rejection message"5.7.1 550 %ID bulk mail reputation; see https://commercial-dcc.rhyolite.com/cgi-bin/reps.cgi?tgt=%CIP"for mail with bulk DCC Reputations. - If rejection-msg is the zero-length string, the
-rsetting is counted but the corresponding default message is not changed. - Rejection-msg can contain specific information about the mail message. The following strings starting with
%are replaced with the corresponding values:%IDโ message ID such as the unique part of log file name or sendmail queue ID%CIPโ SMTP client IP address%BTYPEโ type of DNS blacklist hit, such as "SMTP client", "mail_host", or "URL NS"%BTGTโ IP address or name declared bad by DNS blacklist%BPROBEโ domain name found in DNS blacklist such as4.3.2.10.example.com%BRESULTโ value of the%BPROBEdomain name found in DNS blacklist
- A common alternate for the bulk mail rejection message is
"4.7.1 451 Access denied by DCC"to tell the sending mail system to continue trying. Use a4yzresponse with caution, because it is likely to delay for days a delivery failure message for false positives. If the rejection message does not start with an RFC 1893 status code and RFC 2821 reply code,5.7.1and550or4.2.1and452are used. - See also
-B set:rej-msgto set the status message for mail rejected by DNS blacklists. ๐
- The first
-j maxjobsโ limits the number of simultaneous requests that will be processed. The default value is the maximum number that seems to be possible given system limits on open files,select()bit masks, and so forth. Startdccifdwith-dand see the starting message in the system log to see the limit. ๐ฅ-B dnsbl-optionโ enables DNS white- and blacklist checks of the SMTP client IP address, SMTP envelopeMail_Fromsender domain name, and of host names in URLs in the message body.-BDnsbl-option โ either one of the-Bset:optionforms, or one of these three shapes:
-B domain[any[,bltype]]
-B domain[,IPaddr[/xx[&IPmask][,bltype]]]
-B domain[,IPaddrLO[-IPaddrHI[&IPmask][,bltype]]]
Domain is a DNS blacklist domain like example.com that's gonna get searched ๐. The strings any, IPaddr, IPaddr/xx, or IPaddrLO-IPaddrHI say which IP addresses found in the DNS blacklist (after applying the optional IP address mask IPmask) mean the mail messages should be rejected โ or accepted, if you're running -B set:white ๐. If you don't specify any address(es), "127.0.0.2" is assumed. IPv6 addresses are totally allowed with the usual colon (:) notation. And host names can be used instead of numeric addresses, iykyk.
The bltype says what kind of DNS blacklist it is: name, all-names, IPv4, or IPv6. So like โ give it an envelope sender domain name, or a domain name in a URL like spam.domain.org, and with a blacklist of type name, it looks up spam.domain.org.example.com. With type all-names, it looks up spam.domain.org.example.com, domain.org.example.com, and org.example.com. Use name with DNS blacklists that use wildcards (for speed โจ) but all-names for other DNS name blacklists. Blacklist types IPv4 and IPv6 require that the domain name in a URL sender address get resolved into an IPv4 or IPv6 address โ then the resolved address from the mail message gets written as a reversed string of decimal octets to check the DNS blacklist, like 2.0.0.127.example.com. Slay.
A domain of "." with type name can be used to blacklist domain names with specified addresses ๐ฏ. This is lowkey useful for detecting URLs with domain names listed in a Response Policy Zone (RPZ). For example, this here can be used to reject mail containing URLs listed by a response policy zone that maps evil domain names to 224.0.0.0, with an informative status message:
'-Bset:rej-msg=5.7.1 550 %ID %BTYPE \
https://example.com/query/dbl?domain=%BTGT'
-B.,224.0.0.0,name
You can specify more than one blacklist, and blacklists can be grouped with -B set:group=X. All searching within a group of blacklists stops at the first positive result ๐.
Unlike dccproc(8), positive results are ignored by dccifd after being logged โ unless an option DNSBL-on or option DNSBLx-on line appears in a whiteclnt file ๐. (Yes, that's the whole drama. Don't forget the whiteclnt line, bestie.)
-Bset:no-clientโ implies that SMTP client IP addresses and reverse DNS domain names should not be checked in the following blacklists ๐ธ.-Bset:clientrestores the default for the following blacklists.-Bset:no-mail_hostโ implies that SMTP envelope Mail_From sender domain names should not be checked in the following blacklists ๐ญ.-Bset:mail_hostrestores the default.-Bset:no-URLโ says that URLs in the message body should not be checked in the following blacklists ๐.-Bset:URLrestores the default.-Bset:no-MXโ says MX servers of sender Mail_From domain names and host names in URLs should not be checked in the following blacklists ๐ฎ.-Bset:MXrestores the default.-Bset:no-NSโ says DNS servers of sender Mail_From domain names and host names in URLs should not be checked in the following blacklists ๐๏ธ.-Bset:NSrestores the default.-Bset:whiteโ says the DNS list is a whitelist of names or IP addresses ๐ค.-Bset:blackrestores the default. DNS whitelists usually also need-Bset:no-mail_host,-Bset:no-URL,-Bset:no-MX,-Bset:no-NS, and-Bset:no-mail_host.-Bset:defaultsโ is equivalent to all of-Bset:black-Bset:client-Bset:mail_host-Bset:URL-Bset:MXand-Bset:NSโจ.-Bset:group=Xโ adds the following DNS blacklists specified with-Bdomain[...]to group1,2,3, or4.-Bset:debug=Xโ sets the DNS blacklist logging level ๐.-Bset:msg-secs=Sโ limitsdccifdtoSseconds total for checking all DNS blacklists. The default is25โฑ๏ธ.-Bset:URL-secs=Sโ limitsdccifdto at mostSseconds resolving and checking any single URL or IP address. The default is11. Some spam contains dozens of URLs, and some "spamvertised" URLs contain host names that need minutes to resolve ๐ญ. Busy mail systems cannot afford to spend minutes checking each incoming mail message. Periodt.-Bset:rej-msg="rejection message"โ sets the SMTP rejection message for the following blacklists. Rejection-msg must be in the same format as for-r. If the rejection message is null, the default is restored. The default DNS blacklist rejection message is the first message set with-r๐ฌ.-Bset:max_helpers=Xโ sets the maximum number of helper processes toX. In order to use typical single-threaded DNS resolver libraries,dccifduses fleets of helper processes ๐ง. It is rarely a good idea to change the default, which is the same as the maximum number of simultaneous jobs set with-j.-Bset:progpath=/usr/libexec/dns-helperโ changes the path to the helper program ๐.-Lltype,facility.level โ specifies how messages should be logged ๐. Ltype must beerror,info, oroffโ to indicate which of the two types of messages are being controlled, or to turn off allsyslog(3)messages fromdccifdentirely. Level must be asyslog(3)level amongEMERG,ALERT,CRIT,ERR,WARNING,NOTICE,INFO, andDEBUG. Facility must be amongAUTH,AUTHPRIV,CRON,DAEMON,FTP,KERN,LPR,MAIL,NEWS,USER,UUCP, andLOCAL0throughLOCAL7. The default is equivalent to:
-L info,MAIL.NOTICE -L error,MAIL.ERR
dccifd normally sends counts of mail rejected and so forth to 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.
๐ฆ Protocol ๐ฆ
Unless SMTP proxy mode is enabled with -o, dccifd 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 -o. 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 -o depends on a list of local domain names specified with -D to find per-user log directories and whitelist files. If neither XFORWARD nor XCLIENT are used, dccifd uses the IP address of the MTA and the value of the HELO command ๐.
okay so in the ASCII protocol, each of these lines gets sent in order to dccifd, and every one ends with a newline ('\n') character. ๐
optionsโ zero or more blank-separated strings among:spamโ the message is already known to be spam.bodyโ return all of the headers with the addedX-DCCheader line and the body.headerโ return theX-DCCheader.cksumsโ returnX-DCCheader and the checksums for the message.queryโ ask the DCC server about the message without reporting it, as ifdccifdwere running with-Q.grey-offโ disable greylisting for this message.grey-queryโ only query the greylist server for this message.-Gon must be in use.no-rejectโ has the same effect as runningdccifdwith-a IGNORE. It suppresses the overall, one character line'R'result. This can be useful when usingdccifdonly for greylisting.logโ ensure that this message is logged as ifdccifdwere running with-t -all,0,.rcvd-nextโ causesdccifdto skip aReceived:header looking for the client IP address and HELO value. Each additionalrcvd-nextoption increases the number ofReceived:headers skipped.MXorMXDCCin the global-w whiteclntfile usually work better.
clientโ IP address of the SMTP client in a "dotted" or "colonel" 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. The string0.0.0.0\nis understood the same as the null string, meaning that both the IP address and host name are absent. If the client IP address is absent, then the IP address and host name are taken from the first non-localReceivedheader if it has the standardname (name [IP address])...format. Non-standardReceivedheaders commonly added by qmail as well asReceivedheaders specifying IP addresses markedMXorMXDCCin the global-w whiteclntfile are skipped.HELOโ SMTP HELO value or nothing, followed by a newline ('\n') character. If the HELO value is null and the IP address of the SMTP client are not supplied, they will be taken from the sameReceived:header that supplies the IP address.senderโ or SMTPMail Fromcommand value for theenv_fromchecksum. If the sender is null, the contents of the firstReturn-Path:or UNIX styleFrom_header is used.recipientsโ or SMTPRcpt Torecipient mailboxes followed by corresponding local user names, one(mailbox,user)pair to a line. Each optional local user name is separated from the corresponding mailbox recipient address by a carriage return ('\r'). A local user name can be null if it is not known, but each recipient mailbox must be non-null. If there are no lines of(mailbox,user)pairs and if thespamoption is not included, then the query is assumed. Mailboxes without user names will lack per-user log files and cannot invoke a per-userwhiteclntfile.
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 shutdown(2).
Dccifd responds with three things. First is a one character line of the overall result advising the MTA:
Aโ accept the message for all recipients and answer the SMTPDATAcommand with a2yzresult.Gโ answer with a4yzresult to embargo the message for greylisting.Rโ reject the message and answer theDATAcommand with a5yzresult.Sโ accept the message for some recipients and so answer theDATAcommand with a2yzresult.Tโ temporary failure by the DCC system and so answer with a4yzresult.
Second is a line of characters indicating the disposition of the message for each corresponding recipient:
Aโ deliver the message.Gโ discard the message during a greylist embargo.Rโ discard the message as spam.
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 body or header strings are in the first line of options sent by the MTA to the daemon, then the X-DCC header line or the entire body with the X-DCC header line follows. โจ
๐พ FILES ๐พ
/var/dccโ is the DCC home directory in which other files are found./usr/libexec/start-dccifdor/usr/libexec/rcDCCโ are scripts used to start the daemon.dcc_confโ contains parameters used by the scripts to start DCC daemons and cron jobs.logdirโ is an optional directory specified with-land containing marked mail. Each file in the directory contains one message, at least one of whose checksums reached its-tthresholds 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 envelope 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./configure --with-max-log-size=xxThe checksums for the message follow the body. They are followed by lines indicate that one of the checksums is white- or blacklisted by the-w whiteclntfile. Each log file ends with theX-DCCheader line added to the message and the disposition of the message.mapโ is the memory mapped file of information concerning DCC servers in the DCC home directory.whiteclntโ contains the client whitelist in the format described indcc(8).whiteclnt.dccwโ is a memory mapped hash table of the/var/dcc/whiteclntfile.dccifd.pidโ in the-Rrundir directory contains daemon's process ID.
๐งช EXAMPLES ๐งช
Dccifd can be used as Postfix Before-Queue Content filter. In some tests these values for -p and -o in /var/dcc/dcc_conf.
DCCIFD_ENABLE=on
DCCIFD_ARGS="-p 127.0.0.1,10025,127.0.0.1/32 -o 127.0.0.1,10026 ..."
worked with these lines in /etc/postfix/master.cf
smtp inet n - n - - smtpd
-o smtpd_proxy_filter=127.0.0.1:10025
127.0.0.1:10026 inet n - n - - smtpd
-o smtpd_authorized_xforward_hosts=127.0.0.0/8
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o smtpd_data_restrictions=
-o mynetworks=127.0.0.0/8
-o receive_override_options=no_unknown_recipient_checks
๐ SEE ALSO ๐
cdcc(8), dbclean(8), dcc(8), dccd(8), dblist(8), dccm(8), dccproc(8), dccsight(8),
๐ฐ๏ธ HISTORY ๐ฐ๏ธ
Implementation of dccifd Distributed Checksum Clearinghouses are based on an idea of Paul Vixie with code designed and written at Rhyolite Software starting in 2000. was started at Rhyolite Software in 2002. This document describes version RHYOLITE_VERSION. ๐ฆ
๐ BUGS ๐
dccifd uses -t where dccproc(8) uses -c.
By default dccifd look for its UNIX domain socket in the DCC home directory, but dccm(8) looks in its -R rundir.
Systems without setrlimit(2) and getrlimit(2) RLIMIT_NOFILE can have problems with the default limit on the number of simultaneous jobs, the value of -j. Every job requires four open files. These problems are usually seen with errors messages that say something like
dccifd[24448]: DCC: accept(): Result too large
A fix is to use a smaller value for -j or to allow dccifd to open more files.
okay that's the whole dccifd(8) page, bestie โ footer vibe check: March 22, 2024, source/version dccifd(8). slay, bye! ๐โจ
๐ฆ where this page comes from
- alpine 3.24: dcc-doc 2.3.169-r3 ยท custom
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms