[C ++ RFC] SMTP protocol rfc821 Chinese

Source: Internet
Author: User
Tags all mail

1. Introduction

The goal of Simple Mail Transfer Protocol (SMTP) is to transmit mail reliably and efficiently, which is independent of the transfer protocol.
The delivery subsystem only requires a channel that can ensure the sequence of transmitted data units. Appendix A, B, C
And D describe the use of SMTP in different transfer services. The glossary also defines
.
An important feature of SMTP is its ability to transmit mails during transmission. The transfer service provides
Inter-process communication environment (IPCE), which can include one network, several networks, or one network
. It is important to understand that the transfer system (or IPCE) is not one-to-one. Process may be straight
And other processes communicate with each other through known IPCE. An email is an application or inter-process communication. Mail
You can send emails through processes connected to different IPCE instances across the network. What's more, mail
The parts can be transmitted by the host over different networks.

2. SMTP Model

SMTP design is based on the following communication model: for user mail requests, send SMTP establishment and Connection
Create a two-way transmission channel between receiving and SMTP. Receiving SMTP can be either the final receiver or
Inter-carrier. The SMTP command is sent by the sending SMTP, and received by the receiving SMTP, and the response is reversed.
Send.
Once the transfer channel is established, the SMTP sender sends the MAIL command to specify the MAIL sender. If
If an SMTP recipient can receive an email, an OK response is returned. The SMTP sender then sends the RCPT command to confirm the email.
Whether to receive the message. If the SMTP receiver receives the message, an OK response is returned. If the message cannot be received, an OK response is sent.
Refuse to receive the response (but do not stop the entire email operation). The two parties will repeat it multiple times. When the recipient receives
After all emails are sent, a special sequence will be received. If the recipient successfully processes the emails, an OK response will be returned.
Answer.
SMTP provides a mail transfer mechanism. If the recipient and the sender are connected to the same transmission service
The email can be directly sent from the sender's host to the receiver's host; or, when the two are not in the same
In the transfer service, it is transmitted through the relay SMTP server. To provide relay capabilities for the SMTP server
Force, it must have the final destination host address and email name.
The MAIL command parameter is the reply path, which specifies where the MAIL comes from, and the RCPT command parameter is
It specifies the path to which the email is sent. The forward path is the source path, and the reply path is the return path.
(It is used to return an email when an error occurs ).
When a message is sent to different recipients, SMTP sends the same message to different recipients.
There is a strange syntax for mail commands and responses, and there are also
Code. In the following example, we can see which actual commands and responses are used. Complete Life
Orders and responses are in section 4.
Commands and responses are case-insensitive. That is, commands and responses can be in uppercase, lowercase, or
But this is not necessarily true for the user's Mail name, because some hosts
The name is case sensitive. In this way, the SMTP implementation retains the user's email name as the initial form,
Host names are case insensitive.
Commands and responses are composed of the ASCII alphabet. When the shipper service provides an eight-byte Transfer Channel
Characters are correctly transmitted, and the highest bit is filled with 0. After a common command or response format is specified
Numbers are expressed by strings similar to languages, such as "<string>" or "<reverse-path> ",
Angle brackets indicate that this is a language-like variable.

3. SMTP process

This section provides some SMTP processes. The first describes the basic sending process (defined
Sending operation ). Next describe the forward mail, confirm the email name and extended email list, and send it to the end
Enable and disable switching. At the end of this section is a description of the interrupt and email domain. The example in this section is only 1.
For a complete example of the sequence of some commands and responses, see Appendix F.

3.1. Mail

There are three steps in the SMTP sending operation. The operation is identified by the MAIL command. Series or
More RCPT commands are followed by the receiver information, and then the Data command is used to list sent emails.
Content, and finally the mail content indicator to confirm the operation.

The first step is the MAIL command. <reverse-path> includes the source email address.

Mail <SP> from: <reverse-path> <CRLF>

This command tells the recipient that the new sending operation has started. Please reset all status tables and buffers.
It provides a reverse path to return error information. If the request is received, the receiver returns
250 OK response. <Reverse-path> not only includes the mailbox, but also the host and source email-
Routing, the first host is the host that sends this command.

The second step in the process is to send the RCPT command.

RCPT <SP> to: <forward-path> <CRLF>

This command identifies the receiver in the forward path. If the command is received, the receiver returns
250 OK, and store the forward path. If the receiver is unknown, the receiver returns a 550 failure
Response. This process may be repeated several times.
<Forward-path> includes not only emails, but also route tables of hosts and destination mailboxes.
The first host is the host that receives commands. The third step in the process is to send the data command.

Data <CRLF>

If the command is received, the receiver returns a 354 intermediate response and determines that
All rows are mail content. After receiving and storing the ending letter, the receiver sends a 250 OK response.
Because the email is sent through the transmission channel, you must specify the end of the email content so that you can reply to the Dialog
To start again. SMTP sends only one full stop message in the last line to indicate the end of the mail content.
Receiver. This symbol is filtered out in a process that is transparent to users without affecting normal data.
Note: The Mail content includes the following prompts: date, subject, to, CC, from.

