{"result":{"depiction_url":null,"edges":{"observes":{"objects":[{"created":"2026-09-09T13:47:43Z","object_id":{"id":2288,"is_a":["text","documentation","reference","notification"],"name":"doc_notification_email_dkim_options","title":"observe_email_dkim_options\/2","uri":"https:\/\/zotonic.com\/id\/2288"},"seq":1}],"predicate":{"id":2550,"is_a":["meta","predicate"],"name":"observes","title":{"_type":"trans","tr":{"en":"Observes"}},"uri":"https:\/\/zotonic.com\/id\/observes"}},"subject":{"objects":[{"created":"2026-09-09T13:47:43Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-09T13:47:43Z","object_id":{"id":2566,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_operator","title":"Operator","uri":"https:\/\/zotonic.com\/id\/2566"},"seq":2},{"created":"2026-09-09T13:47:43Z","object_id":{"id":2595,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_email_delivery","title":"Email delivery","uri":"https:\/\/zotonic.com\/id\/2595"},"seq":3},{"created":"2026-09-09T13:47:43Z","object_id":{"id":2635,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_module","title":"Module","uri":"https:\/\/zotonic.com\/id\/2635"},"seq":4},{"created":"2026-09-09T13:47:43Z","object_id":{"id":2683,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_dkim","title":"DKIM","uri":"https:\/\/zotonic.com\/id\/2683"},"seq":5},{"created":"2026-09-09T13:47:43Z","object_id":{"id":2685,"is_a":["categorization","keyword","keyword_quality"],"name":"zotonic_topic_security","title":"Security","uri":"https:\/\/zotonic.com\/id\/2685"},"seq":6}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":1343,"is_a":["text","documentation","reference","module"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1343"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_module_mod_email_dkim","page_url":{"en":"https:\/\/zotonic.com\/docs\/1343\/mod_email_dkim","x-default":"https:\/\/zotonic.com\/docs\/1343\/mod_email_dkim"},"preview_url":null,"resource":{"version":3380,"pivot_location_lat":null,"title":"mod_email_dkim","is_authoritative":true,"body":"<p>Signs outgoing e-mails with DomainKeys Identified Mail Signatures (<a href=\"https:\/\/tools.ietf.org\/html\/rfc6376\">RFC 6376<\/a>).<\/p>\n<p>DKIM (DomainKeys Identified Mail) is an important authentication mechanism to help protect both email receivers and\nemail senders from forged and phishing email.<\/p>\n<h2>How does it work?<\/h2>\n<p>DKIM works by signing each e-mail that Zotonic sends with a private key. The public key part is exposed through a DNS\nTXT record, with which email receiver can check whether the email actually originated from the domain that it claimed to\ncome from.<\/p>\n<div class=\"admonition note\"><p class=\"first admonition-title\">Note<\/p><p class=\"last\">The generating of the keypair depends on the <code>openssl<\/code> utility to be available in <code>$PATH<\/code>.<\/p><\/div>\n<p>This RSA keypair is generated automatically when the module is installed, and the private\/public keys are put in the\nsite security directory: <code>security\/$site\/dkim\/dkim.key<\/code> and <code>security\/$site\/dkim\/dkim.pub<\/code>. Existing keys in the old\nsite-local <code>priv\/dkim\/<\/code> location are moved there automatically when needed. When the module is active and the keypair\nhas been generated, outgoing MIME e-mail is signed with DKIM.<\/p>\n<p>The DKIM signature covers the <code>From<\/code>, <code>To<\/code>, <code>Subject<\/code>, <code>Date<\/code>, <code>Sender<\/code>, <code>Reply-To<\/code>, <code>Cc<\/code>, <code>Message-Id<\/code>,\n<code>MIME-Version<\/code>, <code>Content-Type<\/code>, <code>List-Unsubscribe<\/code>, and <code>List-Unsubscribe-Post<\/code> headers. These headers are always\nlisted in the DKIM signature; if a header is missing from the message then DKIM treats it as an empty value, as\ndefined by the standard. This header set follows the recommendations from <a href=\"https:\/\/datatracker.ietf.org\/doc\/html\/rfc6376#section-5.4.1\">RFC 6376 section 5.4.1<\/a>\nand includes the list headers required for one-click unsubscribe support from <a href=\"https:\/\/datatracker.ietf.org\/doc\/html\/rfc8058\">RFC 8058<\/a>.<\/p>\n<h2>DNS configuration<\/h2>\n<p>The receiving e-mail server checks the validity of the signature by doing a DNS lookup. To configure DKIM, you will need\nto add this DNS entry to your domain where you send the mail from.<\/p>\n<p>In the admin, the page <code>\/admin\/email\/dkim<\/code>, available under (“Modules” \/ “DKIM e-mail setup”) provides\ninformation how to configure this DNS entry, including the text to copy-paste into the DNS record.<\/p>\n<h3>DKIM selector<\/h3>\n<p>By default, the DKIM selector is set to the string <code>zotonic<\/code>. This will result in DNS lookups to the\n<code>zotonic._domainkey.yoursite.com<\/code> domain. You can change the selector name by adding a config value called <code>site.dkim_selector<\/code>.<\/p>\n<h2>Accepted Events<\/h2>\n<p>This module handles the following notifier callbacks:<\/p>\n<ul><li><code>observe_email_dkim_options<\/code>: Inject DKIM signing options for outgoing emails when DKIM is configured.<\/li><\/ul>","slug":"mod_email_dkim","doc_module_config":[{"default":"&quot;zotonic&quot;","description":"The DKIM selector to use for signing e-mails. This is used to find the public key in the DNS TXT record.Defaults to &#39;zotonic&#39;.","has_default":true,"key":"dkim_selector","module":"site","type":"string"}],"is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"d43791d53bbf995a5161d629a606de263cac0b0e917fe7c384543c835cd567b2","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":320,"is_a":["meta","category"],"name":"module","title":"Modules","uri":"https:\/\/test.zotonic.com\/id\/320"},"doc_source_path":"apps\/zotonic_mod_email_dkim\/src\/mod_email_dkim.erl","publication_start":"2023-01-30T19:23:54Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_mod_email_dkim\/src\/mod_email_dkim.erl","pivot_location_lng":null,"doc_source_kind":"module","name":"doc_module_mod_email_dkim","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2020-05-30T05:47:19Z","uri":null,"doc_status":"current","is_dependent":false,"erlang_app":"zotonic_mod_email_dkim","publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"28493fb676b2d92727e68d4fba20d89c56cf8ead\n","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-10-15T20:07:19Z","title_slug":"mod_email_dkim"},"uri":"https:\/\/zotonic.com\/id\/1343","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1343"}},"status":"ok"}