How to Test SMTP Relay from a TxEIS Application Server

advertisement
How to Test SMTP Relay from a TxEIS Application Server
1. Determine the mail server you’re sending to.
* Open a command prompt
* Type NSLOOKUP <press enter>
> set q=mx
> leadomain.com
> quit <press enter to exit NSLOOKUP>
Response:
Non-authoritative answer:
theirdomain.com MX preference = 50, mail exchanger = mail.theirdomain.com
2. Connect to their mail server
SMTP communicates over port 25. We will now try to use TELNET to connect to their mail server
"mail.theirdomain.com”.
* Open a CMD prompt
* TELNET MAIL.THEIRDOMAIN.COM 25
You should see something like this as a response:
220 mx.google.com ESMTP 6si6253627yxg.6
Be aware that different servers will come up with different greetings but you should get
SOMETHING. If nothing comes up at this point there are 2 possible problems. Port 25 is being
blocked at your firewall, or their server is not responding. Try a different domain, if that works
then it's not you.
How to Test SMTP Relay from a TxEIS Application Server
Date last modified March 12, 2016
Page 1 of 3
How to Test SMTP Relay from a TxEIS Application Server
3. Send an Email
Now, use simple SMTP commands to send a test email. This is very important, you CANNOT use
the backspace key, it will work onscreen but not be interpreted correctly. You have to type
these commands perfectly.
ehlo mydomain.com
mail from:<martin9700@mydomain.com>
rcpt to:<recipient@theirdomain.com>
data
This is a test, please do not respond
.
quit
Explanation of the commands used to send a test email.
EHLO - introduce yourself to the mail server HELO can also be used but EHLO tells the server to
use the extended command set (not that we're using that).
MAIL FROM - who's sending the email. Make sure to place this is the greater than/less than
brackets as many email servers will require this (Postini).
RCPT TO - who you're sending it to. Again you need to use the brackets. See Step #4 on how to
test relaying mail!
DATA - tells the SMTP server that what follows is the body of your email. Make sure to hit
"Enter" at the end.
. - the period alone on the line tells the SMTP server you're all done with the data portion and
it's clear to send the email.
quit - exits the TELNET session.
How to Test SMTP Relay from a TxEIS Application Server
Date last modified March 12, 2016
Page 2 of 3
How to Test SMTP Relay from a TxEIS Application Server
4. Test SMTP relay
Testing SMTP relay is very easy, and simply requires a small change to the above commands. See
below:
ehlo mydomain.com
mail from:<martin9700@mydomain.com>
rcpt to:<recipient@someotherdomain.com>
data
This is a test, please do not respond
.
quit
There is a difference on the RCPT TO line, we're sending to a domain that is not controlled by
the SMTP server we're sending to. You will get an immediate error is SMTP relay is turned off. If
you're able to continue and send an email, then relay is allowed by that server.
How to Test SMTP Relay from a TxEIS Application Server
Date last modified March 12, 2016
Page 3 of 3
Download