RFC821-Simple Mail Transfer Protocol (SMTP) Chinese version-1

Source: Internet
Author: User
Tags all mail
3. 7. the domain was recently introduced to the ARPAInternet email system. The domain can be used to change the address space from a flat string host name to a global address level. A host is replaced by a domain name. The starting host is composed of a series of meta strings, which are arranged by commas in the most special to general order. Example: USC-ISIF.ARPA, Fred. Cambridge. UK SMTP

3.7. domain
The domain was recently introduced into the ARPA Internet mail system. Use the domain to enable the address space from
The host name of a common string in a plane is a hierarchical structure of the global address. The host is retrieved by a domain name
Generation, the starting host is composed of a series of meta strings, which are arranged by commas in the most special to general order.
For example, "USC-ISIF.ARPA", "Fred. Cambridge. UK" and "PC7.LCS. MIT. ARPA" can
Can be a host-domain identifier.
No matter how the domain name is used in SMTP, only the formal name can be used.
An alias or nickname.

3.8. change role
The TURN command can be used to change the role of the program for communication over the transmission channel. If program A is
After sending SMTP, it sends the TURN command and receives the OK response (250), it changes to receiving SMTP. Same
Program B can also change from receiving SMTP to sending SMTP. To refuse to change the role, the recipient can send
Send 502 as a response.
Note: this command is optional. This command is generally not used when a TCP transmission channel is used. However
This command is useful when the cost of establishing a transmission channel is relatively high. For example, this command supports
Public exchange telephone system as a transmission channel.

4. SMTP description
4.1. SMTP command
4.1.1. command syntax
SMTP commands define mail transmission or user-defined system functions. Its command is composed
End string. In the case of parameters Separate from parameters. if
Without parameters, you can directly Connection. The syntax format of the mailbox must be the same as that of the receiving site.
Next we will discuss SMTP commands and responses.
The email sending operation involves different data objects, which are connected by different parameters. Back
The repeat path is the parameter of the MAIL command, while the forward path is the parameter of the RCPT command, and the MAIL date is
DATA command parameters. These parameters or data objects must follow the command. This mode also requires
Different buffers are required to store these objects. that is to say, there is a reply path buffer.
Forwarding path buffer, and mail content buffer. Specific commands generate their own buffer,
Or clear one or more Buffered content.

HELLO (HELO)
This command is used to send SMTP to receive SMTP confirmation. The parameter field includes the SMTP sending host name.
Receive SMTP send SMTP confirmation to receive SMTP through the connection confirmation command. Command cited and OK response confirmation
Sending and receiving SMTP enters the initial state, that is, no operation is being performed and all statuses
Tables and buffers have been cleared by the quilt.

