Posted by: B00M3R
An SMTP session is nothing more than a telnet session over TCP port 25 instead of port 22. Because of this you can instantly test your own SMTP sessions and send an e-mail without even using a mail client.
The steps that we go thorugh in test are as follows:
- Identify Sender
- Identify recipient
- Provide message body
- End session
There are some other optional requests (Message priority, subject line, etc) To connect just use your command prompt or some software like putty which can be downloaded here. Just be sure to specify the SMTP port number as below.
- Lets Connect…..
- Telnet mailserver.com 25
The handshake is where you specify your host address. You can really put what you want here but if the mail server you are trying to connect to has spam filtering set up it will reject data that is invalid or does not resolve.
- Lets Handshake…..
- EHLO mail.otherservername.com
Ok now when you specify the FROM address if the receiving mail server is filtering for spam it will expect that the domain listed in your FROM address resolves to the same IP as the domain listed when you provided your mail server name at the handshake.
- Lets Identify Sender…..
- MAIL FROM:firstname.lastname@example.org
Now we need to identify recipient. Most mail servers will accept a message to anyone residing on the mail server. If the mail server accepts a message from anyone this is known as open relay, great news for spammers.
- Lets Identify Recipient…..
- RCPT TO:email@example.com
OK now for the data. Provide your message body, start by typing the word data and then press enter. The mail server then will instruct you to begin typing the message body and to end, press enter followed by a period and then enter again.
- Lets provide Message Body…..
- DATA This is a test message please do not respond. (Make sure you remember the enter/period/enter otherwise no work)
Now lets end the session. To end the session just type quit and game over. Below is a test session i did connecting to a server in Australia.