.TH dkim-filter.conf 5 "Sendmail, Inc." .SH NAME .B dkim-filter.conf - Configuration file for dkim-filter .SH LOCATION .I /etc/mail/dkim-filter.conf .SH DESCRIPTION .I dkim-filter(8) implements the .B DKIM specification for signing and verifying e-mail messages on a per-domain basis. This file is its configuration file, read on startup only. Blank lines are ignored. Lines containing a hash ("#") character are truncated at the hash character. Other content should be the name of a parameter, followed by white space, followed by the value of that parameter. For parameters which are Boolean in nature, only the first byte of the value is processed. For positive values, the following are accepted: "T", "t", "Y", "y", "1". For negative values, the following are accepted: "F", "f", "N", "n", "0". Many, but not all, of these parameters are also available as command line options to .I dkim-filter(8). However, new parameters are generally not added as command line options so the complete set of options is available here, and thus use of the configuration file is encouraged. In some future release, the set of available command line options is likely to get trimmed. .SH PARAMETERS .TP .I AlwaysSignHeaders (string) Specifies a list of headers which should be included in all signature header lists (the "h=" tag) even if they were not present at the time the signature was generated. The string should be a comma-separated list of header names. The list is empty by default. The purpose of listing an absent header is to prevent its addition between the signer and the verifier, since the verifier would include that header if it were added when performing verification, which would mean the signed message and the verified message were different and the verification would fail. .TP .I AutoRestart (Boolean) Automatically re-start on failures. Use with caution; if the filter fails instantly after it starts, this can cause a tight .I fork(2) loop. .TP .I Background (Boolean) Normally .I dkim-filter forks and exits immediately, leaving the service running in the background. This flag suppresses that behaviour so that it runs in the foreground. .TP .I BodyLengths (Boolean) Requests that .I dkim-filter include the "l=" body length tag when generating signatures. This indicates to the verifier that only a certain amount of the original message was signed, allowing tolerance of things like mailing list managers which append list-specific text to the end of mailings it processes. However, this also enables an abuse attack. See the DKIM specification for more information. .TP .I Canonicalization (string) Selects the canonicalization method(s) to be used when signing messages. When verifying, the message's DKIM-Signature: header specifies the canonicalization method. The recognized values are .I relaxed and .I simple as defined by the DKIM specification. The default is .I simple. The value may include two different canonicalizations separated by a slash ("/") character, in which case the first will be applied to the headers and the second to the body. .TP .I ClockDrift (integer) Sets the tolerance in seconds to be applied when determining whether a signature was either expired or generated in the future. The default is 300. .TP .I Diagnostics (Boolean) Requests the inclusion of "z=" tags in signatures, which encode the original header set for use by verifiers when diagnosing verification failures. Not recommended for normal operation. .TP .I DNSTimeout (integer) Sets the DNS timeout in seconds. A value of 0 causes an infinite wait. The default is 5. Ignored if not using the asynchronous resolver package. See also the NOTES section below. .TP .I Domain (string) A comma-separated list of domains whose mail should be signed by this filter. Mail from other domains will be verified rather than being signed. The value of this parameter may also be a filename from which domain names will be read. The "#" character in such a file is assumed to indicate a comment. An absolute path must be used (i.e. the first character must be a "/"). In either case, the domain name(s) may contain the special character "*" which is treated as a wildcard character matching zero or more characters in a domain name. .TP .I ExternalIgnoreList (string) Identifies a file of "external" hosts which may send mail through the server as one of the signing domains without credentials as such. Basically suppresses the "external host (hostname) tried to send mail as (domain)" log messages. Entries in the file should be of the same form as those of the .I PeerList option below. The list is empty by default. .TP .I KeyFile (string) Gives the location of a PEM-formatted private key to be used for signing all messages. Ignored if .I KeyList is defined. .TP .I KeyList (string) Gives the location of a file listing rules for signing with multiple keys. If present, overrides any .I KeyFile setting in the conifguration file. The file named here should contain a set of lines of the form .I sender-pattern:signing-domain:keypath where .I sender-pattern is a pattern to match against message senders (with the special character "*" interpreted as "zero or more characters"), .I signing-domain is the domain to announce as the signing domain when generating signatures, and .I keypath is the path to the PEM-formatted private key to be used for signing messages which match the .I sender-pattern. The selector used in the signature will be the filename portion of .I keypath. If the file referenced by .I keypath cannot be opened, the filter will try again by appending ".pem" and then ".private" before giving up. .TP .I InternalHosts (string) Identifies a file of internal hosts whose mail should be signed rather than verified. Entries in this file follow the same form as those of the .I PeerList option below. If not specified, the default of "127.0.0.1" is applied. .TP .I MacroList (string) Defines a set of MTA-provided .I macros which should be checked to see if the sender has been determined to be a local user and therefore whether or not the message should be signed. If a .I value is specified, the value of the macro must match a value specified (matching is case-sensitive), otherwise the macro must be defined but may contain any value. The set is empty by default. The general format of the string is .I test1[,test2[,...]] where a "test" is of the form .I macro[=value1[|value2[|...]]]; if one or more value is defined then the macro must be set to one of the listed values, otherwise the macro must be set but can contain any value. .TP .I MaximumHeaders (integer) Defines the maximum number of bytes the header block of a message may consume before the filter will reject the message. This mitigates a denial-of-service attack in which a client connects to the MTA and begins feeding an unbounded number of header fields of arbitrary size; since the filter keeps a cache of these, the attacker could cause the filter to allocate an unspecified amount of memory. The default is 65536; a value of 0 removes the limit. .TP .I MaximumSignedBytes (integer) Specifies the maximum number of bytes of message body to be signed. Messages shorter than this limit will be signed in their entirety. Setting this value forces .I BodyLengths to be "True". .TP .I Minimum (string) Instructs the verification code to fail messages for which a partial signature was received. There are three possible formats: .I min indicating at least .I min bytes of the message must be signed (or if the message is smaller than .I min then all of it must be signed); .I min% requiring that at least .I min percent of the received message must be signed; and .I min+ meaning there may be no more than .I min bytes of unsigned data appended to the message for it to be considered valid. .TP .I Mode (string) Selects operating modes. The string is a concatenation of characters which indicate which mode(s) of operation are desired. Valid modes are .I s (signer) and .I v (verifier). The default is .I sv except in test mode (see the .I dkim-filter(8) man page) in which case the default is .I v. .TP .I MTA (string) A comma-separated list of MTA names (a la the .I sendmail(8) DaemonPortOptions Name parameter) whose mail should be signed by this filter. There is no default. .TP .I OmitHeaders (string) Specifies a list of headers which should be omitted when generating signatures. The string should be a comma-separated list of header names. If an entry in the list names any header which is mandated by the DKIM specification, the entry is ignored. A set of headers is listed in the DKIM specification as "SHOULD NOT" be signed; the default list for this parameter contains those headers (Return-Path, Received, Comments, Keywords, Bcc, Resent-Bcc and DKIM-Signature). To omit no headers, simply use the string "-" (or any string which will match no headers). .TP .I On-BadSignature (string) Selects the action to be taken when a signature fails to validate. Possible values (with abbreviated forms in parentheses): .I accept (a) accept the message; .I discard (d) discard the message; .I tempfail (t) temp-fail the message; .I reject (r) reject the message. The default is .I accept. .TP .I On-Default (string) Selects the action to be taken when any verification or internal error of any kind is encountered. This is processed before the other "On-" values so it can be used as a blanket setting followed by specific overrides. .TP .I On-DNSError (string) Selects the action to be taken when a transient DNS error is encountered. Possible values are the same as those for .I On-BadSignature. The default is .I tempfail. .TP .I On-InternalError (string) Selects the action to be taken when an internal error of some kind is encountered. Possible values are the same as those for .I On-BadSignature. The default is .I tempfail. .TP .I On-NoSignature (string) Selects the action to be taken when a message arrives unsigned. Possible values are the same as those for .I On-BadSignature. The default is .I accept. .TP .I On-Security (string) Selects the action to be taken when a message arrives containing properties that may be a security concern. Possible values are the same as those for .I On-BadSignature. The default is .I tempfail. .TP .I On-SignatureMissing (string) Selects the action to be taken when a message arrives unsigned from a domain which advertises a "we sign everything" policy. Possible values are the same as those for .I On-BadSignature. The default is .I accept. .TP .I PeerList (string) Identifies a file of "peers" which identifies clients whose connections should be accepted without processing by this filter. The file should contain on each line a hostname, domain name (e.g. ".example.com"), IP address, an IPv6 address (including an IPv4 mapped address), or a CIDR-style IP specification (e.g. "192.168.1.0/24"). An entry beginning with a bang ("!") character means "not", allowing exclusions of specific hosts that are otherwise members of larger sets. The order of entries in this file is therefore significant. .TP .I PidFile (string) Specifies the path to a file which should be created at process start containing the process ID. .TP .I POPDBFile (string) Requests that the filter consult a POP authentication database named in the string for IP addresses that should be allowed for signing. The filter must be compiled with the POPAUTH flag to enable this feature, since it adds a library dependency. .TP .I Quarantine (Boolean) Requests that messages which fail verification be quarantined by the MTA. (Requires a sufficiently recent version of the milter library.) .TP .I QueryCache (Boolean) Instructs the DKIM library to maintain its own local cache of keys and policies retrieved from DNS, rather than relying on the nameserver for caching service. Useful if the nameserver being used by the filter is not local. The filter must be compiled with the QUERY_CACHE flag to enable this feature, since it adds a library dependency. .TP .I RemoveARAll (Boolean) Removes all Authentication-Results: header fields which also satisfy the requirements of .I RemoveARFrom below. By default, only those containing a DKIM result are removed. .TP .I RemoveARFrom (string) Lists patterns of hostnames whose Authentication-Results: header fields should be removed before the message is passed for delivery. By default only those headers matching the local host's canonical name will be removed. If more than one pattern is desired, the list should be comma-separated. Matching is only done on full hostnames (e.g. "host.example.com") or on domain names (e.g. ".example.com"). .TP .I RemoveOldSignatures (Boolean) Removes all existing signatures when operating in signing mode. .TP .I SignHeaders (string) Specifies the list of headers which should be included when generating signatures. The string should be a comma-separated list of header names. If the list omits any header which is mandated by the DKIM specification, those headers are implicitly added. By default, all headers present at the time of signing except those which the DKIM specification says "SHOULD NOT" be signed will be included when generating the signature. See the .I OmitHeaders configuration option for more information. .TP .I Selector (string) Defines the name of the selector to be used when signing messages. See the .B DKIM specification for details. Used only when signing with a single key; see the .I KeyList parameter above for more information. .TP .I SendReports (Boolean) If true, when a signature verification fails and the signing site advertises a reporting address (i.e. .I r=user@host in its policy record), the filter will send a structured report to that address containing details needed to reproduce the problem. .TP .I SignatureAlgorithm (string) Selects the signing algorithm to use when generating signatures. If the filter was compiled against version 0.9.8 or later of .B OpenSSL then both .I rsa-sha1 and .I rsa-sha256 are available and the latter is the default. Otherwise, only the former is available and it is (obviously) the default. .TP .I SignatureTTL (integer) Sets the time-to-live, in seconds, of signatures generated by the filter. If not set, no expiration time is added to signatures. .TP .I Socket (string) Specifies the socket that should be established by the filter to receive connections from .I sendmail(8) in order to provide service. .I socketspec is in one of two forms: .I local:path which creates a UNIX domain socket at the specified .I path, or .I inet:port[@host] which creates a TCP socket on the specified .I port. If the .I host is not given as either a hostname or an IP address, the socket will be listening on all interfaces. This option is mandatory either in the configuration file or on the command line. .TP .I StrictTestMode (Boolean) Selects strict CRLF mode during testing (see the .I -t command line flag in the .I dkim-filter(8) man page); messages for which all header fields and body lines are not CRLF-terminated are considered malformed and will produce an error. .TP .I SubDomains (Boolean) Sign subdomains of those listed by the .I Domain parameter as well as the actual domains. .TP .I Syslog (Boolean) Log via calls to .I syslog(3) any interesting activity. .TP .I SyslogSuccess (Boolean) Log via calls to .I syslog(3) additional entries indicating successful signing or verification of messages. .TP .I TestPublicKeys (string) Names a file from which public keys should be read. Intended for use only during automated testing. .TP .I UMask (integer) Requests a specific permissions mask to be used for file creation. This only really applies to creation of the socket when .I Socket specifies a UNIX domain socket, and to the .I PidFile (if any); temporary files are created by the .I mkstemp(3) function which enforces a specific file mode on creation regardless of the process umask. See .I umask(2) for more information. .TP .I UserID (string) Attempts to become the specified userid before starting operations. The value is of the form .I userid[:group]. The process will be assigned all of the groups and primary group ID of the named .I userid unless an alternate .I group is specified. .TP .I UseSSPDeny (Boolean) If "true", requests rejection of messages which are determined to be "suspicious" according to the sending domain's published signing procedure (SSP) record if that record also recommends rejection of such messages. This does not apply if the SSP record advertises that the policy is in test. .TP .I X-Header (Boolean) Causes .I dkim-filter to add a header indicating the presence of this filter in the path of the message from injection to delivery. The product's name, version, and the job ID are included in the header's contents. .SH NOTES When using DNS timeouts (see the .I DNSTimeout option above), be sure not to use a timeout that is larger than the timeout being used for interaction between .I sendmail and the filter. Otherwise, the MTA could abort a message while waiting for a reply from the filter, which in turn is still waiting for a DNS reply. .SH VERSION This man page covers version 2.4.1 of .I dkim-filter. .SH COPYRIGHT Copyright (c) 2007, Sendmail, Inc. and its suppliers. All rights reserved. .SH SEE ALSO .I dkim-filter(8), sendmail(8) .P RFC4871 - DomainKeys Identified Mail .P Authentication-Results Internet Draft