{"id":2356,"date":"2026-05-01T13:59:02","date_gmt":"2026-05-01T12:59:02","guid":{"rendered":"https:\/\/blogs.it.ox.ac.uk\/networks\/?p=2356"},"modified":"2026-05-01T15:05:39","modified_gmt":"2026-05-01T14:05:39","slug":"email-sympa-confirmation-emails-being-rejected-because-of-dkim","status":"publish","type":"post","link":"https:\/\/blogs.it.ox.ac.uk\/networks\/2026\/05\/01\/email-sympa-confirmation-emails-being-rejected-because-of-dkim\/","title":{"rendered":"Email: Sympa Confirmation emails being rejected because of DKIM"},"content":{"rendered":"\n<p>This blog post springs out of some debugging we in Networks Development and Support have been doing to understand why some Sympa email is being rejected by Hotmail, due to a DKIM failure. To get there, it may be good thing to revisit what DKIM is, how it works, and how it fits into email.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The anatomy of an email<\/h2>\n\n\n\n<p>An email should be fairly well understood by most people. Like a formal letter (remember those?) at the top of a message you have the headers which include addresses and metadata *about* the message, then underneath you have the body, basically what you want to say.<br><br>Some headers are very recognizable, such as &#8220;Subject&#8221;, &#8220;From&#8221;, &#8220;Cc&#8221;. They&#8217;re probably the ones that your mail client shows you by default. Other ones are there in the email, but you don&#8217;t tend to see them unless you really look. One of them is &#8220;DKIM-Signature&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"http:\/\/blogs.it.ox.ac.uk\/networks\/files\/2026\/05\/Screenshot_1-5-2026_91047_teams.microsoft.com_.jpeg\"><img loading=\"lazy\" decoding=\"async\" width=\"988\" height=\"1024\" src=\"http:\/\/blogs.it.ox.ac.uk\/networks\/files\/2026\/05\/Screenshot_1-5-2026_91047_teams.microsoft.com_-988x1024.jpeg\" alt=\"A picture describing the anatomy of an email, with headers at the top and the body underneath.\" class=\"wp-image-2365\" srcset=\"https:\/\/blogs.it.ox.ac.uk\/networks\/files\/2026\/05\/Screenshot_1-5-2026_91047_teams.microsoft.com_-988x1024.jpeg 988w, https:\/\/blogs.it.ox.ac.uk\/networks\/files\/2026\/05\/Screenshot_1-5-2026_91047_teams.microsoft.com_-290x300.jpeg 290w, https:\/\/blogs.it.ox.ac.uk\/networks\/files\/2026\/05\/Screenshot_1-5-2026_91047_teams.microsoft.com_-768x796.jpeg 768w, https:\/\/blogs.it.ox.ac.uk\/networks\/files\/2026\/05\/Screenshot_1-5-2026_91047_teams.microsoft.com_.jpeg 1166w\" sizes=\"auto, (max-width: 988px) 100vw, 988px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">The purpose and anatomy of a DKIM-Signature<\/h2>\n\n\n\n<p>The DKIM Signature is not meant to be written by a human, or even added automatically by your mail client like Outlook or Thunderbird. A mail relay server is supposed to receive the message and add this header en-route to the message&#8217;s intended recipient. Its content is a cryptographically secure hash of (amongst other things) the message body. With this signature, the body of the email, if it is altered, will be shown as being altered, and thus you are not to trust its contents. Think of this as a wax seal on a formal letter; any tampering will be immediately obvious to the recipient and the contents should be considered suspect.<\/p>\n\n\n\n<p>Which mail server en-route can sign? In principle any one of them can sign it, but for us at the University of Oxford, we have ownership of the ox.ac.uk domain and so our mail relays are signing for that domain as mail leaves our border.<br><br>Changing the body is one thing, but that&#8217;s not the only thing that&#8217;s important in an email. The Subject is a pretty important header, as is the Date, so they&#8217;re usually added to the signature being signed, but there are so many headers that it doesn&#8217;t make sense to include all of them (they&#8217;re hidden by the<br>mail client anyway). There&#8217;s also the fact that headers can be added to after an email has been sent, for diagnostics and the like.<br><br>So, the takeaway is this: email bodies are signed and cannot change without breaking the signature. In addition, some headers can be included in the signature, but as a general rule, there is more scope for header modification after an email is signed.<br><br>I hope you appreciate that these few paragraphs breeze over a fairly complex process. If you wish to know more, <a href=\"https:\/\/datatracker.ietf.org\/doc\/html\/rfc6376\">RFC 6376<\/a>, with its 75 pages, goes into the full details of DKIM&#8217;s implementation in exquisite detail, and is a cracking read to boot.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The anatomy of a Sympa confirmation email<\/h2>\n\n\n\n<p>Sympa is the maillist software we use at the University of Oxford. It is very flexible and powerful. One feature that people use is message confirmation. Say you are the moderator of a list, and you want it that people can email the list, but you wish to first have a copy of the email sent to you, the moderator, so you can read and accept or reject its distribution to this list.<br><br>Thus, the route of an email [X] is as follows<br><br>[X] from Client -&gt; Sympa -&gt; Moderator receives [Confirm [X]]<br><br>So, the moderator receives an email which has text along the lines &#8220;Do you authorize the distribution of the following email?: [X]&#8221;.<br><br>Here&#8217;s where things get a little more interesting. [Confirm [X]] is a special email in that it has a little preamble text, but after that, embedded inside this email, is another email. This email includes Headers, which from now on I will call Embedded Headers.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"http:\/\/blogs.it.ox.ac.uk\/networks\/files\/2026\/05\/Screenshot_1-5-2026_91117_teams.microsoft.com_.jpeg\"><img loading=\"lazy\" decoding=\"async\" width=\"997\" height=\"1024\" src=\"http:\/\/blogs.it.ox.ac.uk\/networks\/files\/2026\/05\/Screenshot_1-5-2026_91117_teams.microsoft.com_-997x1024.jpeg\" alt=\"A picture describing the anatomy of a Sympa confirmation email, with headers at the top and the body underneath, which itself is a full email message with its own Headers.\" class=\"wp-image-2368\" srcset=\"https:\/\/blogs.it.ox.ac.uk\/networks\/files\/2026\/05\/Screenshot_1-5-2026_91117_teams.microsoft.com_-997x1024.jpeg 997w, https:\/\/blogs.it.ox.ac.uk\/networks\/files\/2026\/05\/Screenshot_1-5-2026_91117_teams.microsoft.com_-292x300.jpeg 292w, https:\/\/blogs.it.ox.ac.uk\/networks\/files\/2026\/05\/Screenshot_1-5-2026_91117_teams.microsoft.com_-768x789.jpeg 768w, https:\/\/blogs.it.ox.ac.uk\/networks\/files\/2026\/05\/Screenshot_1-5-2026_91117_teams.microsoft.com_.jpeg 1271w\" sizes=\"auto, (max-width: 997px) 100vw, 997px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><br>What I think is happening<\/h2>\n\n\n\n<p>If you cast your mind back 30 seconds to when you read my overly simplified explanation of DKIM, you will remember that Headers are at liberty to be modified (to a certain extent) after a DKIM signature has been added to a message. However, Embedded Headers are different. Because they occur inside the<br>body of e.g. [Confirm [X]], they in fact are immutable and must not change after signing.<br><br>However, after some testing done (and my thanks go out to the Unix Platform Services Team for their help with this), I have a repeatable test-case that these Embedded Headers are seemingly being modified after signing, as if they were not embedded, and so DKIM signatures are being broken. Even worse, sometimes mail providers, after changing the order of the Headers, can sometimes reject the email because it has been altered. There may be other providers, but the main reports appear to be from Hotmail domains.<\/p>\n\n\n\n<p>To take a concrete example. We created a Confirmation email and sent identical copies to multiple destinations. One went through a Hotmail-like server and I can verify that the DKIM is broken, the other did not and its DKIM signature remains valid.<br><br>The original email contains in its <strong>Embedded<\/strong> Headers the following, with some details elided:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-style-plain is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Content-Transfer-Encoding: &nbsp;8bit<br>Content-Disposition: inline<br>X-Sympa-To: &lt;maillist-name&gt;@&lt;maillist-domain&gt;<br>To: &lt;maillist-name&gt;@&lt;maillist-domain&gt;<br>Subject: Testing<br>Message-ID: &lt;xukckclq2lqvsm353bukwkiqsaphgvlvuk6lp5cp3wgvy7qa7v@rvkwlaj5km5g&gt;<br>MIME-Version: 1.0<br>Content-Type: text\/plain; charset=us-ascii<br>Content-Disposition: inline<br><\/p>\n<\/blockquote>\n\n\n\n<p>This didn&#8217;t change when I received it at my non-Hotmail email account. Contrast this with the same email when I sent it to a Hotmail-like address:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-style-plain is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Content-Transfer-Encoding: 8bit<br>Content-Disposition: inline<br>X-Sympa-To: &lt;maillist-name&gt;@&lt;maillist-domain&gt;<br>To: &lt;maillist-name&gt;@&lt;maillist-domain&gt;<br>Subject: Testing<br>Message-ID: &lt;xukckclq2lqvsm353bukwkiqsaphgvlvuk6lp5cp3wgvy7qa7v@rvkwlaj5km5g&gt;<br>Content-Type: text\/plain; charset=us-ascii<br>Content-Disposition: inline<br>MIME-Version: 1.0<br><\/p>\n<\/blockquote>\n\n\n\n<p>Notice how the MIME-Version has moved to the end? Reordering headers, again to a certain extent, is perfectly valid to do in a Header section, but this is an Embedded Header and the change results in a change to the Confirm email&#8217;s body, and thus is a DKIM breaking one. Secondly, and harder to spot, did you notice how a space character &#8220;<code> <\/code>&#8221; for the Content-Transfer-Encoding has been removed so &#8220;<code>: 8bit<\/code>&#8221; (two spaces) now becomes &#8220;<code>: 8bit<\/code>&#8221; (one space)? Perfectly valid to do in a Header, but this isn&#8217;t a Header, it&#8217;s in an Embedded Header section.<\/p>\n\n\n\n<p>What happens when a DKIM signature fails? Surprisingly the RFC makes no mention about what a mail relay is to do upon receipt of an email with a DKIM-Signature that fails validation. As such there is no agreed standard, and mail providers do as they please [Aside: you may wish to read up about <a href=\"https:\/\/datatracker.ietf.org\/doc\/html\/rfc7489\">DMARC<\/a> for a standards defined procedure for handling invalid mail, involving DKIM, but that&#8217;s not what is happening here].  It is our understanding that Hotmail can reject messages with a DKIM failure, and this is despite the fact that as far as we can tell, it is Hotmail itself that is altering the body of these messages, causing the failure in the first place.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion and the future<\/h2>\n\n\n\n<p>There isn&#8217;t much of a conclusion here sadly. There are multiple ways in which a DKIM signature can break, and this post goes into a little detail about just one of them. Sadly maillist software such as Sympa have a hard time with DKIM due to the nature of sending mail on behalf of other domains but, in this particular instance at least, there sadly is not much we at the University of Oxford can do as the breakage is outside our systems. At the very least I hope you found this post informative.<br><br>As to what the future holds, this talk about DKIM may be moot. There is currently a DKIM2 standard in the works. One interesting feature it touts is that modifications to email bodies are now allowed, but you are to record (in the Headers) what changes you made. My crystal ball grows hazy when I ask it how quickly this standard will be adopted, but for now at least it looks like a promising step in the right direction.<br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This blog post springs out of some debugging we in Networks Development and Support have been doing to understand why some Sympa email is being rejected by Hotmail, due to a DKIM failure. To get there, it may be good &hellip; <a href=\"https:\/\/blogs.it.ox.ac.uk\/networks\/2026\/05\/01\/email-sympa-confirmation-emails-being-rejected-because-of-dkim\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":136,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19934,9],"tags":[37751],"class_list":["post-2356","post","type-post","status-publish","format-standard","hentry","category-linux","category-mail-relay","tag-oxmail"],"_links":{"self":[{"href":"https:\/\/blogs.it.ox.ac.uk\/networks\/wp-json\/wp\/v2\/posts\/2356","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.it.ox.ac.uk\/networks\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.it.ox.ac.uk\/networks\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.it.ox.ac.uk\/networks\/wp-json\/wp\/v2\/users\/136"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.it.ox.ac.uk\/networks\/wp-json\/wp\/v2\/comments?post=2356"}],"version-history":[{"count":28,"href":"https:\/\/blogs.it.ox.ac.uk\/networks\/wp-json\/wp\/v2\/posts\/2356\/revisions"}],"predecessor-version":[{"id":2455,"href":"https:\/\/blogs.it.ox.ac.uk\/networks\/wp-json\/wp\/v2\/posts\/2356\/revisions\/2455"}],"wp:attachment":[{"href":"https:\/\/blogs.it.ox.ac.uk\/networks\/wp-json\/wp\/v2\/media?parent=2356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.it.ox.ac.uk\/networks\/wp-json\/wp\/v2\/categories?post=2356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.it.ox.ac.uk\/networks\/wp-json\/wp\/v2\/tags?post=2356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}