dccm(8)
๐ฆ dccm(8) โ Distributed Checksum Clearinghouse Milter Interface ๐ฆ
From the System Manager's Manual, bestie โ let's get into it.
๐ NAME ๐
dccm โ Distributed Checksum Clearinghouse Milter Interface
โจ SYNOPSIS โจ
dccm [-VdbxANPQ] [-G on | off | noIP | IPmask/xx] [-h homedir] [-I user]
[-p protocol:filename | protocol:port@host] [-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] [-j maxjobs]
[-B dnsbl-option] [-L ltype,facility.level]
๐ธ DESCRIPTION ๐ธ
Okay so dccm is a daemon built with the sendmail milter interface, and its whole thing is connecting sendmail(8) to DCC servers. When it's built with the milter filter machinery and configured to talk to dccm in the sendmail.cf file, sendmail passes all email to dccm, which then reports related checksums to the nearest DCC server. After that, dccm adds an X-DCC SMTP header line to the message. Sendmail is told to reject the message if it is unsolicited bulk mail. Iconic behavior, honestly.
dccm sends reports of checksums related to mail received by DCC clients, plus queries about the total number of reports of particular checksums. A DCC server receives no mail, address, headers, or other information โ only cryptographically secure checksums of such information. A DCC server cannot determine the text or other information that corresponds to the checksums it receives. It only acts as a clearinghouse of counts for checksums computed by clients. Privacy ate. For complete privacy as far as the DCC is concerned, the checksums 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.
Since the checksums of messages that are whitelisted locally by the /var/dcc/whiteclnt file are not reported to the DCC server, dccm knows nothing about the total recipient counts for their checksums and so cannot add X-DCC header lines to such messages. Sendmail does not tell dccm about messages that are not received by sendmail via SMTP, including messages submitted locally and received via UUCP, and so they also do not receive X-DCC header lines. Not me getting left out of the header party ๐ญ
Enable the daemon and put its parameters in the /var/dcc/conf file and start the daemon with the /usr/libexec/start-dccm or /usr/libexec/rcDCC scripts.
The list of servers that dccm 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:
-Vโ displays the version ofdccm. Two or more-Voptions show the options with which it was built.-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."-bโ causes the daemon to not detach itself from the controlling tty and put itself into the background.-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,dccmnormally 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.-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โ The SpamAsassinDCC.pmplugin should watch for "bulk" inX-DCCSMTP header fields, but historically has looked for counts of "many". However, there are situations whendccmknows that a mail message is extremely bulky and probably spam. For example, mail from a sender that is blacklisted in whiteclnt gets anX-DCCheader that includesbulk. To accommodate that bug in SpamAssassin, by default wheneverdccmgenerates anX-DCCheader containing "bulk", it also forces theBodycount to "many".-Pturns off that kludge and theBodycontains the count from the DCC server.-Qโ only queries the DCC server about the checksums of messages instead of reporting. This is useful whendccmis 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 use MXDCC lines in the global /var/dcc/whiteclnt file for your MX mail servers that use DCC than to use -Q with dccm.
Do not use -Q except 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. Fr fr, this one is serious โ do not just sprinkle it around.
-Gon|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.
IPmask/xx and noIP remove part or all of the IP address from the greylist triple.
-hhomedir โ overrides the default DCC home directory,/var/dcc.-Iuser โ specifies the UID and GID of the process.-pprotocol:filename|protocol:port@hostโ specifies the protocol and address by which sendmail will contactdccm. The default is a UNIX domain socket in the "run" directory,/var/run/dcc/dccm. (See also-R) This protocol and address must match the value insendmail.cf. This mechanism can be used to connectdccmon one computer to sendmail on another computer when a port and host name or IP address are used.-mmap โ 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.-wwhiteclnt โ 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 pathname whiteclnt is not absolute, it is relative to the DCC home directory.
The format of the dccm whiteclnt file is the same as the /var/dcc/whitelist files used by dbclean(8) and the whiteclnt file used by dccproc(8). See dcc(8) for a description of DCC white and blacklists. Because the contents of the whiteclnt file are used frequently, a companion file is automatically created and maintained. It has the same pathname but with an added suffix of .dccw and 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 a X-DCC header line by dccm. A whitelist entry for a checksum also prevents rejecting or discarding the message based on DCC recipient counts as specified by -a and -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, an env_To whiteclnt entry of "OK" for the checksum of its recipient address acts like any other whiteclnt 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 whiteclnt file, dccm tries to 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. Messy? Yes. But that's literally the assignment.
-Uuserdirs โ enables per-userwhiteclntfiles and log directories. Each target of a message can have a directory of log files namedusedirs/${dcc_userdir}/logwhere${dcc_userdir}is thesendmail.cfmacro described below. If${dcc_userdir}is not set,userdirs/${rcpt_mailer}/${rcpt_addr}/logis used. The most likely value of mailer islocal. Appropriate values for both${rcpt_mailer}and${rcpt_addr}can be seen by examiningenv_Tolines in-llogdir files. If it is not absolute, userdirs is relative to the DCC home directory. The directory containing the log files must be namedlogand it must be writable by thedccmprocess. 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 thedccmprocess, 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 a cron script that changes the owner of each file to match the grandparentaddrdirectory.
There can also be a per-user whitelist file named userdirs/addr/whiteclnt for each addressee addr. Any checksum that is not white- or blacklisted by an individual addressee's per-user whiteclnt file is checked in the main /var/dcc/whiteclnt file. A missing per-addressee whiteclnt file is the same as an empty file. Relative paths for files included in per-addressee files are resolved in the DCC home directory. The whiteclnt files and the addr directories containing them must be writable by the dccm process.
Option lines in per-user whiteclnt files can be used to modify many aspects of dccm filtering, as described in the main dcc man page. For example, an option dcc-off line turns off DCC filtering for individual mailboxes. Per-user vibes, per-user rules ๐
-aIGNORE|REJECT|DISCARDโ specifies the action taken when 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 accepted and silently DISCARDed without being delivered to local mailboxes. The default is REJECT.
...and okay literally one more thing about -a before we move on ๐
โ mail that gets forwarded via IP addresses marked MX or MXDCC in the main /var/dcc/whiteclnt file? Treated exactly like you'd passed -a DISCARD. It's the anti-bounce move, so spam doesn't go rebound around the internet like a cursed game of hot potato ๐.
Also, and this is the important bit โ the determinations about whether mail is or isn't spam, the ones sendmail passes through the ${dcc_isspam} or ${dcc_notspam} macros? Those override -a. Periodt. And the -w whiteclnt effects are not affected by -a at all, so don't worry about your whitelist getting cooked.
-t type[,log-thold,]rej-tholdโ sets your logging thresholds and your "spam" thresholds for a checksum type ๐. The checksum types areIP,env_From,From,Message-ID,substitute,Received,Body,Fuz1,Fuz2,rep-total, andrep.
The first six โ IP through substitute โ have no effect except when a local DCC server configured with -K is in the mix. And the substitute thresholds apply to the first substitute heading encountered in the mail message, fyi.
There's also the string ALL, which sets thresholds for all types โ but ngl, that's unlikely to be useful except for setting logging thresholds. The string CMN specifies the commonly used checksums Body, Fuz1, and Fuz2, which is the iconic little trio you'll probably actually want โจ.
Rej-thold and log-thold have to be numbers, the string NEVER, or the string MANY, which means millions of targets. Counts from the DCC server that are as large as the threshold for any single type are taken as sufficient evidence that the message should be logged or rejected. So it's like, the threshold is the receipts threshold ๐
.
So log-thold is the threshold where messages get logged. And honestly it can be super handy to log at a lower threshold, because that's how you find solicited bulk mail sources like mailing lists ๐. If no logging threshold is set, then the only things logged are rejected mail and messages with complicated combinations of white and blacklisting. But here's the thing โ messages that reach at least one of their rejection thresholds get logged regardless of the logging thresholds. No cap.
rej-thold is the threshold where messages are considered "bulk," and therefore should be rejected or discarded if they're not whitelisted. That's the whole vibe check right there.
Okay, so โ DCC Reputation thresholds in the commercial version of DCC are controlled by thresholds on the checksum types rep and rep-total. Here's how it goes down: the DCC Reputations of IP addresses that the DCC database says have sent more than rep-total,log-thold are computed, and messages from those addresses are logged. And messages from IP addresses with DCC Reputations of at least the rep,rej-thold rejection 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 to rep,never and rep-total,never,20.
Bulk DCC Reputations do not reject mail unless enabled by an option DCC-rep-on line in a whiteclnt file. So like, don't expect it to just kick in on its own, bestie ๐ซถ.
The checksums of locally whitelisted messages are not checked with the DCC server, so only the number of targets of the current copy of a whitelisted message gets compared against the thresholds.
The default is ALL,NEVER, so nothing is discarded, rejected, or logged. A common choice is CMN,25,50 โ that rejects or discards 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. Basically a whole little committee deciding your fate ๐ธ.
-g [not-]typeโ says that whitelisted,OKorOK2, counts from the DCC server for a type of checksum are to be believed ๐. If it's prefixed withnot-, they should be ignored instead.Typeis one of the same set of strings as for-t. Honestly onlyIP,env_From, andFromare likely choices. By default all three are honored โ yes, all three โ and hence the whole need fornot-in the first place ๐.-S hdrโ adds to the list of substitute (or locally chosen) headers that get checked with the-wwhiteclnt file and sent to the DCC server ๐ฆ. It's the checksum of the last header of type hdr found in the message that gets checked. Hdr can beHELOto specify the SMTP envelope HELO value. Hdr can also bemail_hostto specify the host name from theMail_fromvalue in the SMTP envelope. You can specify as many as 8 different substitute headers โ but heads up, only the checksum of the first one will actually be sent to the DCC server ๐.-l logdirโ specifies a directory where the files containing copies of messages processed bydccmare kept ๐. Those can be copied to per-user directories specified with-U, and info about other recipients of a message gets deleted from the per-user copies (privacy slay).
See the FILES section below concerning the contents of the files. Also see the option log-subdirectory-{day,hour,minute} lines in whiteclnt files described in dcc(8).
The directory is relative to the DCC home directory if it's not absolute, iykyk.
-R rundirโ specifies the "run" directory where the UNIX domain socket and the file containing the daemon's process ID are stored ๐ง. Default value is/var/run/dcc.-r rejection-msgโ specifies the rejection message for unsolicited bulk mail, or for mail temporarily blocked by greylisting when-Gis specified ๐ . Listen, there are three of these and they stack:- 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.
- The first
And if rejection-msg is the zero-length string? The -r setting still gets counted, but the corresponding default message is not changed. Sneaky but valid ๐.
Rejection-msg can contain specific information about the mail message. The following strings starting with % get replaced with the corresponding values:
%IDโ message ID, such as the unique part of the log file name or the 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 the DNS blacklist%BPROBEโ domain name found in the DNS blacklist, such as4.3.2.10.example.com%BRESULTโ value of the%BPROBEdomain name found in the DNS blacklist
A common alternate for the bulk mail rejection message is "4.7.1 451 Access denied by DCC" โ that tells the sending mail system to keep trying ๐ฅ.
Use a 4yz response with caution, because it's likely to delay for days a delivery failure message for false positives. Like, days. Actual days. Don't do that casually ๐ญ.
If the rejection message doesn't start with an RFC 1893 status code and RFC 2821 reply code, then 5.7.1 and 550 are used โ or 4.2.1 and 452.
Also see -B set:rej-msg to set the status message for mail rejected by DNS blacklists ๐
-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. Wanna know what your limit actually is? Startdccmwith-dand go look at the starting message in the system log. It's giving "the limit is whatever the universe allows" โจ.-B dnsbl-optionโ enables DNS white- and blacklist checks of the SMTP client IP address, the SMTP envelopeMail_Fromsender domain name, and host names in URLs in the message body ๐.
Body URL blacklisting has way too many false positives to use on abuse mailboxes. It's less effective than greylisting withdccm(8)ordccifd(8)โ but it can be useful in situations where greylisting can't be used. And yes, it can be combined with greylisting ๐.
Dnsbl-option is either one of the -B set:option forms, or one of these iconic little shapes:
-B domain[any[,bltype]]
-B domain[,IPaddr[/xx[&IPmask][,bltype]]]
-B domain[,IPaddrLO[-IPaddrHI[&IPmask][,bltype]]]
Domain is a DNS blacklist domain such as example.com that will be searched. The strings any, IPaddr, IPaddr/xx, or IPaddrLO-IPaddrHI specify which IP addresses found in the DNS blacklist โ after applying the optional IP address mask IPmask โ say that mail messages should be rejected or accepted with -B set:white. "127.0.0.2" is assumed if no address(es) are specified. IPv6 addresses can be specified with the usual colon (:) notation. Host names can be used instead of numeric addresses ๐.
The type of DNS blacklist is specified by bltype as name, all-names, IPv4, or IPv6. So picture this: given an envelope sender domain name or a domain name in a URL of spam.domain.org, and a blacklist of type name, then spam.domain.org.example.com will be looked up. Meanwhile, the names spam.domain.org.example.com, domain.org.example.com, and org.example.com will all be looked up in blacklists of type all-names. Use name with DNS blacklists that use wildcards, for speed โ but use all-names for the other DNS name blacklists ๐ฆ.
Blacklist types of IPv4 and IPv6 require that the domain name in a URL sender address gets resolved into an IPv4 or IPv6 address. The resolved address from the mail message is then written as a reversed string of decimal octets to check the DNS blacklist โ like 2.0.0.127.example.com. Reversed octets are so real for that ๐.
A domain of "." and a type of name can be used to blacklist domain names with specified addresses. This is genuinely useful for detecting URLs with domain names listed in a Response Policy Zone (RPZ) ๐. For example, the following 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
More than one blacklist can be specified, and blacklists can be grouped with -B set:group=X. All searching within a group of blacklists is stopped at the first positive result โ first hit wins, no further searching, periodt ๐ฏ.
Unlikedccproc(8), positive results are ignored bydccmafter being logged, unless an optionDNSBL-onor optionDNSBLx-online appears in a whiteclnt file. So don't assume a hit does anything on its own, bestie ๐.
-B set:no-clientโ implies that SMTP client IP addresses and reverse DNS domain names should not be checked in the following blacklists. And-B set:clientrestores the default for the following blacklists. Cute little toggle ๐ .-B set:no-mail_hostโ implies that SMTP envelopeMail_Fromsender domain names should not be checked in the following blacklists.-B set:mail_hostrestores the default ๐.-B set:no-URLโ says that URLs in the message body should not be checked in the following blacklists.-B set:URLrestores the default ๐ธ.
okay so the -B set: toggles are basically the DNS-list control panel, and here's the rest of them:
-B set:no-MXโ says MX servers of senderMail_Fromdomain names and host names in URLs should not be checked in the following blacklists.-B set:MXrestores the default.-B set:no-NSโ says DNS servers of senderMail_Fromdomain names and host names in URLs should not be checked in the following blacklists.-B set:NSrestores the default.-B set:whiteโ says the DNS list is a whitelist of names or IP addresses.-B set:blackrestores the default. DNS whitelist usually also need-B set:no-mail_host,-B set:no-URL,-B set:no-MX,-B set:no-NS, and-B set:no-mail_host.-B set:defaultsโ is equivalent to all of-B set:black-B set:client-B set:mail_host-B set:URL-B set:MXand-B set:NS.-B set:group=Xโ adds following DNS blacklists specified with-B domain[...]to group1,2,3, or4.-B set:debug=Xโ sets the DNS blacklist logging level.-B set:msg-secs=Sโ limits dccm toSseconds total for checking all DNS blacklists. The default is25.-B set:URL-secs=Sโ limits dccm to 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.-B set:rej-msg="rejection message"โ sets the SMTP rejection message for the following blacklists.Rejection-msgmust be in the same format as for-r. If rejection message is null, the default is restored. The default DNS blacklist rejection message is the first message set with-r.-B set:max_helpers=Xโ sets maximum number of helper processes toX. In order to use typical single-threaded DNS resolver libraries, dccm uses 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.-B set:progpath=/usr/libexec/dns-helperโ changes the path to the helper program.-L ltype,facility.levelโ specifies how messages should be logged.ltypemust beerror,info, oroffto indicate which of the two types of messages are being controlled or to turn off allsyslog(3)messages from dccm.levelmust be asyslog(3)level amongEMERG,ALERT,CRIT,ERR,WARNING,NOTICE,INFO, andDEBUG.facilitymust 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.
dccm 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. They will be repeated every 24 hours instead of at midnight.
๐ SENDMAIL MACROS ๐
Sendmail can affect dccm with the values of some sendmail.cf macros. These macro names must be added to the Milter.macros option statements in sendmail.cf as in the example "Feature" file dcc.m4.
${dcc_isspam}โ causes a mail message to be reported to the DCC server as having been addressed to"MANY"recipients. The${dcc_isspam}macro is ignored if the${dcc_notspam}macro is set to a non-null string.
If the value of ${dcc_isspam} is null, dccm uses SMTP rejection messages controlled by -a and -r. If the value of the ${dcc_isspam} macro starts with "DISCARD", the mail message is silently discarded as with -a DISCARD. If value of the macro not null and does not start with "DISCARD", it is used as the SMTP error message given to the SMTP client trying to send the rejected message. The message starts with an optional SMTP error type and number followed by text.
The -a option does not affect messages marked spam with ${dcc_isspam}. When the ${dcc_isspam} macro is set, the message is rejected or discarded despite local or DCC database whitelist entries. The local whitelist does control whether the message's checksums will be reported to the DCC server and an X-DCC SMTP header line will be added.
${dcc_notspam}โ causes a message not be considered unsolicited bulk despite evidence to the contrary. It also prevents dccm from reporting the checksums of the message to the DCC server and from adding anX-DCCheader line.
When the macro is set by the sendmail.cf rules, ${dcc_notspam} overrides DCC thresholds that say the message should be rejected as well as the effects of the ${dcc_isspam} macro.
${dcc_mail_host}โ specifies the name of the SMTP client that is sending the message. This macro is usually the same as themail_hostmacro. They can differ when a sendmail "smart relay" is involved. The${dcc_mail_host}macro does not work ifFEATURE(delay_checks)is used, and so dccm falls back onmail_host.${dcc_userdir}โ is the per-user whitelist and log directory for a recipient. If the macro is not set insendmail.cf,$&{rcpt_mailer}/$&{rcpt_addr}is assumed, but with the recipient address converted to lower case. Whatever value is used, the directory name after the last slash (/) character is converted to lower case. Any value containing the string"/../"is ignored.
This macro also does not work if FEATURE(delay_checks) is used.
The following two lines in a sendmail mc file have the same effect as not defining the ${dcc_userdir} macro, provided FEATURE(dcc) is also used and the sendmail cf/feature directory has a symbolic link to the /var/dcc/build/dcc/misc/dcc.m4 file.
SLocal_check_rcpt
R$* $: $1 $(macro {dcc_userdir} $@ $&{rcpt_mailer}/$&{rcpt_addr} $))
๐๏ธ FILES ๐๏ธ
/var/dccโ is the DCC home directory./usr/libexec/start-dccmโ is a script used by/usr/libexec/rcDCCto start dccm.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 by sendmail and without any new or changed header lines. Only approximately the first32 KBytesof the body are recorded unless modified by./configure --with-max-log-size=xx. The checksums for the message follow the body. They are followed by lines indicating that the${dcc_isspam}or${dcc_notspam}sendmail.cfmacros were set or one of the checksums is white- or blacklisted by the-wwhiteclntfile. Each file ends with theX-DCCheader line added to the message and the disposition of the message including SMTP status message if appropriate.mapโ is the memory mapped file of information concerning DCC servers in the DCC home directory. See-m.whiteclntโ contains the client whitelist in the format described indcc(8). See-w.whiteclnt.dccwโ is a memory mapped hash table of the/var/dcc/whiteclntfile./var/run/dcc/dccm.pidโ directory contains daemon's process ID. The string"dccm"is replaced by the file name containing the daemon to facilitate running multiple daemons, probably connected to remote instances of sendmail using TCP/IP instead of a UNIX domain socket. See also-R./var/run/dcc/dccmโ is the default UNIX domain socket used by the sendmail milter interface. See also-R.sendmail.cfโ is thesendmail(8)control file./var/dcc/build/dcc/misc/dcc.m4โ sendmail mc file that should have a symbolic link in the sendmailcf/featuredirectory so thatFEATURE(dcc)can be used in a sendmail mc file.
๐ EXAMPLES ๐
dccm should be started before sendmail with something like the script /usr/libexec/start-dccm. It looks for common DCC parameters in the /var/dcc/dcc_conf file.
Those numbers should be modified to fit local conditions. It might be wise to replace the "100" numbers with much larger values or with "MANY" until a few weeks of monitoring the log directory show that sources of mailing lists are in the server's whitelist file (see dccd(8)) or the local /var/dcc/whiteclnt file.
It is usually necessary to regularly delete old log files with a script like /usr/libexec/cron-dccd.
On systems unlike modern FreeBSD and other UNIX-like systems which include sendmail milter support, sendmail must be built with the milter interface, such as by creating a devtools/Site/site.config.m4 or similar file containing something like the following lines:
APPENDDEF(`conf_sendmail_ENVDEF', `-D_FFR_MILTER=1')
APPENDDEF(`conf_libmilter_ENVDEF', `-D_FFR_MILTER=1')
Appropriate lines invoking the milter interface must be added to sendmail.cf. That can be done by putting a symbolic link to the misc/dcc.m4 file in the DCC source to the sendmail cf/feature directory and adding the line
FEATURE(dcc)
to the local .mc file.
Heads up bestie:dccmshould not be used with the Postfix milter mechanism. Instead usedccifd(8)as a before-queue filter as described in that man page.
๐ SEE ALSO ๐
cdcc(8), dbclean(8), dcc(8), dccd(8), dblist(8), dccifd(8), dccproc(8), dccsight(8), sendmail(8).
๐ HISTORY ๐
Okay so storytime, bestie ๐ซถ โ the whole Distributed Checksum Clearinghouses thing? It's based on an idea of Paul Vixie. Iconic of him, honestly ๐.
The actual implementation of dccm got started over at Rhyolite Software in 2000, which is like... ancient history in internet years ๐ญ. And this very document you're reading? It describes version RHYOLITE_VERSION. Slay, documented and everything โจ.
๐ BUGS ๐
Ngl, there's some stuff you should know before you go off and get surprised ๐.
- So
dccmuses-twheredccproc(8)uses-c. Yeah. The way that these two are just different enough to trip you up is giving chaos ๐ . - Here's a big one ๐ฅ: on systems without
setrlimit(2)andgetrlimit(2)RLIMIT_NOFILE, you can have problems with the default limit on the number of simultaneous jobs, which is the value of-j. Every single job requires four open files โ four!! So do the math, bestie ๐งฎ. - You'll usually clock these problems with error messages that say something like:
dccm[24448]: DCC: accept() returned invalid socket
- The fix? Use a smaller value for
-j, or letdccmopen more files. That's it, that's the whole move ๐. - Sendmail version 8.13 and later can be told to
poll()instead ofselectwithSM_CONF_POLL. Some older versions of sendmail knew aboutFFR_USE_POLLinstead. Either way, one of the following lines in yourdevtools/Site/site.config.m4file can help:
APPENDDEF(`conf_libmilter_ENVDEF', `-DSM_CONF_POLL')
APPENDDEF(`conf_libmilter_ENVDEF', `-DFFR_USE_POLL')
- And on many systems with sendmail 8.11.3 and preceding, there's a bug in the sendmail milter mechanism that causes
dccmto die with a core file when given a signal ๐ญ๐. Like, not a graceful exit, an actual core dump. So rude of it, fr fr.
Okay that's the whole page, you made it to the end bestie!! ๐๐ฆ This was dccm(8), version RHYOLITE_VERSION, dated March 22, 2024 โ go forth and filter your mail, you absolute main character ๐โจ๐ธ
๐ฆ 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