Simple Mail Transport Protocol1 We have discussed the layers of the Internet communication stack. The IP layer is capable of routing packets to a given IP address, the TCP layer is capable of establishing a reliable connection between two machines, and at the application layer we have programs capable of doing work like sending email and browsing the Web. Internetready operating systems have traditionally come with several application layer programs: ftp: file transfer protocol traceroute: find the route to a remote host ping: find the round trip packet time to a remote host telnet: establish a TCP session These are included in Windows 95, 98 and NT. They are quite basic (all but telnet are command line programs), and there are many third party alternatives. For an application layer illustration, let’s use the Simple Mail Transport Protocol (SMTP). We will not use an email client program, but will manually type the SMTP commands a client would use. Our first step is to establish a TCP session between our machine and a host running an SMTP server using telnet. I know there is an SMTP server running on dhvx20.csudh.edu. We start telnet from the “start/run” menu, and specify the port and machine we wish to connect to.2 The standard port for SMTP servers is 25. We should also turn keyboard echo on so we can see what we are typing. The SMTP protocol consists of a number of commands, followed by parameters. Some of the commands are: helo: identify the client domain (domain name) mail: identify the sender (email address) rcpt: identify the recipient (email address) data: the body of the message quit: end the session 1 The SMTP protocol (helo, mail, rcpt, data, etc.) was specified by Jon Postel in Request for Comment (RFC) 821, August 1982. That was a revision of several RFCs, beginning with RFC 772, September 1980. The format of mail messages (to, from, CC, etc.) was specified by Dave Crocker in RFC 822, August 1982. That was a revision of several RFCs, beginning with 561, September 1973. You can see these or any other RFCs at http://info.internet.isi.edu:80/7c/in-notes/rfc/. 2 The system administrator on dhvx20.csudh.edu has set the SMTP server up so it will not relay mail from any machine but dhvx20 in order to make life difficult for spammers. The SMTP server on nal.csudh.edu allows forwarding, so any email client on the Internet can use it to relay mail. (This capability will be switched off as soon as this assignment is done). email spoof An SMTP Session We begin the client-server dialog by telnetting to port 25 at dhvx20.csudh.edu. The following is a transcript of our client-server SMTP session, with us typing the client side of the dialog manually (C denotes what we type and S the server response): S: 220 DHVX20.CSUDH.EDU -- Server ESMTP (PMDF V5.2-32 #28557) C: helo csudh.edu S: 250 DHVX20.CSUDH.EDU OK, ras01.isi.edu [128.9.176.101]. C: mail from:<lpress@isi.edu> S: 250 2.5.0 Address Ok. C: rcpt to:<lpress@isi.edu> S: 250 2.1.5 lpress@isi.edu OK. C: data S: 354 Enter mail, end with a single ".". C: this is a test C: . S: 250 2.5.0 Ok. C: quit S: 221 2.3.0 Bye received. Goodbye. A few seconds later, lpress@isi.edu received the following email: Date: Fri, 06 Aug 1999 06:21:01 -0800 (PST) From: lpress@ISI.EDU To: lpress@ISI.EDU this is a test email spoof Here is another SMTP session. Note that the to and from fields may be overwritten in the data portion of the message: S: 220 DHVX20.CSUDH.EDU -- Server ESMTP (PMDF V5.2-32 #28557) C: helo hmausa.com S: 250 DHVX20.CSUDH.EDU OK, ras01.isi.edu [128.9.176.101]. C: mail from:<billc@whitehouse.gov> S: 250 2.5.0 Address Ok. C: rcpt to:<lpress@isi.edu> S: 250 2.1.5 lpress@isi.edu OK. C: data S: 354 Enter mail, end with a single ".". C: from: billc@whtehouse.gov C: to: lpress@isi.edu C: subject: lunch C: Larry, C: Would you like to meet Hillary and me for lunch today? C: Bill C:. S: 250 2.5.0 Ok. quit S: 221 2.3.0 Bye received. Goodbye. Which sent the following email to lpress: Date: Fri, 06 Aug 1999 07:10:13 -0800 (PST) From: billc@whtehouse.gov Subject: lunch To: lpress@ISI.EDU Larry, Would you like to meet Hillary and me for lunch today? Bill email spoof