Debug School

rakesh kumar
rakesh kumar

Posted on

How to traceroute email address using linux commands with example


As mentioned earlier, you cannot trace the path of an email address using the traceroute command in Linux. However, you can use the following steps to trace the email path using the terminal and other Linux commands.

1.Open your terminal in Linux.

2.Use the "nslookup" command to find the mail servers responsible for handling email for the domain of the email address you want to trace. For example, if you want to trace an email address from the domain "," you can use the following command:

nslookup -type=mx

This will return a list of mail servers that are responsible for handling email for ""

3.Once you have identified the mail server(s), you can use the "telnet" command to connect to the mail server and retrieve the email header. For example, if the mail server responsible for handling email for "" is "," you can use the following command to connect to the mail server:

telnet 25

This will establish a connection to the SMTP server on port 25, which is the default port used for sending email.

4.Once you have established a connection to the mail server, you can retrieve the email header by typing the following command:

Enter fullscreen mode Exit fullscreen mode

This will initiate an SMTP session and retrieve the email header from the server. The email header contains information about the sender, recipient, and the path the email took to reach its destination.

5.Finally, you can use an online email header analyzer tool to parse the email header and trace the path of the email.

Image description

Image description

Top comments (0)