Adding Message-ID header in core/mail.py
|Reported by:||Graham King <graham@…>||Owned by:||adrian|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
At the moment django.core.mail does not set a Message-ID header in the mails it sends.
SpamAssassin spots this and says INVALID_MSGID and /or MSGID_NO_HOST. With clustered mail servers (Exchange at least) if both members of the cluster receive a message without a message-id, they can think it is the same message and one of the messages will be dropped. I think the Message-ID is also used for message threading. Hence Message-ID is a good thing.
I suggest changing django.core.mail.send_mass_mail to include the attached patch, which adds a Message-ID header according to the format recommended here: