Extension of the SMTP service to the command stream

Source: Internet
Author: User
Tags client

1. Summary

This article primarily defines an SMTP service extension that uses this service extension server to indicate how many instructions it can receive in a TCP send operation. Using multiple operations in a TCP send instruction can greatly improve the efficiency of the system.

2. Introduce

Although the SMTP service has been widely used, the effect is good, but the expansion of it is also essential. If a network takes a long time to connect, the effect of the SMTP operation can be very poor. SMTP time is spent waiting for a command. If you can make the SMTP client command running water, that is, send many instructions at a time, it will improve the efficiency of the operation. However, this was not stated in the previous agreement, and the customer was unable to know how many instructions the server could receive at the same time. As a result, some of the following problems arise:

The connection is out of control or the buffer is full;

It is sometimes not necessary to clear the TCP input buffer when the SMTP command fails;

Some commands will not justify it as a failure, for example, some servers will not receive the data command if the previous Reptto fails, regardless of the success of the previous command Rcptto, and some servers can receive the data command after the Rcptto command fails.

3. Command Flow Expansion Framework

It is defined as follows:

The name of this service extension is water (pipelining);

The extended value associated with the EHLO is pipelining;

Pipeliningehlo no longer parameters;

Mailfrom or Rcptto commands do not attach other parameters;

No additional SMTP commands are attached;

4. Flow Service Expansion

When the client wants to use running water, it sends the EHLO command to the server, indicating that the server supports the SMTP service running water if the server responds with a 250 response including pipelining.

4.1. Customers use water

When the customer knows that the server can support running water, the customer can transfer multiple commands (called command groups) to the server without sending a wait and then sending a special rset,mailfrom,sendfrom,somlfrom, Samlfrom and Rcptto can appear anywhere in the command group. Ehlo,data,vrfy,expn,turn,quit and NoOp can only appear last in the command group because their success will change the state in which the SMTP command is located. Commands that are generated by other SMTP extensions can only appear in the last position in the group. The actual routed command can be the first command in the group.



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.