CS 742 - Simple Mail Transfer Protocol (SMTP) 1. The mail server usually listens to port number 25 as shown in /etc/services: smtp 25/tcp mail 2. Connect to the mail server on sisko $ telnet sisko 25 Trying 156.26.10.231... Connected to sisko.cs.wichita.edu. Escape character is '^]'. 220 sisko.cs.wichita.edu ESMTP Exim 3.35 #1 Sun, 03 Oct 2004 18:21:53 -0500 help 214-Commands supported: 214- HELO EHLO MAIL RCPT DATA AUTH 214 NOOP QUIT RSET HELP helo sisko 250 sisko.cs.wichita.edu Hello cs742 at kirk.cs.wichita.edu [156.26.10.239] mail from: cs742@cs.wichita.edu 250 is syntactically correct quit 221 sisko.cs.wichita.edu closing connection Connection closed by foreign host. 3. Start up a telnet client (pretend mail client), and connect to the server: $ telnet pobox.cs.twsu.edu 25 Trying 156.26.10.25... Connected to pobox.cs.twsu.edu. Escape character is '^]'. 220 pobox.cs.twsu.edu ESMTP Sendmail 8.9.3/8.9.3/Debian 8.9.3-21; Tue, 3 Dec 2002 23:36:28 -0600 3. Be friendly, and tell the server "Hello": helo bugs 250 pobox.cs.twsu.edu Hello chang@bugs.cs.twsu.edu [156.26.10.41], pleased to meet you 4. Specify who the mail is from: (WARNING: ONLY SEND MAIL FROM YOURSELF TO YOURSELF -- OTHER USAGE IS CONSIDERED HOSTILE.) mail from: 250 ... Sender ok 5. Specify the recipient to receive the mail: rcpt to: 250 ... Recipient ok 6. Specify start of data (mail message): data 354 Enter mail, end with "." on a line by itself This is the message. . 250 XAA19085 Message accepted for delivery 7. Terminate session: quit 221 pobox.cs.twsu.edu closing connection Connection closed by foreign host. $