in reply to Generating Message_id email headers
$smtp->data(); $smtp->datasend("Message-ID: <".crypt(localtime,'$5$').">\n");
See the end of RFC 2822 section 3.6.4.
The message identifier (msg-id) itself MUST be a globally unique identifier for a message. The generator of the message identifier MUST guarantee that the msg-id is unique. There are several algorithms that can be used to accomplish this. Since the msg-id has a similar syntax to angle-addr (identical except that comments and folding white space are not allowed), a good method is to put the domain name (or a domain literal IP address) of the host on which the message identifier was created on the right hand side of the "@", and put a combination of the current absolute date and time along with some other currently unique (perhaps sequential) identifier available on the system (for example, a process id number) on the left hand side. Using a date on the left hand side and a domain name or domain literal on the right hand side makes it possible to guarantee uniqueness since no two hosts use the same domain name or IP address at the same time. Though other algorithms will work, it is RECOMMENDED that the right hand side contain some domain identifier (either of the host itself or otherwise) such that the generator of the message identifier can guarantee the uniqueness of the left hand side within the scope of that domain.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Generating Message_id email headers
by Anonymous Monk on May 18, 2017 at 14:19 UTC |