The email server operates two separate processes:
- Mail Transfer Agent (MTA)
- Mail Delivery Agent (MDA)
The MTA process is used to forward email. As shown in the figure, the MTA receives messages from the email client or from another MTA on another email server. Based on the message header, it determines how a message must be forwarded to reach its destination. If the mail is addressed to a user whose mailbox is on the local server, the mail is passed to the MDA. If the mail is for a user not on the local server, the MTA routes the email to the MTA on the appropriate server.