Email - Message Id


A Message-ID is an email identifier. It is generated by the client sending the mail and added in the Message-ID header


An message id is generally the concatenation of:

  • a timestamp
  • the local hostname of the sender


Examples of two differents message id header


Generated by postfix

Message-ID: <[email protected]>

This id seems to follow the algorithm describe in Recommendations for generating Message IDs where:

  • 20200612190818 is the current (wall-clock) time in the highest resolution to which you have access (most systems can give it to you in milliseconds, but seconds will do)
  • 3E16E1FBE8 comes from:
    • the random generation of 64 bits (for postfix, 60, 4 bits for one character)
    • encoded to base 36 characters (0-9 and A-Z)

Javax Mail

Generated by Javax Mail

Message-ID: <1582187414.1.16[email protected]>
Message-ID: <hashcode>.<id>.<currentTime>@<hostname>


  • hashcode is the hash code of the new java object created to build the id
  • id is a global ID (incremented on every use)
  • currentTime is the current time (in milliseconds)
  • hostname is the host name where the program is running



Documentation / Reference

Powered by ComboStrap