The email content indicator confirms the email operation and informs the recipient that the data can be stored and sent again. For example
If this command is received, the receiver returns a 250 OK response. The Data command is only available in emails.
Or the source fails.

The above process is a sending operation. These commands can only be used in the preceding sequence. Example
Indicates the use of these commands in a sending operation.
SMTP process example: In this example, the Smith of the Alpha. Arpa host sends an email to the beta. Arpa host.
Jones, green, and brown of, assume that the host Alpha is directly connected to the host beta.

S: mail from: <Smith@Alpha.ARPA>
R: 250 OK
S: rcpt to: <Jones@Beta.ARPA>
R: 250 OK
S: rcpt to: <Green@Beta.ARPA>
R: 550 No such user here
S: rcpt to: <Brown@Beta.ARPA>
R: 250 OK
S: DATA
R: 354 Start mail input; end with <CRLF>. <CRLF>
S: Blah blah...
S:... and so on
S: <CRLF>. <CRLF>
R: 250 OK
This email was received by the first two people, and the third person had no email on this host.

3.2. Forwarding
The destination address in <forward-path> is incorrect, but the recipient knows that the destination address is correct.
. In these examples, one of the following responses should allow the sender and obtain the correct address.

251: the user is not local; it will forward to <forward-path>.

This response means that the receiver SMTP knows that the user's mailbox is on another host, and it means
In the future, we will use the correct turning path. Please note that the host or user, or both of them are not
. The receiver is responsible for transmitting messages.

551: the user is not local. Please try <forward-path>

This response means that the receiving SMTP knows that the user's mailbox is on another host, and it means that
The correct forwarding path. Note that the host or user, or both, are different. Connect
The recipient refuses to receive the user's mail. The sender must resend the email Based on the provided information or send the email to the original user.
The sender returns an error message. The following example shows the applications with these responses.

Forwarding example
S: rcpt to: <Postel@USC-ISI.ARPA>
R: 251 User not local; will forward to <Postel@USC-ISIF.ARPA>
Or
S: rcpt to: <Paul@USC-ISIB.ARPA>
R: 551 User not local; please try <Mockapetris@USC-ISIF.ARPA>

3.3. Validation and Expansion

SMTP provides additional user name confirmation and extended Mail List functions. These functions are composed of VREF and
The EXPN Command is complete. All of them are strings. For VREF commands, string parameters refer to
Account name. The response to this command should include the user name and the user's email address. For the EXPN command, the character
String parameters refer to the Mail List, and more than one response to this command should be included in all lists
User name and their email address.
"User Name" is a redundant project, which is intentionally added. If the host uses VREF
Command and EXPN command, and the local mailbox must provide a user name for confirmation by the host. If you select
It is also allowed to use another string as the user name.
In some hosts, the mailbox list and the proxy of One mailbox are a little unclear, because the average number
The data structure may include two types of entries. If you want to confirm the email list, make sure that
Set the response. After receiving this message, the host will send the email to all the addresses on the list,
If no response is received, an error is reported. For example,
"550 that is a mail list, not a user name ". If the request is used to extend a user name,
A definite response may be formed by returning a list containing a name. If no definite response is received,
An error is reported. (For example, "550 that is a user name, not a mailing list ").
In the case of multiple responses (usually for EXPN), each response specifies a mailbox.
In case of a fuzzy request, for example, "VRFY Smith", the two Smith responses must be
"553 user ambiguous ".

The user name is confirmed as follows: Example 3:
Confirm User Name
S: VRFY Smith R: 250 Fred Smith <Smith@USC-ISIF.ARPA>
Or
S: VRFY Smith
R: 251 user not local; will forward to <Smith@USC-ISIQ.ARPA>
Or
S: VRFY Jones
R: 550 string does not match anything.
Or
S: VRFY Jones
R: 551 User not local; please try <Jones@USC-ISIQ.ARPA>
Or
S: VRFY Gourzenkyinplatz
R: 553 User ambiguous.

The mailbox list requires multiple responses as follows:
S: EXPN Example-People
R: 250-Jon Postel <Postel@USC-ISIF.ARPA>
R: 250-Fred Fonebone <Fonebone@USC-ISIQ.ARPA>
R: 250-Sam Q. Smith <SQSmith@USC-ISIQ.ARPA>
R: 250-Quincy Smith <@ USC-ISIF.ARPA: Q-Smith@ISI-VAXA.ARPA>
R: 250-<joe@foo-unix.ARPA>
R: 250 <xyz@bar-unix.ARPA>
Or
S: EXPN Executive-memory room-List
R: 550 Access Denied to You.

The string command parameters of VERF and EXPN commands cannot be limited due to different implementations.
. In some systems, the EXPN command parameter may be a file name containing the mail list,
However, there are many different file structures on the Internet.
VRFY and EXPN commands are not included in the minimum implementation. They are not required when they are implemented.
Implemented in the inter-transmission mode.

3.4. send and receive the mail (sending)
 
