SMTP - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

SMTP

Description:

Objective: 'to transfer mail reliably and efficiently' ... Receiver must send OK. HELP. If you can't remember. Different HELP. BUSTED ... – PowerPoint PPT presentation

Number of Views:193
Avg rating:3.0/5.0
Slides: 21
Provided by: jeffch8
Category:
Tags: smtp | busted

less

Transcript and Presenter's Notes

Title: SMTP


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 ltdomaingt
  • 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 ltemail_address_of_sendergt
  • Once again, not checked for accuracy
  • Example
  • MAIL FROM bob_at_bob.com

6
RCPT
  • Identifies the recipient of the mail
  • Multiple recipients are achieved by multiple uses
    of this command
  • RCPT TO ltemail_addressgt
  • Example
  • RCPT TO jonpreston_at_mail.clayton.edu

7
DATA
  • Represents the actual data to be sent to the
    receiver
  • Terminated with single period on a line by itself
    "ltCRLFgt.ltCRLFgt"
  • 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 ltdomaingt Service ready
  • 221 ltdomaingt Service closing transmission channel
  • 421 ltdomaingt 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
    ltforward-pathgt
  • 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 ltforward-pathgt
  • 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

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
20
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com