07-02-2013, 09:43 AM
Simple Mail Transfer Protocol
Simple Mail .ppt (Size: 43 KB / Downloads: 30)
Terminology
User Agent: end-user mail program
Message Transfer Agent: responsible for communicating with remote hosts and transmitting/receiving email (both a client and server).
Mail Exchanger: host that takes care of email for a domain.
SMTP Protocol
SMTP sender is the client
SMTP receiver is the server.
Alternating dialogue:
client sends command and server responds with command status message.
Order of the commands is important!
Status messages include ascii encoded numeric status code (like HTTP,FTP) and text string.
Data Format
ASCII only- must convert binary to an ASCII representation to send via email.
What if we want to send a line containing only a period?
Sender prepends a period to any line staring with a period (in the message).
Receiver strips the leading period in any line that starts with a period and has more stuff.
Mail Headers
Email messages contain many headers, some headers are created by the UA, some are automatically added by the MTA.
Every MTA adds (at least) a “Received:” header.
Some of the headers are read by (parsed) intermediate MTAs, but the content is ignored and passed on transparently.
POP (version 3)
Similar to SMTP command/reply lockstep protocol.
Used to retrieve mail for a single user
requires authentication
Commands and replies are ASCII lines.
Replies start with “+OK” or “-ERR”.
Replies may contain multiple lines.
Optional Commands
TOP - send header lines from messages.
APOP - alternative authentication
message digest based on opening greeting sent from POP server.
Requires shared secret!
No cleartext password on the network.
Does not authenticate the server!!!!