SMTP is mainly used to send emails to users' mailboxes. Provided by some hosts
The function is to send emails to the user's terminal (if the user is on the terminal ). Send email to user
The email address is called mailing.
(Sending ). Because the implementation of the two is very similar on some hosts
Put in SMTP. However, obtaining mail commands is not available in the minimum implementation of SMTP. User
It should be able to write information to the terminal. Most hosts allow users to accept or reject
Similar information.
The following three commands are defined to support receiving letters. They are used for MAIL commands instead of MAIL
Command to indicate the special significance of receiving SMTP operations:
SEND <SP> FROM: <reverse-path> <CRLF>

The SEND command requires that the mail content be directly transmitted to the user terminal. If the user does not open the terminal (or
Is not received by the terminal), 450 response will return an RCPT command. If the message is successfully sent,
This operation is successful.

SOML <SP> FROM: <reverse-path> <CRLF>

The Send or MaiL Command requires that the MaiL content be directly sent to the user's terminal (if the user
On the terminal ). If the user is not on the terminal, the email content is directly sent to the mailbox. If the email is sent
Sent to the user terminal or user mailbox.

SAML <SP> FROM: <reverse-path> <CRLF>

The Send and MaiL commands require that the MaiL content be directly sent to the user terminal (if the user is on the terminal ).
In any case, the mail will enter the mailbox. If the mail enters the mailbox, the sending operation is successful.
The responses for MAIL commands are the same as those for these commands.

3.5. Open and Close

When a transfer channel is opened, some information needs to be exchanged to determine the identities of both parties. The following command is:
Used to open and close:
HELO <SP> <domain> <CRLF>
QUIT <CRLF>
In the HELLO command, the host sends the command by itself. This command can be interpreted as: "HELLO,
I am XX ".

Example of opening a connection
R: 220 BBN-UNIX.ARPA Simple Mail Transfer Service Ready
S: HELO USC-ISIF.ARPA
R: 250 BBN-UNIX.ARPA

Example of disabling a join
S: QUIT
R: 221 BBN-UNIX.ARPA Service closing transmission channel

3.6. Forwarding

The forwarding path may be in the following format: "@ ONE, @ TWO: JOE @ THREE". Here, ONE, TWO
And three are hosts. This format emphasizes the differences between addresses and paths. The email address is an absolute address.
Paths are information about how to arrive. These two concepts should not be confused.
In terms of concept, the element of the forwarding path is moved to the reply path from one SMTP server to another.
SMTP server information. The reply path is a reverse Data Source Path, for example, from the bit of the current information
To the initiator. When an SMTP server deletes its own tag from the forwarding path and inserts it
In the reply path, it must use a name that can be understood by its sending environment to prevent its
Names are interpreted as different names in different environments.
If the first element in the forwarding path of the message received by SMTP is not the flag of this SMTP
The element is used to determine the next SMTP server to be sent instead of being deleted from the forwarding path. In
In any case, SMTP adds its own tag to the reverse path.
When you use the source path, you can receive the forwarded mail from SMTP and send it to another receiving SMTP server.
The receiving server can accept or reject emails forwarded to local users. Receive SMTP by marking it
Change the command parameters from the forward path to the reply path. At this time, the receiving SMTP is changed to sending
Send SMTP, it establishes the SMTP channel to the next forwarding path, and then it sends
Send email.
The first host in the reply path should be the host that sends the SMTP command.
The host should be the host that receives SMTP commands.
Note: The forwarding and reply paths appear in SMTP commands and responses, but do not necessarily appear in
. That is to say, there is no such path. In particular, this format appears in the ":",
"From:" and "CC.
If the SMTP Server accepts the forwarding task, but later it finds that the forwarding path is incorrect or
Other principles cannot send emails. It must establish an "undeliverable mail" signal to send emails.
The sender of the email.
This signal must be sent from the SMTP service of this host. Of course, this server should not report
Error message. One way to prevent this error reporting loop is when the MAIL command of the signal is returned
Leave the path empty. When this information is sent, the reply path can also be left blank. After a MAIL command
The reply path is empty in the following format:
Mail from: <>

The following example shows the mail information that cannot be sent. This message is an email sent to JOE from HOSTW.
An error occurred when HOSTX needs to pass HOSTZ to HOSTY. The example we see is in HOSTX
And HOSTY.

Example of mail Information Not Allowed
S: mail from: <>
R: 250 OK
S: rcpt to: <@ HOSTX. ARPA: JOE@HOSTW.ARPA>
R: 250 OK
S: DATA
R: 354 send the mail data, end.
S: Date: 23 Oct 81 11:22:33
S: From: SMTP@HOSTY.ARPA
S: To: JOE@HOSTW.ARPA
S: Subject: Mail System Problem
S:
S: Sorry JOE, your message to SAM@HOSTZ.ARPA lost.
S: HOSTZ. ARPA said this:
S: "550 No Such User"
S :.
R: 250 OK

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 of <CRLF>
End string. In the case of parameters, the command itself is separated by <SP> and the parameter, if
Without parameters, you can directly connect to <CRLF>. 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: <USERX@HOSTY.ARPA>
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: "<CRLF>. <CRLF>", 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 the <reverse-path> information in the sending command. 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.

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.