Ensuring that an email reaches its intended recipient’s mail server is crucial for effective communication. One way to manually verify this is by using Telnet to simulate the sending process. Below, we provide a detailed guide on how to use Telnet to check if a remote mail server is set up to receive emails for a specific mailbox. We will also include possible responses from the mail server, both correct and incorrect, to help you troubleshoot common issues such as spam filters, full mailboxes, and more.
Before you begin, you need to find mail exchange host addres (MX type of DNS record).
In Windows:
nslookup -type=MX external-domain.tld
In Linux:
dig MX external-domain.tld +short
or
host -t MX external-domain.tld
Step 1: Connecting to the Mail Server
First, open your command line interface and connect to the recipient’s mail server using Telnet:
telnet remote.external-domain.tld 25
Example response:
220 remote.external-domain.tld ESMTP Postfix
If you receive a different response, such as 421 Service not available, closing transmission channel
, it indicates that the remote server is not accepting connections, possibly due to server issues or your IP being blocked.
Step 2: Introducing Your Server
Introduce your server to the remote mail server using the EHLO command:
ehlo mbx-host.domain.tld
Example response:
250-remote.external-domain.tld
250-PIPELINING
250-SIZE 20480000
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
An incorrect response, such as 550 Requested action not taken: mailbox unavailable
, suggests a configuration issue on your side.
Step 3: Setting the Sender Address
Set the sender’s email address:
mail from:[email protected]
Example response:
250 2.1.0 Ok
A response like 553 5.1.8 [email protected]... Domain of sender address [email protected] does not exist
would indicate an issue with the sender’s email domain not being recognized.
Step 4: Setting the Recipient Address
Specify the recipient’s email address:
rcpt to:[email protected]
Example response:
250 2.1.5 Ok
Incorrect responses include:
450 4.2.1 [email protected]... Recipient mailbox is full
: The recipient’s mailbox doesn’t have enough space.550 5.1.1 [email protected]... User unknown
: The recipient’s email address doesn’t exist on the remote server.
Step 5: Composing the Email
Start composing the message:
data
Expected response:
354 End data with <CR><LF>.<CR><LF>
After typing your message and ending with a period on a new line, you should receive:
250 2.0.0 Ok: queued as 12345
Incorrect or problematic responses might be:
554 5.7.1 Service unavailable; Client host [your.IP.address] blocked using Spamhaus
: Indicates your IP is blacklisted.452 4.5.3 Too many recipients
: Suggests that your email was blocked due to too many recipients or possible spam activity.
Conclusion
Understanding the responses from the remote mail server during each step can help diagnose issues with email delivery. Whether it’s a full mailbox, a blacklisting issue, or an unrecognized sender domain, each response provides insights necessary for troubleshooting and ensuring your emails reach their intended destinations.
By familiarizing yourself with these steps and possible outcomes, you can efficiently manage and troubleshoot email communications across different domains. This knowledge is invaluable for IT professionals and anyone responsible for maintaining an organization’s email system.
Shortly
-> telnet remote.external-domain.tld 25
<- 220 remote.external-domain.tld ESMTP Postfix
-> ehlo mbx-host.domain.tld
<- 250-remote.external-domain.tld
<- 250-PIPELINING
<- 250-SIZE 20480000
<- 250-ETRN
<- 250-STARTTLS
<- 250-ENHANCEDSTATUSCODES
<- 250-8BITMIME
<- 250 DSN
-> mail from:[email protected]
<- 250 2.1.0 Ok
-> rcpt to:[email protected]
<- 250 2.1.5 Ok
-> data
<- 354 End data with <CR><LF>.<CR><LF>
-> Subject:mail from telnet
-> Message body
-> .
-> Enter
<- 250 2.0.0 Ok: queued as 12345