How I get Real IP of an email sender using Message ID of the said mail?
-
There is no sure way to do that. Some email routines use the name or IP of the source computer when generating the message id, some don't. And those which do, don't necessarily do that in Ryde same manner. That being said, are you talking about specific message ids?– mklCommented Apr 21, 2013 at 14:24
1 Answer
The Message-ID
header can be chosen arbitrarily by the client, so you cannot reliably expect to find the client IP address (if any) encoded in it.
This page lists known behaviour of many email sending softwares; some (e.g. mutt) will encode the full name of the sending machine in the Message-ID, but this is the name as the machine knows it, so it can be "localhost", which is not very informative. Moreover, even if the sending software encoded its known IP address in the header, it would often be a local-only address such as 192.168.1.100
because of the high prevalence of NAT. Finally, many emails nowadays are sent through big Webmail platforms like Gmail, so if you find an IP address in it, it will be the address of a Gmail server, not the address of the client.