SMTP (Simple Mail Transfer Protocol)
SMPTD:TCP 25 service side.
SMTP: Client. Random port, usually greater than 5000
SMTP Status code:
1XX Pure Information
2xx correct
3xx previous action not completed, to be added later
4xx transient Error
5XX Permanent Error
SMTP protocol command:
Helo sends hello information to the other party with the SMTP protocol.
EHLO sends hello information to the other party with the ESMTP protocol.
Mail From:[email protected] sender information.
RCPT To:[email protected] recipient information.
Data
SMTP--SMTPD Client Connection server
After the three-time handshake:
1.hello Send Hello confirmation service side online. The server side is online and returns accordingly.
2.mail from send sender information.
3.RCPT to send recipient information. The recipient is local and does not have to be relayed. If it is not local, verify that it can be relayed.
4.data sends the message body.
5.. Send a blank line with a. Mark body end tag.
LMTP Local Mail Transfer Protocol
If the target is a local user, it is placed directly in the local user's home directory.
If the target is a remote user, the SMTP client is called and is responsible for connecting the SMTPD.
Message transfer (MT): remote server to local server.
Mail Delivery (MD): local server to User.
Mail User (MU): The user who uses the mailbox.
MUA (mail user agent): Mail users agent. Generally refers to the client. Collect mail from the local server to the user's home directory. Outlook, Foxmail, Thunderbird, Evolution, mutt (plain Text interface), and so on.
MTA (mail Transfer agent): Message transfer agent. Generally refers to an SMTP server. Responsible for the delivery of the message.
MDA (mail Delivery agent): Mail delivery agent. The SMTP server calls this agent, which is responsible for posting to the user's mailbox. such as Procmail, Maildrop and so on.
MRA (mail retrieval agent): Mail retrieval agent. Used to retrieve messages from the mailbox and pass them to the user. Implemented through POP3 and Iamp4. Dovecot, Cyrus-imap and so on.
Mail is sent with an SMTP protocol using POP3 or IMAP.
POP3:TCP 110 Port
IMAP4:TCP 143 Port
Open Relay: Open relay
SASL v2:simple authintication Secure layer for simple authentication. By default, the account is authenticated by accessing/etc/passwd and/etc/shadodw. With this layer, the mail service can support authentication. Additional components are required to access the MySQL server. CYRUS-SASL, Courier-authlib (MySQL).
Mailbox format:
Mbox: A file stores all messages, separated by delimiters. This is used by Linux by default.
Maildir: A file stores one message, and all messages are stored in a single directory. This format is used by virtual users.
WebMail: Use dynamic languages such as PHP through a Web server. Call the local SMTP client directly to connect to the local or remote server. Connect to the POP3 server as MUA, with identity information such as the user's account. Returns the Web server after retrieval. The user is consulted via the browser. SquirrelMail, Openwebmail, Extmail (Extman) and so on.
A Lightweight Directory Access Protocol for LDAP (Lightweight Directory Access Protocol). Reads very quickly and writes very slowly. Suitable for one write, multiple reads. AD is representative.
Virtual User: A digital ID that is used only to access a service.
User email:
/var/spool/postfix
/var/mail/username
Junk e-mail filter:
Common mail servers:
SendMail
QMail
Postfix
Modular design, high safety, compatible with SendMail, efficient.
Exim
Service side:
Posxfix + SASL (courier-authlib) + MySQL
Client:
Dovecot+mysql
Webmail
Extmail+extman+httpd
Mailbox server Overall Idea:
DNS (responsible for domain name resolution)--httpd (Web Interface)--MySQL (authentication)--postfix (send)--dovecot (receive)-- Courier-authlib (identity authentication)--Webmail (provides Web interface)--Webman (provides Web admin)--maildrop (delivery)
This article is from "Small Private blog" blog, please be sure to keep this source http://ggvylf.blog.51cto.com/784661/1668734
Postfix basic knowledge of e-mail services