Sending email using smtp and setting the message-id
I have a client which sends email using the smtp protocol. The client can be configured against any mail server which supports smtp (for example: gmail, yahoo).
Now, while sending the mail from client, I am setting the "message-id" in the header. Now, my question is does mail server guarantees that the message id set by me in the header will "not" be reset (or replaced) by the mail server, before actual forwarding the mail.
For example: Let say my client is configured against "abc@gmail.com". Now I want to send mail to "abc2@yahoo.com". So client set message-id as "message123开发者_如何学Python456644@abc.gmal.com" and send the mail using smtp.
So, now when gmail sends this message to yahoo, does it guarantee that my message-id will be retained.
Thanks Kunal
The Message-ID is a unique string assigned by the mail system when the message is first created. This is also forgeable in most cases, but requires a little more specialized knowledge than forging the From: line. Also, the Message-ID: often identifies the system from which the sender is logged in, rather than the actual system where the message originated.
Long story short: Your client can set it, but there is not guarantee it will remain that way.
Message ID is used to understand the originating server of the message. Technically this is set by the first message server that handles your message. Once set this is not meddled by subsequent server. In your case your smtp client acts as the originating server and the server will not meddle with it.
(What are you doing with message id anyways.)
精彩评论