dkimpy-milter.conf(5)
πΈ dkimpy-milter.conf π
(this is the dkimpy-milter.conf(5) page, bestie β File Formats Manual energy β¨)
β¨ NAME β¨
dkimpy-milter β the Python milter that does DKIM signing and validation, no cap π
π VERSION π
1.2.0
π DESCRIPTION π
Okay so dkimpy-milter(8) implements the DKIM specification for signing and verifying e-mail messages on a per-domain basis. And this file? This file is its configuration file. Periodt.
Blank lines are ignored. Lines containing a hash ("#") character are truncated at the hash character, which is how you get comments in the file π«Ά
Other content should be the name of a parameter, followed by white space, followed by the value of that parameter, each on a separate line. That's the whole vibe.
For parameters that 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".
The provided setup.py installs this configuration file in /etc or /usr/local/etc based on the value of expand sysconfigdir= used when the package was installed.
π¨ Command line invocation of parameters as is done by OpenDKIM is not supported. Not a thing. Don't try it, bestie.
π USAGE π
Usage:
dkimpy-milter [/etc/dkimpy-milter/dkimpy-milter.conf]
π¦ OTHER DOCUMENTATION π¦
This documentation assumes you have read Postfix's README_FILES/MILTER_README (or the Sendmail equivalent) and are generally familiar with Domain Keys Identified Mail (DKIM). See RFC 6376 for the deets, iykyk.
β SYNOPSIS β
dkimpy-milter operates with a default installed configuration file and a set of default configuration options that are used if the configuration file cannot be found. These options can be changed by changing the installed configuration files. For users transitioning from OpenDKIM, OpenDKIM config files can be used directly π Not all OpenDKIM options are supported though. If an unsupported option from OpenDKIM is specified, an error will be raised. So like, it will tell you.
π DESCRIPTION π
Configuration options are described here and in the configuration file provided with the package. The provided setup.py installs this configuration file in /etc or /usr/local/etc.
π OPTIONS π
AuthservID(string) β sets the"authserv-id"to use when generating theAuthentication-Results:header field after verifying a message. The default is to use the name of the MTA processing the message. If the string"HOSTNAME"is provided, the name of the host running the filter (as returned by thegethostname(3)function) will be used. cute, right?Canonicalization(string) β selects the canonicalization method(s) to be used when signing messages. When verifying, the message'sDKIM-Signature:header field specifies the canonicalization method, so it's not up to you there. The recognized values arerelaxedandsimpleas defined by the DKIM specification. The default isrelaxed / simple. The value may include two different canonicalizations separated by a slash ("/") character, in which case the first will be applied to the header and the second to the body. slay πDiagnosticDirectory(string) β directory into which to write diagnostic reports when message verification fails. If not set (the default), these files are not generated. The directory must exist βdkimpy-milterwill not create it, and an error will be raised if it does not. [Unlike OpenDKIM, this applies to all messages, not just on messages bearing a"z="tag because dkimpy does not yet support"z="processing.] π«Domain(dataset) β a set of domains whose mail should be signed by this filter. Mail from other domains will be verified rather than being signed.
This parameter is not required if a SigningTable is in use; in that case, the list of signed domains is implied by the lines in that file.
This parameter is ignored if a KeyTable or KeyTableD25119 is defined.
InternalHosts(dataset) β identifies a set of internal hosts whose mail should be signed rather than verified. Entries in this data set follow the same form as those of thePeerListoption below. If not specified, the default of"127.0.0.1"is applied. Naturally, providing a value here overrides the default, so if mail from127.0.0.1should be signed, the list provided here should include that address explicitly. [PeerList NOT IMPLEMENTED]
Mail sent via connections from InternalHosts will not have any existing DKIM signatures verified. This is not overridden by MacroList or Mode. If the Mode is 'v', then no actions will be performed.
KeyFile(string) β gives the location of a PEM-formatted private key to be used for RSA signing all messages. Ignored if aKeyTableis defined.KeyFileEd25519(string) β gives the location of a Ed25519 private key to be used for Ed25519 signing all messages. File is the Base64 encoded output of RFC 8032 Ed25519 private Key generation (as used in dkimpy). Ignored if aKeyTableEd25519is defined.KeyTable(dataset) β gives the location of a file mapping key names to RSA signing keys. If present, overrides anyKeyFilesetting in the configuration file. The data set named here maps each key name to three values: (a) the name of the domain to use in the signature's"d="value; (b) the name of the selector to use in the signature's"s="value; and (c) the path to a file containing a private key. If the first value consists solely of a percent sign ("%") character, it will be replaced by the apparent domain of the sender when generating a signature. The third value must start with a slash ("/") character, or"./"or"../"to indicate it refers to a file from which the private key should be read. TheSigningTable(see below) is used to select records from this table to be used to add signatures based on the message sender.
See the COMPLEX SIGNING CONFIGURATIONS section of README.md for examples.
KeyTableEd25519(dataset) β gives the location of a file mapping key names to Ed25519 signing keys. If present, overrides anyKeyFilesetting in the configuration file. The data set named here maps each key name to three values: (a) the name of the domain to use in the signature's"d="value; (b) the name of the selector to use in the signature's"s="value; and (c) the path to a file containing a private key. If the first value consists solely of a percent sign ("%") character, it will be replaced by the apparent domain of the sender when generating a signature. The third value must start with a slash ("/") character, or"./"or"../"to indicate it refers to a file from which the private key should be read. TheSigningTable(see below) is used to select records from this table to be used to add signatures based on the message sender.
π¨ NOTE: There is a limitation of the current implementation that a private key can't be directly included in the file if it starts with'/','./', or'../'. If you have such a key, you may store it in a file and reference the file in the table. the way that this is a whole workaround π
See the COMPLEX SIGNING CONFIGURATIONS section of README.md for examples.
MacroList(dataset) β defines a set of MTA-provided macros that 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 value is specified matching a macro name in the data set, 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, meaning macros are not considered when making the sign-verify decision. The general format of the value isvalue1[|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.
In order for the macro and its value to be available to the filter for checking, the MTA must send it during the protocol exchange. This is either accomplished via manual configuration of the MTA to send the desired macros or, for MTA/filter combinations that support the feature, the filter can request those macros that are of interest. The latter is a feature negotiated at the time the filter receives a connection from the MTA and its availability depends upon the version of milter used to compile the filter and the version of the MTA making the connection.
Mail sent via connections where macros that are in MacroList are provided will not have any existing DKIM signatures verified. If the Mode is 'v', then no actions will be performed.
MacroListVerify(dataset) β defines a set of MTA-provided macros that should be checked to see if the sender has been determined to be an external source and therefore whether or not the message should be signed. Entries in this data set follow the same form as those of theMacroListoption above. [this option is not inhereted from OpenDKIM]
Mail sent via connections where macros that are in MacroListVerify are provided will be not DKIM signed. If the Mode is 's', then no actions will be performed.
Mode(string) β selects operating modes. The string is a concatenation of characters that indicate which mode(s) of operation are desired. Valid modes ares(signer) andv(verifier). The default issvexcept in test mode (see theopendkim(8)man page) in which case the default isv. When signing mode is enabled, one of the following combinations must also be set: (a)Domain,KeyFile,Selector, noKeyTable, noSigningTable; (b)KeyTable,SigningTable, noDomain, noKeyFile, noSelector;
The action to sign or verify is also affected by the InternalHosts, MacroList, and MacroListVerify options. Those options may preclude signing or verification in some cases, but will not enable signing or verifying if not allowed by Mode. fr fr, Mode is the main character here π₯
MinimumKeyBits(integer) β establishes a minimum key size for acceptable RSA signatures. Signatures with smaller key sizes, even if they otherwise pass DKIM validation, will be marked as invalid. The default is1024, which accepts all signatures. A value of0causes the default to be used. Not Applicable to ed25519 signatures. π«Ά
OmitHeaders(dataset) β okay so this one is a whole set of header fields that should be omitted when youβre generating signatures. If any entry names a header field that the DKIM spec says is mandated, that entry just gets ignored, periodt. The DKIM spec (RFC6376, Section 5.4) lists a bunch of header fields as βSHOULD NOTβ be signed, and the default list for this parameter contains exactly those:Return-Path,Received,Comments,Keywords,Bcc,Resent-Bcc, andDKIM-Signature. Want to omit no headers? Just use the string"."(or literally any string that wonβt match any header field names). And if you specify a list, it replaces the default entirely β unless one entry is"*", in which case the list is treated as a delta to the default. So like"*,+foobar"means the entire default list plusfoobar, while"*,-Bcc"means the entire default list exceptBcc. π
π¨ NOT IMPLEMENTED: OmitHeaders is included for reference only, bestie. Donβt come for me.
DNSOverride(string) β give it a text string, and a verifying milter will use that instead of consulting the DNS on each message. Itβs mainly for testing when changing your systemβs DNS resolution is awkward. Do not use this in production, fr fr. πDNSTimeout(integer) β sets the DNS timeout in seconds. A value of0causes no wait (yes, thatβs different from opendkim). Default is5. Also peep the NOTES section below. β±οΈPeerList(dataset) β this identifies a set of βpeersβ β clients whose connections get accepted without processing by this filter. Each line should have a hostname, domain name (like.example.com), IP address, IPv6 address (including an IPv4 mapped address), or a CIDR-style IP spec (like192.168.1.0/24). An entry starting with a bang (!) means βnotβ, so you can exclude specific hosts that would otherwise be in a bigger set. Host and domain names are matched first, then the IP or IPv6 address depending on connection type. More precise entries win over less precise ones β so192.168.1.1matches before!192.168.1.0/24. IPv6 text form gets forced to lowercase when queried (RFC5952), so keep your data set lowercase too. The IP address part can optionally have square brackets; both forms get checked. π¦
π¨ NOT IMPLEMENTED: PeerList is included for reference only.
PidFile(string) β path to a file that gets created at process start, containing the process ID. If you donβt specify it, no such file is created. No cap. πSelector(string) β defines the name of the selector used when signing messages with RSA. Check the DKIM spec for the deets. This is only used when signing with a single key β see theSigningTableparameter below for more. This parameter is ignored if aKeyTableis defined. πSelectorEd25519(string) β same vibe but for signing messages with Ed25519. See the DKIM spec. Used only when signing with a single key; seeSigningTablebelow. This parameter is ignored if aKeyTableEd25519is defined. β¨SignHeaders(dataset) β the set of header fields that should be included when generating signatures. If your list omits any header field the DKIM spec mandates, those fields get implicitly added. By default, the fields the DKIM spec says βSHOULDβ be signed (RFC6376, Section 5.4) will be signed by the filter. See theOmitHeadersconfiguration option for more about the format and interpretation of this field. πSigningTable(dataset) β this defines a table used to pick a signing identity for a message based on the address in theFrom:header field. Keys vary depending on the table type; values should include one field with a name found in theKeyTable(see above) that says which key to use when generating the signature, plus an optional second field naming the signer of the message thatβll be included in the"i="tag in the generated signature. Note: the"i="value will not be included in the signature if it conflicts with the signing domain (the"d="value). If the first field contains only a%character, it gets replaced by the domain found in theFrom:header field. Same for any%in the optional second field. If this table specifies a regular expression file ("refile"), then the keys are wildcard patterns matched against the address inFrom:. Entries are checked in the order they appear in the file. Note: these are <em>not</em> true regular expressions β the terminology is inherited from opendkim, and only wildcards ("*") are supported. For all other database types, the fulluser@hostis checked first, then justhost, thenuser@.domain(with all superdomains checked in sequence, sofoo.example.comwould first checkuser@foo.example.com, thenuser@.example.com, thenuser@.com), then.domain, thenuser@*, and finally*. In any case, only the first match is applied. See the COMPLEX SIGNING CONFIGURATIONS section ofREADME.mdfor examples. πSocket(string) β the socket the filter should establish to receive connections frompostfix(1)and provide service.socketspecis one of two forms:local:pathcreates a UNIX domain socket at the specified path, orinet:port[@host]/inet6:port[@host]creates a TCP socket on the specified port and in the specified protocol family. If the host isnβt given as a hostname or IP address, the socket listens on all interfaces. A literal IP address must be enclosed in square brackets. This option is mandatory in the configuration file. πSubDomains(Boolean) β sign subdomains of those listed by theDomainparameter as well as the actual domains. πSyslog(Boolean) β log any interesting activity via calls tosyslog(3). πSyslogFacility(string) β log via calls tosyslog(3)using the named facility. Facility names are the same as those allowed insyslog.conf(5). Default is"mail". π¬SyslogSuccess(Boolean) β log additional entries viasyslog(3)indicating successful signing or verification of messages. βUMask(integer) β requests a specific permissions mask for file creation. This really only applies to creating the socket whenSocketspecifies a UNIX domain socket, and to thePidFile(if any). Temporary files are created bymkstemp(3), which enforces a specific file mode on creation regardless of the process umask. Seeumask(2)for more. πUserID(string) β tries to become the specified userid before starting operations. The value isuserid[:group]. The process gets all the groups and the primary group ID of the named userid unless an alternate group is specified. π«Ά
π NOTES π
When youβre using DNS timeouts (peep DNSTimeout above), make sure your timeout isnβt larger than the timeout used for interaction between sendmail and the filter. Otherwise the MTA could abort a message while waiting for a reply from the filter, which is itself still waiting for a DNS reply. Remember the timeout is per DNS lookup, so total DNS wait time can be way longer than the value in DNSTimeout. Thereβs one lookup for the InternalHosts option if itβs in use, and one for DKIM public key record lookup for each algorithm per signature per message (so potentially two lookups per signature). π
π FILES π
/etc/dkimpy-milter/dkimpy-milter.confβ default location of this file.
π AUTHORS π
dkimpy-milter was written by Scott Kitterman scott@kitterman.com. Itβs based on dkim-milter.py. Copyright (c) 2001-2013 Business Management Systems, Inc. Copyright (c) 2013-2015 Stuart D. Gathman. Copyright (c) 2018,2019 Scott Kitterman scott@kitterman.com.
This man-page was created by Scott Kitterman scott@kitterman.com.
π COPYRIGHT π
Configuration items derived from OpenDKIM 2.11.0 opendkim.conf.5.in: Copyright (c) 2007, 2008, Sendmail, Inc. and its suppliers. All rights reserved. See LICENSE.Sendmail.
Copyright (c) 2009-2015, The Trusted Domain Project. All rights reserved. See LICENSE.
Updated for dkimpy-milter. Updates licensed under the same terms as the rest of the package. Copyright (c) 2018,2019 Scott Kitterman scott@kitterman.com.
Thatβs the tea, bestie! This was dkimpy-milter.conf(5), dated 2019-04-25 β go forth and sign with main character energy. π
β¨π¦
π¦ where this page comes from
- debian bookworm: dkimpy-milter 1.2.3-1 Β· GPL-2.0-only
- debian trixie: dkimpy-milter 1.2.3-3 Β· GPL-2.0-only
- ubuntu noble: dkimpy-milter 1.2.3-1 Β· GPL-2.0-only
- ubuntu questing: dkimpy-milter 1.2.3-3
- ubuntu resolute: dkimpy-milter 1.2.3-3build1 Β· GPL-2.0-only
- ubuntu stonking: dkimpy-milter 1.2.3-4 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms