SMTP protocol summary

SMTP
- simple mail transfer protocol. Created in 1982 with further modernization in 2008 (ESMTP).

A protocol is used for mail transmission and can work with any transport protocol (TCP, UDP).

General mail exchange idea (SMTP)
General mail exchange idea
Ports:

  • 25 - mail transmission between servers (mail transfer agent)
  • 587 - mail transmission from client

On practice port 25 is used.

 Email format:

 Envelope (SMTP commands)

        Header (RFC 2822)

        Body (RFC 2822)

SMTP works in text format (request - response interaction).

Commands:

SMTP commands

SMTP responses: 

SMTP responses


Letter headers:

SMTP letter headers

Extended SMTP (ESMTP) commands:

  • EHLO - extended HELO
  • STARTTLS - to use encryption
  • SIZE - max allowed letter size
  • DSN - letter delivery confirmation

Security and spam:

SMTP does not contain data protection mechanisms.

  • The contents of MAIL FROM and FROM are not controlled in any way
  • Data is transmitted over the network in open form (except using STARTTLS)

Spam defence:

  • Checking the sender's domain via DNS
  • Mail servers only accept emails for local recipients
  • Verifying the sender's address with a digital signature
     

 

 


Comments

Popular posts from this blog

How to design tiny url system

System design tips on how to make capacity estimation

IMAP protocol summary