MAIL)
This command is used to start sending emails to one or more mailboxes. The parameter field includes the reply path.
The returned path contains the list of optional host and sender email addresses. When there is a host list, it is
Reply path source, which indicates that this mailbox is sent one by the host in the table (the first host
The last host that received the email. This table also returns non-pass messages to the sender.
. Because each transfer host address is added at the beginning of this table, it must use the send
IPCE is not a clear name for receiving IPCE (if they are not an IPCE. Error messages
The reply path of the message may be empty.
This command clears the reply path buffer, the forward path buffer, and the Mail content buffer, and
The reply path information of this command is inserted into the reply path buffer.
RECIPIENT (RCPT)
This command is used to determine the unique recipient of the Mail content; multiple recipients will be specified by multiple this command.
The forwarding path contains an optional host and a required destination mailbox. When the host list appears,
This is a source path, which indicates that the email must be sent to the previous host in the list. If you receive
If SMTP does not implement mail delivery and sending, it will return information such as unknown local user (550) to the user.
When an email is sent, the host must start with the forwarding path.
Move to the end of the reply path. When the Mail finally arrives at the destination, the receiving SMTP will mail it with its host
Enter your own name in the target email. For example
Number of emails,
FROM:
TO: <@ HOSTA. ARPA, @ HOSTB. ARPA: USERC@HOSTD.ARPA>
The format is as follows:
FROM: <@ HOSTA. ARPA: USERX@HOSTY.ARPA>
TO: <@ HOSTB. ARPA: USERC@HOSTD.ARPA>.
This command causes its forwarding path parameters to be added to the forwarding path buffer.

DATA (DATA)
The recipient uses the line following the command as the Mail content. This command causes the Mail content after this command
Add the email content buffer. The email content can contain all 128 ASCII characters. Email content
Including the end of a full stop row, that is, the following character sequence :" . ", It indicates
End of the email.
The end instruction of the Mail content requires the recipient to process the saved mail content now. This process will Reply
All content in the path buffer, forwarding path buffer, and mail content buffer is cleared. If the operation is successful,
The recipient must return an OK response. if the response fails, the response must also be returned.
When receiving a message from SMTP, whether it is used for forwarding or the email has arrived at the destination,
It must add the timestamp line at the beginning of the Mail content, which indicates that the recipient
Host and the identity of the email sending host, and the time and date when the email content was received. Forwarded mail
There will be timestamps like multiple rows. When receiving SMTP as the last transfer, it will return the path information
Insert rows into the email. This line includes . Here
The next station transfer means that the Mail will be sent to the target user, but in some cases, the Mail can
Further processing is required and sent by another email system.
The email address in the returned path may be different from the email address actually sent, which may occur in
You need to send a specific error handling mailbox instead of the sender. As described above,
The final mail content consists of one return path line and one or more timestamp lines after it. This
Some rows are followed by the header and body information of the Mail content.
A specific description is required when the Mail data instruction section after processing is successful. This situation may
When sending SMTP, it is found that when the Mail needs to be sent to multiple users, only one of
In this case, some messages are sent. In this case, you must send an OK response to the DATA command
The sender who receives the SMTP organization and sends an "non-deliverable mail" message to the information. In this information or
Send a list of unsuccessful recipients, or send a list of unsuccessful recipients multiple times.
All MAIL messages that cannot be passed are sent by the MAIL command.

Example of return path and receipt timestamp
Return-Path: <@ GHI. ARPA, @ DEF. ARPA, @ ABC. ARPA: JOE@ABC.ARPA>
Partitioned Ed: from GHI. ARPA by JKL. ARPA; 27 Oct 81 15:27:39 PST
Partitioned Ed: from DEF. ARPA by GHI. ARPA; 27 Oct 81 15:15:13 PST
Written Ed: from ABC. ARPA by DEF. ARPA; 27 Oct 81 15:01:59 PST
Date: 27 Oct 81 15:01:01 PST
From: JOE@ABC.ARPA
Subject: Improved Mailing System Installed
To: SAM@JKL.ARPA

This is to inform you that...


SEND (SEND)
This command starts a sending command to send emails to one or more terminals. Parameters
The domain contains a reply path. if this command is successful, the Mail will be sent to the terminal.
The reply path includes an optional host list and the sender's email address. When the host list appears,
This indicates that this is a transfer path, and an email is sent to this path by each host.
(The first host in the list is the last host ). This table is used to return non-transmitted signals to the sender.
Because each transfer host address is added at the beginning of this table, it must use the sending IPCE instead
IPCE (if they are not an IPCE. Reply path of some error information
It may be empty.
This command clears the reply path buffer, the forward path buffer, and the Mail content buffer, and
The reply path information of this command is inserted into the reply path buffer.

Send or mail (SOML)
This command is used to start a mail operation to send the mail content to one or more terminals, or
Transfer to the mailbox. For each receiver, if the receiver terminal opens, the Mail content will be sent
The recipient's terminal. Otherwise, the email is sent to the recipient's mailbox. The parameter field includes the reply path.
The command is successfully sent to the terminal or mailbox.
The reply path includes an optional host list and the sender's email address. When the host list appears
It indicates that this is a transfer path, and the mail is sent to each host through this path (column
The first host on the table is the last host ). This table is used to return non-transmitted signals to the sender. Because
Add each transmission host address to the beginning of this table, and it must use the sending IPCE instead of the receiving
IPCE (if they are not an IPCE) is a clear name. The reply path for some error information is acceptable.
Can be empty.
This command clears the reply path buffer, the forward path buffer, and the Mail content buffer, and
The reply path information of this command is inserted into the reply path buffer.

Send and mail (SAML)
This command is used to start a mail operation to transfer the Mail content to one or more terminals and
To your mailbox. If the recipient terminal opens, the Mail content will be sent to the recipient's terminal and received
The recipient's email address. The parameter field includes the reply path. if the information is successfully sent to the mailbox, this command is
.
The reply path includes an optional host list and the sender's email address. When the host list appears
It indicates that this is a transfer path, and the mail is sent to each host through this path (column
The first host on the table is the last host ). This table is used to return non-transmitted signals to the sender. Because
Add each transmission host address to the beginning of this table, and it must use the sending IPCE instead of the receiving
IPCE (if they are not an IPCE) is a clear name. The reply path for some error information is acceptable.
Can be empty.
This command clears the reply path buffer, the forward path buffer, and the Mail content buffer, and
The reply path information of this command is inserted into the reply path buffer.

RESET (RSET)
This command indicates that the Mail sending operation will be abandoned. Any stored sender, receiver, and email
The capacity should be discarded. all buffer and status tables should be cleared. the receiver must return an OK response.

VERIFY (VRFY)
This command requires the recipient to confirm that the parameter is a user. If this is (known) the user name,
Returns the full name of the user and the specified email address. This command is used for the reply path buffer, forward path buffer, and Mail
The content buffer has no effect.

EXPAND (EXPN)
This command requires the recipient to confirm that the parameter specifies a mail sending list.
List. If this is (known) the user name, return the full name of the user.
The specified email address. This command does not exist in the reply path buffer, the forwarding path buffer, and the Mail content buffer.
Impact.

HELP (HELP)
This command causes the recipient to send HELP information to the HELP command sender. This command can contain parameters,
And return specific information as a response. This command applies to the reply path buffer, forward path buffer, and mail.
The content buffer has no effect.

NOOP (NOOP)
This command does not affect any parameters and commands that have been issued. It only indicates that there are no operations, not
The recipient sends an OK response. This command is used for the reply path buffer, forward path buffer, and Mail
The content buffer has no effect.

QUIT)
This command indicates that the recipient must send an OK response and then disable the transfer channel. The recipient is receiving QUIT
Do not close the communication channel before making a response. The sender sends the QUIT command and receives the response
Do not disable the channel before. Even if an error occurs, the channel should not be closed. If the connection is closed in advance
The recipient should cancel all pending operations just like the RSET command, but will not restore the operations that have already been done
. The sender should assume that the command and operation are still supported, just like receiving a temporary error (4XX ).
.

TURN)
This command specifies that the recipient either sends an OK response and changes the role to send SMTP, or sends a rejection message.
And keep your role. If program A is sending SMTP now, it sends the TURN command and receives
OK (250) responds, and it becomes the receiving SMTP. Program A enters the initial state, as if the communication channel was just
Open the same, then it sends 220 ready service signal. If Program B is now receiving SMTP, it sends
After the TURN command is output, the OK (250) response is received, and it is changed to sending SMTP. Program A enters the initial state
As if the communication channel has just opened, then it is ready to receive the 220 ready service signal.
To refuse to change the role, the receiver can send a 502 response.
The order of these commands is limited. The first command of the dialog must be the HELLO command,
This command can also be used in subsequent sessions. If the HELLO command parameter is unacceptable, it must be returned
A 501 Failure response is returned, and the received SMTP must be in the same status as the one just received.
The NOOP, HELP, EXPN, and VRFY commands can be used at any time of a session. MAIL, SEND, SOML or
The SAML command starts an email operation. Once started, the RCPT and DATA commands will be sent. Email operation
Can be terminated by the RSET command. One or more operations can be performed in a session.
If the parameter is unacceptable at the beginning of the operation, you must return the 501 failed response and receive the SMTP
It must be in the same status as the previous one. If an error occurs in the command sequence in the operation, 503 error must be returned.
Failed to respond, and the received SMTP must be in the same status as the previous one.
The Last Command of the session must be the QUIT command. This command cannot be used at other times of the session. Http://www.fanqiang.com)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.