Title: SMTP at a glance
1SMTP at a glance
2STMP A quick glance
- SMTP Overview
- A brief history of SMTP
- SMTP technical review
- SMTP commands
- SMTP and Java
- Further readings
3SMTP - Overview
- What is SMTP?
- Email looking back
- Simple Mail Transfer Protocol
- Operates at application layer (OSI)
- Runs over TCP/IP
4Why SMTP?
- Email the most popular service
- The email protocol wars
- X400, MOTIS
5A brief history of SMTP
- Mail Transfer Protocol (MTP)
- RFC 780 (05/1980)
- FTP-based
- Simple Mail Transfer Protocol (SMTP)
- RFC 788 (11/1980)
- Simple, independent
6A brief history of SMTP contd.
- Simple Mail Transfer Protocol (SMTP)
- RFC 821 822 (8/1982)
- Extended SMTP (ESMTP)
- SMTP service extensions
- RFC 1425 (3/1993)
7SMTP today
- Latest SMTP standards
- RFC 2821 2822 (04/2001)
- Includes ESMTP
- ESMTP for transmission of Large and Binary MIME
- RFC 3030 (12/2000)
8SMTP A technical view
- Basic informations
- Standard port 25
- Clear-text protocol
- Mail relaying
- Stored in POP or IMAP server
- Message format (RFC 2822)
- MIME (Multipurpose Internet Mail Extensions)
- RFC 2045 ? 2049
9SMTP - Commands
- What is SMTP commands?
- Text command CRLF
- Parameters
- Command list
- HELO, EHLO, MAIL, RCPT, DATA
- RSET, NOOP, QUIT, VRFY
- HELP, EXPN
10SMTP command sequence
- Basic command sequence
- EHLO / HELO
- MAIL
- RCPT
- DATA
- QUIT
11SMTP commands HELO, MAIL
- HELO / EHLO
- Syntax EHLO ltDomaingt
- Usage indentify mail clients
- MAIL
- Syntax MAIL FROM ltsender addressgt
- Usage Start a new mail transaction
12SMTP commands RCPT, DATA
- RCPT (recipient)
- Syntax RCPT TO ltrecipient addressgt
- Usage identify an individual recipient
- DATA
- Syntax DATA (ends with CRLF . CRLF)
- Usage specify the actual message
13SMTP commands RSET, QUIT
- RSET (reset)
- Syntax RSET
- Usage Abort the current transaction
- QUIT
- Syntax QUIT
- Usage Terminate the connection
14SMTP commands VRFY, NOOP
- VRFY (verify)
- Syntax VRFY ltusernamegt
- Usage confirm a user or mailbox
- NOOP
- Syntax NOOP
- Usage request an OK reply from the server
15SMTP commands EXPN, HELP
- EXPN
- Syntax EXPN ltmailing listgt
- Usage confirm a mailing list
- HELO
- Syntax HELP ltcommandgt
- Usage HELP display command list
- Usage display command syntax and usage
16SMTP reply code
- 211 system status
- 220 system ready (welcome)
- 250 OK
- 354 DATA input
- 50x syntax error
17SMTP telnet demo
C\gttelnet localhost 25 220 localhost ESMTP at
your service helo localhost 250 localhost Hello
localhost 127.0.0.1, pleased to meet you. mail
fromadmin_at_localhost 250 2.1.0 ltadmin_at_localhostgt..
. Sender ok rcpt to test_at_localhost 250 2.1.5
lttest_at_localhostgt... Recipient ok data 354 Enter
mail, end with "." on a line by
itself Tihadsjkfnwefsiondsjfnkjsd This is a test
mail sekhfsdjfsssdjfushfsdhkfsd . 250 2.6.0 80
bytes received in 000021 Message accepted for
delivery quit 221 2.0.0 localhost closing
connection
18SMTP and Java
- Implementations with Java Networking
- Pure socket
- Socket port 25
- JavaMail API
- SMTP and C0312M
19SMTP Summary
- General info on SMTP
- Technical info on SMTP\
- SMTP commands
- SMTP and Java
20Further readings
- RFCs
- SMTP RFC 2821, 2822
- MIME RFC 2045, 2046, 2047, 2048, 2049
- SMTP tutorials