drewr / postal

Clojure email support
MIT License
586 stars 85 forks source link

Message-ID: must be bracketed with <> #29

Closed dlowe closed 11 years ago

dlowe commented 11 years ago

When we upgraded to postal 1.9.0, we found that our messages' Message-ID headers were being discarded by some recipient domains (e.g. google). After some thrashing, it turns out this is because they're non-standard, e.g.:

Message-ID: RjWMglgZsW4ZqfqcfkszNA.1350410745612@postal.woot.local

This causes DKIM signature problems for us. This patch fixes it by making the default Message-ID headers compliant again, e.g.:

Message-ID: <Fj923tMAJGDfHc5pj9XAQ.1350411047628@postal.woot.local>

(See http://www.ietf.org/rfc/rfc5322.txt section 3.6.4 for the relevant standard.)

dlowe commented 11 years ago

The change to make-jmessage is not strictly necessary, but I found it helpful to be able to test make-jmessage directly, without relying on the side-effect of writeTo() calling saveChanges(). YMMV.

drewr commented 11 years ago

Pushed. Thanks for the fix David!