Skip to content

Amazon SES, Message-ID and mailman

0

Hi,

We are running a mailman 2 mailing list, and recently switch the mail gateway from another company to now use Amazon SES. There's a new problem that the mailman archives are not able to group threads together the way they were before. Users are complaining about issues in their local mail clients. It seems to be related to the mail header fields Message-ID: , References: , and In-Reply-To: . If Amazon SES rewrites the Message-ID, it won't match the original Message-ID, and so the second email won't be matched with the first email in the web archives display. Addtionally, replies are often sent both to the list and to individual participants, and it's critically important that both of these copies have the identical message id.

Is there a way to have Amazon SES not modify the Message-ID header? Or, any other solution to this particular problem?

Thanks, Sam

asked 3 years ago1.2K views

3 Answers
0
Accepted Answer

SES will always rewrite the outgoing Message-ID, but it leaves the References header alone - so if you append the original Message-ID to References before the message hits SES, the recipient's reply will continue to carry the original Message-ID in its References chain - and Mailman's archive should be able to match the replies back to the original.

I wrote a small Postfix milter that does exactly this: milter-autoref (Docker image). It doesn't have anything in it that's specific to Mailman, but if Mailman is sending messages via Postfix which forwards to AWS SES, adding this to the Postfix installation should fix the issue. (Disclosure: I'm the author.)

This should work as long as Mailman is sending messages through a local Postfix installation, not relaying straight to SES SMTP.

answered 3 months ago

0

The following document shows "Message-ID" in the header field, so it is possible to send an email with the same ID.
https://docs.aws.amazon.com/ses/latest/dg/header-fields.html

As described in this document, you can use "SendRawEmail" and include "Message-ID" in the header to send an e-mail with an arbitrary value.
https://docs.aws.amazon.com/ses/latest/dg/send-email-raw.html
https://docs.aws.amazon.com/ses/latest/dg/send-email-concepts-email-format.html#send-email-concepts-email-format-header

EXPERT

answered 3 years ago

0

@jcanyl very clever! In the absence of this fix, years ago, we switched to another product, but certainly wanted to use SES.

answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.