The source code mentions that make_msgid
generates an RFC 2822 compliant Message-ID and also has the option to add an idstring
to strengthen uniqueness.
Is there any value of idstring
one could add that would make the resultant id generated by make_msgid
not complaint with RFC 2822? I read the RFC spec but I am not sure.
I ask because when I sent an email to a gmail address with a messaged id generated by make_msgid
(with <foobar> as the idstring
), I noticed that gmail changed the Message-ID to something like [email protected]. However when I send an email using a messaged id from make_msgid
without and idstring
, gmail did not change anything and I could see the message id was the same as the one I generated originally.
Indeed, brokets in the
idstring
are precisely an example of invalid tokens; another example would be adding a second@
.