An exclusive gaming industry community targeted
to, and designed for Professionals, Businesses
and Students in the sectors and industries
of Gaming, New Media and the Web, all closely
related with it's Business and Industry.
A Rich content driven service including articles,
contributed discussion, news, reviews, networking, downloads,
and debate.
We strive to cater for cultural influencers,
technology decision makers, early adopters and business leaders in the gaming industry.
A medium to share your or contribute your ideas,
experiences, questions and point of view or network
with other colleagues here at iVirtua Community.
By reading this tutorial, I assume you have some knowledge of what protocols do what, and where they are used etc.. If not, you are not ready to read this document, and you should consult wikipedia for protocol information and/or learn about networking and internet. I also assume you have knowledge of using your operating system, and using command shells.
Using SMTP with Telnet SMTP is what is used in the transfer of mail, it is primarly used for sending mail. SMTP servers normally operate an SMTP service at port 25.
SMTP servers do not require any authentication, they can be freely used by anyone that wishes to use them (most of the time), due to this fact they can be used to spoof mail. Many of the spam email messages you get, have proberbly been sent using such a method, sending emails pretending to be someone else.. it's proberbly the only downside to SMTP IMO.
To use the SMTP protocool using my methods, you will need telnet and nslookup. First lets open nslookup, what we will do first is type 'set type=mx'. Doing this will filter the results to mail exchanges, which is what we want. Now we will type the domain we want, so if we want the hotmail smtp servers, we will type 'hotmail.com'.
A list of servers will be listed, we want the mx servers, and not the name servers.. so let's go and copy the ip to mx1.hotmail.com (or whatever you want to use) Ok, once you have the ip we will open telnet. Exit nslookup, and enter a new telnet session. type 'o', and you will be prompted for the server to open a connection to, so go ahead and enter the ip, and then after the ip add a space and the port number (25) [e.g. 65.54.166.99 25] (For future reference, you can open new telnet sessions by using 'o ip port', e.g. 'o 65.54.166.99 25'.
Once you have connected, you should be greeted with some kind of message. We will now communicate with the server, first say 'HELO'. Saying 'HELO' will greet the mail server, and hopefully we will recieve a response. This response means it is ok to proceed. Once you have done this, we will enter the RCPT. The RCPT is the person you want to send it too, and it goes in the format of 'RCPT TO:<person>' So go ahead and enter the RCPT field. Once you have done this, we can enter the MAIL FROM field, which can either be your real email address or someone elses. It goes in the format of 'MAIL FROM:<person>' Now we can enter the DATA field. The DATA field is the body of the document. If you wish to use a Subject, you can do so by putting 'Subject: bla bla bla' inside the DATA field. For example, DATA Subject: This is my cool subject Will you marry me?
.
As you can see, we end the body with a full stop after an empty line, this terminates the DATA field. Now all we do is quit the server, we do this by typing 'QUIT'.
To summarise what we have just done, here is a full example of a telnet SMTP session: (RED: Server, GREEN: Me.)
220 bay0-pamc1-f2.bay0.hotmail.com Sending unsolicited commercial or bulk e-mail to Microsoft's computer network is prohibited. Other restrictions are found at http://privacy.msn.com/Anti-spam/. Violations will result in use of equipment located in California and other states. Sat, 3 Dec 2005 07:33:31 -0800 HELO 250 bay0-pamc1-f2.bay0.hotmail.com (3.1.0.15) Hello [88.106.184.174] MAIL FROM:<dude> 250 dude@domain.com....Sender OK RCPT TO:<kahrny> 250 kahrny@hotmail.co.uk DATA 354 Start mail input; end with <CRLF>.<CRLF> Subject: It's me! Hi, Isn't telnet awesome?
. 250 <BAY0> Queued mail for delivery quit 221 bay0-pamc1-f2.bay0.hotmail.com Service closing transmission channel
This concludes Part 1 of my using Telnet tutorial. Stay tuned for POP3, FTP and HTTP.