Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 "[email protected]". Now I want to send mail to "[email protected]". So client set message-id as "[email protected]" 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

like image 385
Kunal Avatar asked Apr 05 '11 16:04

Kunal


1 Answers

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.

like image 164
Jim Avatar answered Sep 24 '22 18:09

Jim