Use sender domain when generating Message-Id header

For generating Message-Id header ALPS uses github.com/emersion/go-message/mail module. That one generates unique ID and appends machine hostname. While this is correct technically I am thinking of two little suggestions why I'd like to change this behaviour:

  • I'm using rspamd to filter all my emails including outbound messages. It adds this symbol: MID_RHS_NOT_FQDN(0.5) .
  • Machine hostname where ALPS is running is used. I think using sender domain for example domain.tld if sender envelope address is email@domain.tld will satisfy rspamd and possibly other spam filtering apps and it's inline with the setup. Otherwise the ALPS might be moved to another host and similar.
  • Thunderbird on desktop and FairEmail on Android are doing this too, it's why I do like it.



Assigned to
2 years ago
2 years ago

~emersion 2 years ago

go-message/mail uses recommendations from the RFC to generate Message-Ids. The problem with using the From domain is that it's harder to guarantee we won't run into a Message-Id conflict.

~pvagner 2 years ago

I know it's better to use host name of the machine generating the message. It's also good idea to make the message ID end in an FQDN. Sender domain is easier to retrieve than FQDN host name thus I have proposed it. At the end I would just prefer if message-id would contain FQDN and I don't really care much what domain that is.

Thank you