Mail::M...g::DKIM(3)

πŸ’– Mail::MIMEDefang::DKIM πŸ’–

okay bestie, gather round, because today we're talking about Mail::MIMEDefang::DKIM, straight out of the Mail::MIMEDefang::DKIM Documentation universe. it's a whole manual page, it's a whole vibe, and yes it's giving "I actually read the docs" energy. πŸŽ€


✨ NAME ✨

Mail::MIMEDefang::DKIM β€” the DKIM interface for MIMEDefang. that's it, that's the name, no notes. πŸ’…


🌸 DESCRIPTION 🌸

so Mail::MIMEDefang::DKIM is a module, and it's literally just a set of DKIM related methods that you call from mimedefang-filter to operate with DKIM. that's the whole deal. it shows up, it does DKIM stuff, it slays. πŸ¦‹


πŸ‘‘ METHODS πŸ‘‘

🫢 md_dkim_sign

this one returns a mail header and the DKIM signature for the message. it's the main character fr. it accepts these parameters:

  • $keyfile β€” the path to the private DKIM key. keep it secret, keep it safe, bestie. πŸ”
  • $algorithm β€” the algorithm used to sign the message. default is 'rsa-sha1'.
  • $method β€” the method used to sign the message. default is 'relaxed/simple'.
  • $domain β€” the domain used when signing the message. default is autodetected, so it just figures it out itself, iconic. ✨
  • $selector β€” the selector used when signing the message. default is 'default'.
  • $headers β€” the headers to sign. by default, the headers are:
From Sender Reply-To Subject Date
Message-ID To Cc MIME-Version
Content-Type Content-Transfer-Encoding Content-ID Content-Description
Resent-Date Resent-From Resent-Sender Resent-To Resent-cc
Resent-Message-ID
In-Reply-To References
List-Id List-Help List-Unsubscribe List-Subscribe
List-Post List-Owner List-Archive

the $headers parameter is a colon separated list of headers to sign, and this is added to the list of default headers as shown in in the DKIM specification. πŸ“

  • $wrap β€” option to enable or disable DKIM header lines wrap. it's enabled by default. 🎁

πŸ’œ md_dkim_verify

this one verifies the DKIM signature of an email. and no, it has no parameters β€” it just does the thing. πŸ’€

the first return value can be "pass", "fail", "invalid", "temperror" or "none".

in case of multiple signatures, the "best" result will be returned.

best is defined as "pass", followed by "fail", "invalid", and "none". ranking order, periodt. πŸ“Š

the second return value is the domain that has applied the signature.

the third return value is the size of the DKIM public key.

the forth return value is the value of the "b" tag of the DKIM signature.

and if the sub is called in scalar context, the $dkim object is returned. boom. 🌈


ok real talk bestie, this is version 3.7.1 dated 2026-07-20, and that's the whole page. go forth and sign your mail, you absolute legend. πŸ«ΆπŸ’–βœ¨
πŸ“¦ where this page comes from