1 / 20

SMTP

SMTP. Simple Mail Transfer Protocol. RFC 821. Defines SMTP Written 1982 Objective: "to transfer mail reliably and efficiently" Sender establishes two-way communication with receiver Sender send the MAIL command. If receiver can receives, sends the OK command

petra
Download Presentation

SMTP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SMTP Simple Mail Transfer Protocol

  2. RFC 821 • Defines SMTP • Written 1982 • Objective: "to transfer mail reliably and efficiently" • Sender establishes two-way communication with receiver • Sender send the MAIL command. • If receiver can receives, sends the OK command • Sender specifies the recipient with RCPT command • Sender sends data with DATA command • Terminates with special sequence

  3. Client Design • Mail port almost always on port 25 (sometimes moved for security reasons) • Open up socket • Have threaded reader from socket • Write commands using correct protocol • Note: ComMAnDs Are NoT CASe SensITiVE

  4. HELO • HELO <domain> • Identifies the name of the sender • Replies with OK • Not checked for accuracy • Sometimes not required • Example: HELO bob.com

  5. MAIL • Used to initiate a mail transaction • MAIL FROM: <email_address_of_sender> • Once again, not checked for accuracy • Example: MAIL FROM: bob@bob.com

  6. RCPT • Identifies the recipient of the mail • Multiple recipients are achieved by multiple uses of this command • RCPT TO: <email_address> • Example: RCPT TO: jonpreston@mail.clayton.edu

  7. DATA • Represents the actual data to be sent to the receiver • Terminated with single period on a line by itself "<CRLF>.<CRLF>" • Can contain: • From: • To: • Subject: • Date: • Reply: • Received: • …

  8. QUIT • It, uh… does… umm…

  9. Reply Codes • 500 Syntax error, command unrecognized [This may include errors such as command line too long] • 501 Syntax error in parameters or arguments • 502 Command not implemented • 503 Bad sequence of commands • 504 Command parameter not implemented • 211 System status, or system help reply • 214 Help message [Information on how to use the receiver or the meaning of a particular non-standard command; this reply is useful only to the human user] • 220 <domain> Service ready • 221 <domain> Service closing transmission channel • 421 <domain> Service not available, closing transmission channel [This may be a reply to any command if the service knows it must shut down] • 250 Requested mail action okay, completed • 251 User not local; will forward to <forward-path> • 450 Requested mail action not taken: mailbox unavailable [E.g., mailbox busy] • 550 Requested action not taken: mailbox unavailable [E.g., mailbox not found, no access] • 451 Requested action aborted: error in processing • 551 User not local; please try <forward-path> • 452 Requested action not taken: insufficient system storage • 552 Requested mail action aborted: exceeded storage allocation • 553 Requested action not taken: mailbox name not allowed [E.g., mailbox syntax incorrect] • 354 Start mail input; end with <CRLF>.<CRLF> • 554 Transaction failed

  10. Minimum Implementation • For workability, the following must be recognized by the server: • HELO • MAIL • RCPT • DATA • RSET • NOOP • QUIT

  11. Goin' Old-School • A Telnet session provides simple socket functionality • Telnet to a server on port 25 to practice your SMTP commands! • Easy on UNIX, Windows messes up

  12. Example

  13. NOOP • Does nothing, other than send back an OK command • Useful for debugging your sockets

  14. VRFY • Used to verify an account exists • Can be a security risk

  15. EXPN • Expand and return a list • Hard to find a server that supports this

  16. RSET • Current mail transaction is to be aborted • Any information sent is to be discarded • Receiver must send OK

  17. HELPIf you can't remember

  18. Different HELP

  19. BUSTED

More Related