.\" $OpenBSD$ .\" .\" Copyright (c) 2019 Martijn van Duren .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .Dd $Mdocdate$ .Dt FILTER-DKIM 8 .Os .Sh NAME .Nm filter-dkim .Nd add dkim signature to messages .Sh SYNOPSIS .Nm .Op Fl a Ar algorithm .Op Fl c Ar canonicalization .Op Fl h Ar headers .Op Fl t .Op Fl x Ar seconds .Op Fl z .Op Fl Z .Fl d Ar domain .Fl k Ar file .Fl s Ar selector .Sh DESCRIPTION .Nm adds a dkim signature to the message. The following flags are supported: .Bl -tag -width Ds .It Fl a The algorithm to use. This implementation only supports rsa cryptography. Only sha256 should be used for hashing, since other algorithms are most likely not supported by verifiers. Defaults to .Ar rsa-sha256 . .It Fl c The canonicalization algorithm used to sign the messge. Defaults to .Ar simple/simple . .It Fl d The domain where the public key can be found. .It Fl h The email headers which are included in the mail signature. Per RFC this option requires at least the from header to be included. The headers are specified by separating them with a colon. The default is from:reply-to:subject:date:to:cc:resent-date:resent-from:resent-to:resent-cc:in-reply-to:references:list-id:list-help:list-unsubscribe:list-subscribe:list-post:list-owner:list-archive . .It Fl k .Ar file should point to a file containing the RSA private key to sign the messages. .It Fl s The selector within the _domainkey subdomain of .Ar domain where the public key can be found. .It Fl t Add the time of signing to the dkim header. .It Fl x Add the amount of .Ar seconds the signature is valid to the dkim header. .It Fl z Add the mail headers used in the dkim signature to the dkim header. Useful for debugging purposes. .It Fl Z Add all the mail headers to the dkim header. Useful for debugging purposes. .El .Sh SEE ALSO .Xr smtpd 8