Skip to content

Latest commit

 

History

History
24 lines (20 loc) · 1.31 KB

README.md

File metadata and controls

24 lines (20 loc) · 1.31 KB

smtp_protocol

SMTP Fundamentals

SMTP is an application layer protocol. The client who wants to send the mail opens a TCP connection to the SMTP server and then sends the mail across the connection. The SMTP server is always on listening mode. As soon as it listens for a TCP connection from any client, the SMTP process initiates a connection on that port (25). After successfully establishing the TCP connection the client process sends the mail instantly.

SMTP Client

  • Using poll() api. It waits for one of a set of file descriptors to become ready to perform I/O.
  • How to apply poll():
    • standard input's file description => Send data.
    • socket's files description => Receive data.

SMTP Server

  • Using poll() api for: Handling multiple clients on server without multithreading.
  • Each file description corresponding to each client.
  • Create Maildir for store mails.

Documents