I have participated in the email. I have been involved in the project of the email system. Before I do this mail system, I have a very superficiality of the email. I usually use a means of use in friends, as for the letter of communication. It is not very clear, just use, encounter a mess, but only the sense of screaming. Through this month, I have a certain understanding of the mail system. However, I know that now is still very beautiful. Let's talk about my understanding of the email:
One. The message of the message (SMTP): SMTP (Simple Mail Transfer Protocol), a Simple Mail Transfer Protocol. SMTP is a TCP / IP protocol used to send an email. It is a standard protocol that transmits email on the Internet. It is used to submit and transmit email, which specifies the standard exchange format and mail of the transmission email between the host. The transmission mechanism. SMTP is often used to transfer emails from clients to the server, and transfer from a server to another. Its content is defined by the IETF RFC 821.
1. Introduction The goal of the Simple Mail Transfer Protocol (SMTP) is reliable and efficiently transmitting messages, which is independent of the transfer subsystem and requires only one channel that can guarantee the order of data units. An important feature of SMTP is that it can transfer emails in transmission, and the transfer service provides the process communication environment (IPCE), which can include a network, several networks, or a network of subnets. It is important to understand that the transfer system (or IPCE) is not one-on-one. The process may communicate directly with other processes through known IPCE. The email is an application or inter-process communication. The message can be sent across the network through a process on different IPCEs. More particularly, the message can be transmitted through host Press in different networks. 2. The SMTP model SMTP design is based on the following communication model: Send SMTP to establish a two-way transmission channel between the SMTP establishment and the receiving SMTP for the user's mail request. The receiving SMTP can be the final recipient or an intermediate transmitter. The SMTP command is sent by the sending SMTP, and the response is received, and the response is transmitted. Once the transfer channel is established, the SMTP sender sends a mail command to indicate the mail sender. If the SMTP recipient can receive an email, returns the OK answer. SMTP sender issues the RCPT command to confirm if the message is received. If the SMTP recipient is received, the OK response is returned; if you cannot receive it, you will issue a rejection receiving answer (but do not abort the entire mail operation), both parties will repeat multiple times. When the recipient receives all the emails, the special sequence will be received. If the recipient successfully processes the message, the OK response is returned. SMTP provides a mechanism for transferring mail. If the receiver is connected to the sender connection, the message can be transferred directly from the sender host to the receiver host; or when the two are not under the same transfer service, Follow the SMTP server. In order to be able to provide relay power for the SMTP server, it must have the final destination host address and mailbox name. 3.SMTP workflow. The process of SMTP (port is 25) has several processes: (mail) Basic sending procedures, sending mail forward, confirming mailbox name, and extended mailing list, send to terminal and open shutdown. (For details, please refer to the RFC821 document). 4.SMTP command. SMTP's commands are: Hello (Helo), Mail (Mail), Recipient (RCPT), DATA (DATA), Send (Send), Send or Mail (SEND AND Mail (Saml), RESET (RSET), Verify (VRFY), Expand (Help), NOOP (Noop), Quit (Quit), etc. (For details, please refer to the RFC821 document). For more details on SMTP, see RFC821 documentation.
two. The mail's receiving mechanism (POP3): POP3 (Post Office Protocol 3), the post office protocol 3, is the most recent protocol to receive email. It is the first standard protocol for transmitting emails on the Internet and an offline protocol. It provides information storage capabilities, which is responsible for saving the user's received email and downloads these messages from the mail server. POP3 provides a client with a send trust (username and password) so that access to emails can be specified. The email is received and saved by the server. After a certain period of time, the user (or the customer email receiver) check the mailbox and the mail is issued. Follow the RFC1939 protocol. 1. Use of POP3 necessity. For a smaller node on the network, the support message transmission system (MTS) is not actually. For example, a workstation may not have sufficient resource to allow SMTP servers and a comparable local mail transfer system to remain resident and continue to run. Similarly, the cost of connecting a personal computer for a long time in the IP type network is also considerable (resource for nodes is called "liability"). Noneto, it is very useful to allow administrative emails on such a summary point, and these nodes often support one user agent to manage messages. To solve this problem, it is possible to support MTS's nodes to provide mail storage features for these unfilled nodes. The post office protocol - Version 3 thus enables such a workstation to access the storage mail stored on the server with a relatively practical approach. Usually, this means that the workstation can get the message from the server, and the server is temporarily saved for mail. 2. Workflow. At the beginning, the server starts POP3 service by listening to TCP port 110. When the client host needs to use the service, it will establish a TCP connection with the server host. When the connection is established, POP3 sends a confirmation message. Customer and POP3 servers (separate) exchange commands and responses, this process has always been continued to terminate. In the life cycle, POP3 sessions have several different states. Once the TCP connection is opened, and the POP3 server sends a confirmation information, this process enters the "confirmation" state. In this state, the customer must confirm that it is its customer to the POP3 server. Once the confirmation is successful, the server gets resources related to the customer mail, and this process enters the "operation" state. In this state, the customer puts forward the service when the customer issues a Quit command, and this process enters the "Update" state. In this state, the POP3 server is released in the "Operation" state, and the message is sent, and the connection is terminated. For details on POP3, see the RFC1939 documentation.
The code in the three emails: Due to historical reasons, E-mail only allows the character to be transferred, and it is no doubt that problems will occur when the 7-bit E-mail gateway. These 7-digit E-mail gateways turn all 1 full of Chinese characters to 0, so that some unreadable texts have formed garbled. Thus, in order to facilitate communication between the network, it is necessary to encode processing of these high 8-bit characters. Therefore, a sound mail system is to solve the various encoded files as much as possible. Currently a popular encoding method is: 1. Base64 encoding: The principle is to divide three consecutive characters (a total of 8 * 3 = 24 bits), average, form four new characters, if the last is not 24 bits, make up the zero padding. Use "=" indicating the character encoded for 000000 (binary), the Base64 encoding is more complicated, but it also has a significant feature. Since Base64 is aligned with "=", it is, if you are in a very rule ( The number of characters per line is the same, generally 63), without any encoding of identifiable content, and if the last row is not full and there is one to three "=" characters, it can be confirmed that it is Base64 encoding; especially "." The character after Base64 encoding is said to say that a character after the base 64 is correctly encoded, that is, the letter after encoding it with Base64 will never be in the stream part. " Otherwise it is the error. 2. QUOTED-Printable encoding: This encoding is expressed by expressing the ASCII character (ie, Chinese characters) above the 7FH. Its typical feature is that there is a large number of symbols composed of "=" in the text, ie = xx = xx = xx, etc., as long as this symbol is confirmed. The above two codes are the most popular. Other encodings that are also present are: 3. UuEncode encoding: Some older mail servers use more, current FTP Mail, etc., is also using this encoding (such as Mrcool download file, etc.). The main feature of UUENCODE encoding is that the first line begins by Beginxxx, ending a behavior end, and typically, each row is started to be "m", as long as there is a few features, it is determined to be uuencode encoding. 4. HZ encoding: This is a editor of foreign Chinese invented, which removes the highest bit of Chinese characters, then uses a particular symbol to indicate which coding has been processed. This coding is also very easy to identify: such a set of symbols in the contents of the letter: "~ {" and "} ~", the content is unreadable (garbled), and in this set of delimels Everything is a readable English character. 5. Bit7 code: This is not a code, but a network transmission error. It is because the network does not support 8-bit transmission, which is usually common in the local area network access scheme. It is similar to Hz coding, but does not indicate which content is the highest bit. The identification method is similar to HZ. If the English part in a letter is normal, it is a bit error. This error cannot be decoded and can only be resended with 7-bit encoding (such as various coding above).
6.bit8 code: It is also a code with high 8, which only acts on the mail server. Format of the four mail files: RFC 822 defines the format used for email packets. That is, RFC 822 defines the contents of SMTP, POP3, IMAP, and other email transport protocols. The mail defined by RFC 822 consists of two parts: envelope and mail content. Envelopes include information related to transmission, delivery email. The email content includes title and body. The general mail file is generally divided into two partial email headers and mail content. There is a carriage return between the email header and the email content. The message header contains the basic information of the message, the message content is the text content and attachment content (if any); the contents of the mail head include: Mail Source (from), Date, Mail Topic (Subject) ), Mail destination address (to), copy mail address (CC), Dark mail address (BCC), mail priority (X-Originating-IP), mail server information (X-mailer) and reply address (RETURN-PATH), etc.. Of course, these contents are not necessary. The original email system can only send information in the text format. With the continuous development of technology, information on other format formats is sent to the email, so MIME will be born. MIME full name MultiPurpos E Internet Mail Extensions, Multi-Function Internet Mail Extension. The SMTP transport mechanism on the Internet is based on 7-bit binary code-based ASCII code, suitable for transferring text messages. Sound, image, Chinese, etc. use 8 for binary encoded emails to perform ASCII conversion (encoding) to be properly transmitted on the INTERNET. MIME enhances the ability of the email packets defined in RFC 822 to allow transmission of binary data. MIME encoding techniques are used to convert data from 8 bits into data to use 7-bit ASCII code formats. About the details of the mail format and MIME can be found in the RFC822, RFC1521, RFC1522 documentation.
Date processing in the five mail: The date in the mail follows the RFC822 standard, the standard format is: the surfriend, the date number of the month (four digits) hours: minute: Second time zone logo. Special attention is that the time zone logo in the email date, because of the Internet, everyone has different events in various time zones, so the date of the trust is switched to the date and time of the current time zone, on the Internet, everyone is general Both CTS (World Standard Time) is called GMT (GMT). For example, when we receive the date: Sat, 30 Mar 2002 13:27:08 -0800, our current time zone is the 8th district (Beijing time), the time of sending information is SAT, 30 Mar 2002 29 (13 16): 27: 08 is Sun, 31 Mar 2002 6:27:08 8000. At present, the time zone is: GMT Greenwich standard time GMT UTC global standard time GMT ECT ECT ET EET Eastern European Time GMT 2: 00 Art (Arab) Egypt Standard Time GMT 2: 00 Eat East Afrof GMT 3: 00 MET Middle East GMT 3: 30 NET Near East Time GMT 4: 00 Plt Pakistan Lahore Time GMT 5: 00 IST India Standard Time GMT 5: 30 BST Bangladesh Standard Time GMT 6: 00 VST Vietnamese standard time GMT 7: 00 CTT China Taiwan time GMT 8: 00 jst Japan standard time GMT 9: 00 Act Australian central time GMT 9: 30 AET Australia Eastern time GMT 10: 00 SST Solomon standard time GMT 11: 00 NST New Zealand Standard Time GMT 12: 00 MIT Midway Time GMT-11: 00 HST Hawaii Standard Time GMT-10: 00 AST Alask Standard Time GMT-9: 00 PST Pacific Standard Time GMT-8: 00 PNT Phoenix Standard Time GMT-7: 00 MST Western Mountain Range Time GMT-7: 00 CST Central Standard Time GMT-6: 00 EST Eastern Standard Time GMT-5: 00 IET Indiana Eastern Standard Time GMT-5: 00 PRT Puerto Rico And the United States Virgin Islands Time GMT-4: 00 CNT Canada Newfoundland Time GMT-3: 30 AGT Argentina standard time GMT-3: 00 bet Bet Brazil Eastern Time GMT-3: 00 CAT non-time GMT-1: 00 or above is me Some of the awareness of the mail system, I hope that by reading this article, you can have a new understanding of your email.