telnet to exchange server
First of all you will need to find out the exchange server that is responsible for the email address you are having trouble sending to – the details of the offending exchange server and held in the MX Record for the domain – so first of all you need to take the domain part of the email address (thats everything after the @ symbol, for example for Bill@microsoft.com you would take just microsoft.com).
Once you have this part of the address, goto mxtoolbox.com and use their MX record checking facility to find the MX record(s) for microsoft.com – I happen to know taht it is mail.messaging.microsoft.com which I will be using for my examples.
Once you have this record you are ready to telnet to exchange server.
Telnet to Exchange Server
So now you need to use your telnet program of choice, I normally just go in through windows built in telnet client, which can be accessed directly through the command prompt. So I open a command prompt (Start menu>Run>cmd[enter]).
Then type the following command:
telnet mail.messaging.microsoft.com 25
This breaks down pretty easily – the first part is just calling the telnet program, then I am giving it the domain name of the server that I wish to connect to, then the last part is the port number I want to connect on – Telnet can be used to connect to many devices on numerous ports, but in this case I am interseted in port 25 which is the port for SMTP – ie the port that exchange server listens on for incoming mail.
When we press enter, the IP address will be resolved for mail.messaging.microsoft.com after which telnet will send a connection message to microsofts exchange server and if all goes well, we will receive a confirmation of connection:
220 TX2EHSMHS021.bigfish.com Microsoft ESMTP MAIL Service ready at Wed, 10 Aug 2 011 09:19:20 +0000
When this message is received it means we have successfully opened up a communication tunnel with Microsofts exchange server.
Thats actually all that is involved in order to telnet to exchange server.
Once connected however, we can continue trouble shooting – the most common task that we can perform next is trying to send a test email to a user within the Microsoft.com domain – common reasons why we would want to do this are if we were having trouble sending email to that user – trying to send via telnet should flag up any problems – for example, if the user no longer exists, we will get a message telling us so.
Perhaps more importantly, if we (or our server) have been blacklisted from the domain, we will be notified in the response from Microsoft’s exchange server – and often instructions will be provided here on how to remove ourselves from the blacklist – in fact with larger companies such as AOL, a telnet to their exchange server is the easiest way to actually confirm that they have blacklisted you!
So the process of sending an email goes as follows:
helo mydomain.com
(we need to introduce our domain first – it needs to be a legitimate one and we should get a hello back)
mail from:me@mydomain.com
(let it be know our sender address)
rcpt to:recipient@microsoft.com
(The user within the target domain taht we wish to send to)
data
(Open the data session, everything typed after this will become part of the body of the message)
.
(The dot on a seperate line followed by the return key will signify the end of the message body)
If all goes well you should receive a 250 OK signifying that the email has been queued for delivery.
One thing to watch out for that I have come across several times in the past is taht some exchange servers will not accept the from and to email addresses in their natural form, but require them in the following format:
<me@mydomain.com>