«SMTP»–ի խմբագրումների տարբերություն

Content deleted Content added
No edit summary
No edit summary
Տող 5.
 
Չնայած էլեկտրոնային նամակների սերվերների և նամակների փոխանակման գործակալները նամակների ուղարկման և ստացման համար օգտագործում են SMTP, օգտագործողի մակարդակում ծրագրերը SMTP օգտագործում են միայն նամակները սերվերին ուղարկելու համար: Նամակները ստանալու համար ծրագրերը օգտագործում են կա՛մ [[POP3]], կա՛մ [[IMAP]] պրոտոկոլները:
<!--
 
Although electronic [[Message transfer agent|mail servers and other mail transfer agents]] use SMTP to send and receive mail messages, user-level client mail applications typically use SMTP only for sending messages to a mail server for [[mail relay|relaying]]. For receiving messages, client applications usually use either [[Post Office Protocol|POP3]] or [[Internet Message Access Protocol|IMAP]].
 
Although proprietary systems (such as [[Microsoft Exchange Server|Microsoft Exchange]] and [[Lotus Notes]]/[[IBM Lotus Domino|Domino]]) and [[webmail]] systems (such as [[Hotmail]], [[Gmail]] and [[Yahoo! Mail]]) use their own non-standard protocols to access mail box accounts on their own mail servers, all use SMTP when sending or receiving email from outside their own systems.
 
==History==
Various forms of one-to-one [[Instant message|electronic messaging]] were used in the 1960s. People communicated with one another using systems developed for specific [[Mainframe computer|mainframe]] computers. As more computers were interconnected, especially in the US Government's [[ARPANET]], standards were developed to allow users of different systems to e-mail one another. SMTP grew out of these standards developed during the 1970s.
 
SMTP can trace its roots to two implementations described in 1971: the Mail Box Protocol, whose implementation has been disputed,<ref>[http://www.multicians.org/thvv/mail-history.html The History of Electronic Mail]'', [[Tom Van Vleck]]: "''It is not clear this protocol was ever implemented''"</ref> but is discussed in RFC 196 and other RFCs, and the SNDMSG program, which, according to RFC 2235, [[Ray Tomlinson]] of [[BBN Technologies|BBN]] invented for [[TOPS-20#TENEX|TENEX]] computers to send mail messages across the ARPANET.<ref>[http://openmap.bbn.com/~tomlinso/ray/firstemailframe.html ''The First Network Email''], [[Ray Tomlinson]], BBN</ref><ref>Picture of "[http://openmap.bbn.com/~tomlinso/ray/ka10.html The First Email Computer]" by Dan Murphy, a [[PDP-10]]</ref><ref>[http://www.opost.com/dlm/tenex/ Dan Murphy's TENEX and TOPS-20 Papers]{{dead link|date=July 2012}}</ref> Fewer than 50 hosts were connected to the ARPANET at this time.<ref>RFC 2235</ref>
 
Further implementations include FTP Mail<ref>RFC 469 – Network Mail Meeting Summary</ref> and Mail Protocol, both from 1973.<ref>RFC 524 – A Proposed Mail Protocol</ref> Development work continued throughout the 1970s, until the ARPANET converted into the modern Internet around 1980. [[Jon Postel]] then proposed a [[Mail Transfer Protocol]] in 1980 that began to remove the mail's reliance on [[FTP]].<ref>RFC 772 – Mail Transfer Protocol</ref> SMTP was published as RFC 788 in November 1981, also by Postel.
 
The SMTP standard was developed around the same time as [[Usenet]], a one-to-many communication network with some similarities.
 
SMTP became widely used in the early 1980s. At the time, it was a complement to [[UUCP|Unix to Unix Copy Program]] (UUCP) mail, which was better suited for handling e-mail transfers between machines that were intermittently connected. SMTP, on the other hand, works best when both the sending and receiving machines are connected to the network all the time. Both use a [[store and forward]] mechanism and are examples of [[push technology]]. Though Usenet's [[newsgroups]] are still propagated with UUCP between servers,<ref>[http://tldp.org/HOWTO/Usenet-News-HOWTO/x64.html Tldp.org]</ref> UUCP as a mail transport has virtually disappeared<ref>[http://tools.ietf.org/html/draft-barber-uucp-project-conclusion-05 draft-barber-uucp-project-conclusion-05 – The Conclusion of the UUCP Mapping Project<!-- Bot generated title -->]</ref> along with the "[[bang path]]s" it used as message routing headers.<ref>The article about [[Sender Rewriting Scheme|sender rewriting]] contains technical background info about the early SMTP history and source routing before RFC 1123.</ref>
 
[[Sendmail]], released with [[Berkeley Software Distribution|4.1cBSD]], right after RFC 788, was one of the first mail transfer agents to implement SMTP.<ref>{{Citation | author = Eric Allman| year = 1983| title = Sendmail – An Internetwork Mail Router| series = BSD UNIX documentation set| publisher = University of California| publication-place = Berkeley| url = http://docs.freebsd.org/44doc/smm/09.sendmail/paper.pdf| accessdate =June 29, 2012}}</ref> Over time, as BSD Unix became the most popular operating system on the Internet, sendmail became the most common MTA (mail transfer agent).<ref>{{Citation |author=Craig Partridge |year=2008 |title=The Technical Development of Internet Email |publisher=IEEE Computer Society |series=IEEE Annals of the History of Computing|doi=10.1109/MAHC.2008.32 |url=http://www.ir.bbn.com/~craig/email.pdf }}</ref> Some other popular SMTP server programs include{{chronology citation needed|date=June 2012}} [[Postfix (software)|Postfix]], [[qmail]], [[Novell GroupWise]], [[Exim]], [[Novell NetMail]], [[Microsoft Exchange Server]], [[Sun Java System Messaging Server]].
 
Message submission (RFC 2476) and [[SMTP-AUTH]] (RFC 2554) were introduced in 1998 and 1999, both describing new trends in e-mail delivery. Originally, SMTP servers were typically internal to an organization, receiving mail for the organization ''from the outside'', and relaying messages from the organization ''to the outside''. But as time went on, SMTP servers (mail transfer agents), in practice, were expanding their roles to become [[message submission agent]]s for [[Mail user agent]]s, some of which were now relaying mail ''from the outside'' of an organization. (e.g. a company executive wishes to send e-mail while on a trip using the corporate SMTP server.) This issue, a consequence of the rapid expansion and popularity of the [[World Wide Web]], meant that SMTP had to include specific rules and methods for relaying mail and authenticating users to prevent abuses such as relaying of unsolicited e-mail ([[E-mail spam|spam]]). Work on message submission (RFC 2476) was originally started because popular mail servers would often rewrite mail in an attempt to fix problems in it, for example, adding a domain name to an unqualified address. This behavior is helpful when the message being fixed is an initial submission, but dangerous and harmful when the message originated elsewhere and is being relayed. Cleanly separating mail into submission and relay was seen as a way to permit and encourage rewriting submissions while prohibiting rewriting relay. As spam became more prevalent, it was also seen as a way to provide authorization for mail being sent out from an organization, as well as traceability. This separation of relay and submission quickly became a foundation for modern email security practices.
 
As this protocol started out purely [[ASCII]] text-based, it did not deal well with binary files, or characters in many non-English languages. Standards such as Multipurpose Internet Mail Extensions ([[MIME]]) were developed to encode binary files for transfer through SMTP. Mail transfer agents (MTAs) developed after [[Sendmail]] also tended to be implemented [[8-bit-clean]], so that the alternate "just send eight" strategy could be used to transmit arbitrary text data (in any 8-bit ASCII-like character encoding) via SMTP. [[Mojibake]] was still a problem due to differing character set mappings between vendors, although the email addresses themselves still allowed only [[ASCII]]. 8-bit-clean MTAs today tend to support the [[8BITMIME]] extension, permitting binary files to be transmitted almost as easily as plain text. Recently the [[Extended_SMTP#SMTPUTF8|SMTPUTF8]] extension was created to support [[UTF-8]] text, allowing international content and addresses in non-Latin scripts like Cyrillic or Chinese.
 
Many people contributed to the core SMTP specifications, among them [[Jon Postel]], [[Eric Allman]], Dave Crocker, [[Ned Freed]], Randall Gellens, [[John Klensin]], and [[Keith Moore]].
 
==Mail processing model==
[[Image:SMTP-transfer-model.svg|thumb|right|300px|Blue arrows can be implemented using SMTP variations.]]
 
Email is submitted by a mail client (MUA, [[mail user agent]]) to a mail server (MSA, [[mail submission agent]]) using SMTP on [[Transmission Control Protocol|TCP]] port 587. Most [[Mailbox Provider|mailbox providers]] still allow submission on traditional port 25. From there, the MSA delivers the mail to its mail transfer agent (MTA, [[mail transfer agent]]). Often, these two agents are just different instances of the same software launched with different options on the same machine. Local processing can be done either on a single machine, or split among various appliances; in the former case, involved processes can share files; in the latter case, SMTP is used to transfer the message internally, with each host configured to use the next appliance as a [[smart host]]. Each process is an MTA in its own right; that is, an<!--it's spelled out ESS-EMM-TEE-PEE, so please do NOT 'correct' this to "a SMTP"--> SMTP server.
 
The boundary MTA has to locate the target host. It uses the [[Domain name system]] (DNS) to look up the mail exchanger record (MX record) for the recipient's domain (the part of the [[email address]] on the right of <tt>@</tt>). The returned MX record contains the name of the target host. The MTA next connects to the exchange server as an SMTP client. (The article on [[MX record]] discusses many factors in determining which server the sending MTA connects to.)
 
Once the MX target accepts the incoming message, it hands it to a [[mail delivery agent]] (MDA) for local mail delivery. An MDA is able to save messages in the relevant [[Email mailbox|mailbox]] format. Again, mail reception can be done using many computers or just one —the picture displays two nearby boxes in either case. An MDA may deliver messages directly to storage, or [[E-mail forwarding|forward]] them over a network using SMTP, or any other means, including the [[Local Mail Transfer Protocol]] (LMTP), a derivative of SMTP designed for this purpose.
 
Once delivered to the local mail server, the mail is stored for batch retrieval by authenticated mail clients (MUAs). Mail is retrieved by end-user applications, called email clients, using [[Internet Message Access Protocol]] (IMAP), a protocol that both facilitates access to mail and manages stored mail, or the [[Post Office Protocol]] (POP) which typically uses the traditional [[mbox]] mail file format or a proprietary system such as Microsoft Exchange/Outlook or [[Lotus Notes]]/[[IBM Lotus Domino|Domino]]. [[Webmail]] clients may use either method, but the retrieval protocol is often not a formal standard.
 
{{anchor|Internet Message Format}}
SMTP defines message ''transport'', not the message ''content''. Thus, it defines the mail ''envelope'' and its parameters, such as the [[envelope sender]], but not the header (except ''trace information'') nor the body of the message itself. STD 10 and RFC 5321 define SMTP (the envelope), while STD 11 and RFC 5322 define the message (header and body), formally referred to as the [[Internet Message Format]].
 
==Protocol overview==
SMTP is a [[Connection-oriented communication|connection-oriented]], [[text-based protocol]] in which a mail sender communicates with a mail receiver by issuing command strings and supplying necessary data over a reliable ordered data stream channel, typically a [[Transmission Control Protocol]] (TCP) connection. An ''SMTP session'' consists of commands originated by an SMTP [[Client (computing)|client]] (the initiating [[Software agent|agent]], sender, or transmitter) and corresponding responses from the SMTP [[Server (computing)|server]] (the listening agent, or receiver) so that the session is opened, and session parameters are exchanged. A session may include zero or more SMTP transactions. An ''SMTP transaction'' consists of three command/reply sequences (see example below.) They are:
 
# '''MAIL''' command, to establish the return address, a.k.a. Return-Path,<ref>[http://cr.yp.to/smtp/mail.html "The MAIL, RCPT, and DATA verbs"], [D. J. Bernstein]</ref> reverse-path,<ref>RFC5321 Section-7.2</ref> [[bounce address]], mfrom, or envelope sender. This is the address to which [[bounce message]]s should be sent.
# '''RCPT''' command, to establish a recipient of this message. This command can be issued multiple times, one for each recipient. These addresses are also part of the envelope.
# '''DATA''' to signal the beginning of the ''message text''; the content of the message, as opposed to its envelope. It consists of a ''message header'' and a ''message body'' separated by an empty line. DATA is actually a group of commands, and the server replies twice: once to the ''DATA command'' proper, to acknowledge that it is ready to receive the text, and the second time after the end-of-data sequence, to either accept or reject the entire message.
 
Besides the intermediate reply for DATA, each server's reply can be either positive (2xx reply codes) or negative. Negative replies can be permanent (5xx codes) or transient (4xx codes). A '''reject''' is a permanent failure by an SMTP server; in this case the SMTP client should send a bounce message. A '''drop''' is a positive response followed by message discard rather than delivery.
 
The initiating host, the SMTP client, can be either an end-user's [[email client]], functionally identified as a [[mail user agent]] (MUA), or a relay server's [[mail transfer agent]] (MTA), that is an SMTP server acting as an SMTP client, in the relevant session, in order to relay mail. Fully capable SMTP servers maintain queues of messages for retrying message transmissions that resulted in transient failures.
 
A MUA knows the ''outgoing mail'' SMTP server from its configuration. An SMTP server acting as client, i.e. ''relaying'', typically determines which SMTP server to connect to by looking up the [[MX record|MX]] (Mail eXchange) [[Domain Name System|DNS]] resource record for each recipient's [[domain name]]. Conformant MTAs (not all) fall back to a simple [[A record]] in case no MX record can be found. Relaying servers can also be configured to use a [[smart host]].
 
An SMTP server acting as client initiates a [[Transmission Control Protocol|TCP]] connection to the server on the "[[well-known port]]" designated for SMTP: [[TCP and UDP port|port]] 25. MUAs should use port 587 to connect to an MSA. The main difference between an MTA and an MSA is that [[SMTP Authentication]] is mandatory for the latter only.
 
===SMTP vs mail retrieval===
SMTP is a delivery protocol only. In normal use, mail is "pushed" to a destination mail server (or next-hop mail server) as it arrives. Mail is routed based on the destination server, not the individual user(s) to which it is addressed. Other protocols, such as the [[Post Office Protocol]] (POP) and the [[Internet Message Access Protocol]] (IMAP) are specifically designed for use by individual users retrieving messages and managing [[email mailbox|mail boxes]]. To permit an intermittently-connected mail server to ''pull'' messages from a remote server on demand, SMTP has a feature to initiate mail queue processing on a remote server (see [[#Remote Message Queue Starting|Remote Message Queue Starting]] below). POP and IMAP are unsuitable protocols for relaying mail by intermittently-connected machines; they are designed to operate after final delivery, when information critical to the correct operation of mail relay (the "mail envelope") has been removed.
 
===Remote Message Queue Starting===<!-- [[ETRN]] article links here -->
Remote Message Queue Starting is a feature of SMTP that permits a remote host to start processing of the mail queue on a server so it may receive messages destined to it by sending the <tt>TURN</tt> command. This feature however was deemed insecure<ref>RFC 1985, ''SMTP Service Extension for Remote Message Queue Starting'', J. De Winter, The Internet Society (August 1996)</ref> and was extended in RFC 1985 with the <tt>[[ETRN]]</tt> command which operates more securely using an [[authentication]] method based on Domain Name System information.
 
===On-Demand Mail Relay===
{{Main|On-Demand Mail Relay}}
'''On-Demand Mail Relay''' ('''ODMR''') is an [[SMTP extension]] standardized in RFC 2645 that allows an intermittently-connected SMTP server to receive email queued for it when it is connected.
 
===Internationalization===
Many users whose native script is not Latin based have had difficulty with the Latin email address requirement. Often this leads to meaningless, but easy to type, locale addresses.
 
RFC 6531 was created to solve that problem, providing internationalization features for SMTP, the SMTPUTF8 extension. RFC 6531 provides support for multi-byte and non-ASCII characters in email addresses, such as Pelé@live.com (simple diacritic), δοκιμή@παράδειγμα.δοκιμή, and 测试@测试.测试. Current support is limited, but there is strong interest in broad adoption of RFC 6531 and the related RFCs in countries like China that have a large user base where Latin (ASCII) is a foreign script.
 
==Outgoing mail SMTP server==
An [[e-mail client]] needs to know the IP address of its initial SMTP server and this has to be given as part of its configuration (usually given as a [[Domain name system|DNS]] name). This server will deliver outgoing messages on behalf of the user.
 
===Outgoing mail server access restrictions===
Server administrators need to impose some control on which clients can use the server. This enables them to deal with abuse, for example [[Spam (electronic)|spam]]. Two solutions have been in common use:
* In the past, many systems imposed usage restrictions by the ''location'' of the client, only permitting usage by clients whose IP address is one that the server administrators control. Usage from any other client IP address is disallowed.
* Modern SMTP servers typically offer an alternative system that requires [[authentication]] of clients by credentials before allowing access.
 
====Restricting access by location====
Under this system, an [[ISP]]'s SMTP server will not allow access by users who are outside the ISP's network. More precisely, the server may only allow access to users with an IP address provided by the ISP, which is equivalent to requiring that they are connected to the Internet using that same ISP. A mobile user may often be on a network other than that of their normal ISP, and will then find that sending email fails because the configured SMTP server choice is no longer accessible.
 
This system has several variations. For example, an organisation's SMTP server may only provide service to users on the same network, enforcing this by firewalling to block access by users on the wider Internet. Or the server may perform range checks on the client's IP address. These methods were typically used by corporations and institutions such as universities which provided an SMTP server for outbound mail only for use internally within the organisation. However, most of these bodies now use client authentication methods, as described below.
 
By restricting access to certain IP addresses, server administrators can readily recognise the IP address of any abuser. As it will be a meaningful address to them, the administrators can deal with the rogue machine or user.
 
Where a user is mobile, and may use different ISPs to connect to the internet, this kind of usage restriction is onerous, and altering the configured outbound email SMTP server address is impractical. It is highly desirable to be able to use email client configuration information that does not need to change.
 
====Client authentication====
Modern SMTP servers typically require [[authentication]] of clients by credentials before allowing access, rather than restricting access by location as described earlier. This more flexible system is friendly to mobile users and allows them to have a fixed choice of configured outbound SMTP server.
 
====Open relay====
A server that is accessible on the wider Internet and does not enforce these kinds of access restrictions is known as an [[open relay]]. This is now generally considered a bad practice worthy of [[blacklist (computing)|blacklist]]ing.
 
===Ports===
Server administrators choose whether clients use [[Transmission Control Protocol|TCP]] port 25 (SMTP) or port 587 (Submission), as formalized in RFC 6409 (previously RFC 2476), for relaying outbound mail to an initial [[mail server]]. The specifications and many servers support both. Although some servers support port 465 for legacy ''secure SMTP'' in violation of the specifications, it is preferable to use standard ports and standard ESMTP commands<ref>RFC 3207 specifies only the well-known port 25 and the "Submission port," which is TCP port 587, for the STARTTLS command, the precursor for an encrypted SMTP session using [[Transport Layer Security|TLS]]. It makes no mention of the unofficial port 465.</ref> according to RFC 3207 if a secure session needs to be used between the client and the server.
 
Some servers are set up to reject all relaying on port 25, but valid users authenticating on port 587 are allowed to relay mail to any valid address.
 
Some [[Internet service provider]]s intercept port 25, redirecting traffic to their own SMTP server regardless of the destination address. This means that it is not possible for their users to access an SMTP server outside the ISP's network using port 25.
 
Some SMTP servers support authenticated access on an additional port other than 587 or 25 to allow users to connect to them even if port 25 is blocked, but 587 is the standardized and widely-supported port for users to submit new mail.
 
Microsoft [[Exchange Server]] 2013 SMTP can listen on ports 25, 587, 465, 475, and 2525, depending on server role and whether roles are combined on a single server. Ports 25 and 587 are used to provide client connectivity to the front end transport service on the client access server (CAS) role. Ports 25, 465, and 475 are used by the mailbox transport service. However, when the mailbox role is combined with the CAS role on a single server, port 2525 is used by the mailbox role for SMTP from the CAS front end transport service, while CAS continues to use port 25. Port 465 is used by the mailbox transport service to receive client connections proxied by the CAS role. Port 475 is used by the mailbox role to communicate directly with other mailbox roles, transferring mail between the mailbox transport submission service and the mailbox transport delivery service.
 
==SMTP transport example==
A typical example of sending a message via SMTP to two mailboxes (''alice'' and ''theboss'') located in the same mail domain (''example.com'' or ''localhost.com'') is reproduced in the following session exchange. (In this example, the conversation parts are prefixed with ''S:'' and ''C:'', for ''server'' and ''client'', respectively; these labels are not part of the exchange.)
 
After the message sender (SMTP client) establishes a reliable communications channel to the message receiver (SMTP server), the session is opened with a greeting by the server, usually containing its [[fully qualified domain name]] (FQDN), in this case ''smtp.example.com''. The client initiates its dialog by responding with a <code>HELO</code> command identifying itself in the command's parameter with its FQDN (or an address literal if none is available).<ref name="rfc5321">RFC 5321, ''Simple Mail Transfer Protocol'', J. Klensin, The Internet Society (October 2008)</ref>
 
<span style="color: blue">S: 220 smtp.example.com ESMTP Postfix</span>
C: HELO relay.example.org
<span style="color: blue">S: 250 Hello relay.example.org, I am glad to meet you</span>
C: MAIL FROM:<bob@example.org>
<span style="color: blue">S: 250 Ok</span>
C: RCPT TO:<alice@example.com>
<span style="color: blue">S: 250 Ok</span>
C: RCPT TO:<theboss@example.com>
<span style="color: blue">S: 250 Ok</span>
C: DATA
<span style="color: blue">S: 354 End data with <CR><LF>.<CR><LF></span>
C: From: "Bob Example" <bob@example.org>
C: To: "Alice Example" <alice@example.com>
C: Cc: theboss@example.com
C: Date: Tue, 15 January 2008 16:02:43 -0500
C: Subject: Test message
C:
C: Hello Alice.
C: This is a test message with 5 header fields and 4 lines in the message body.
C: Your friend,
C: Bob
C: .
<span style="color: blue">S: 250 Ok: queued as 12345</span>
C: QUIT
<span style="color: blue">S: 221 Bye</span>
{The server closes the connection}
 
The client notifies the receiver of the originating email address of the message in a <code>MAIL FROM</code> command. In this example, the email message is sent to two mailboxes on the same SMTP server: one for each recipient listed in the <tt>To</tt> and <tt>Cc</tt> header fields. The corresponding SMTP command is <code>RCPT TO</code>. Each successful reception and execution of a command is acknowledged by the server with a result code and response message (e.g., 250 Ok).
 
The transmission of the body of the mail message is initiated with a <code>DATA</code> command after which it is transmitted verbatim line by line and is terminated with an end-of-data sequence. This sequence consists of a new-line (<CR><LF>), a single [[full stop]] (period), followed by another new-line. Since a message body can contain a line with just a period as part of the text, the client sends ''two'' periods every time a line starts with a period; correspondingly, the server replaces every sequence of two periods at the beginning of a line with a single one. Such escaping method is called ''dot-stuffing''.
 
The server's positive reply to the end-of-data, as exemplified, implies that the server has taken the responsibility of delivering the message. A message can be doubled if there is a communication failure at this time, e.g. due to a power shortage: Until the sender has received that <tt>250</tt> reply, it must assume the message was not delivered. On the other hand, after the receiver has decided to accept the message, it must assume the message has been delivered to it. Thus, during this time span, both agents have active copies of the message that they will try to deliver.<ref>RFC 1047</ref> The probability that a communication failure occurs exactly at this step is directly proportional to the amount of filtering that the server performs on the message body, most often for anti-spam purposes. The limiting timeout is specified to be 10 minutes.<ref>[http://tools.ietf.org/html/rfc5321#section-4.5.3.2.6 rfc5321#section-4.5.3.2.6]</ref>
 
The <code>QUIT</code> command ends the session. If the email has other recipients located elsewhere, the client would <code>QUIT</code> and connect to an appropriate SMTP server for subsequent recipients after the current destination(s) had been queued. The information that the client sends in the <code>HELO</code> and <code>MAIL FROM</code> commands are added (not seen in example code) as additional header fields to the message by the receiving server. It adds a <code>Received</code> and <code>Return-Path</code> header field, respectively.
 
Some clients are implemented to close the connection after the message is accepted (<code>250 Ok: queued as 12345</code>), so the last two lines may actually be omitted. This causes an error on the server when trying to send the <code>221</code> reply.
 
==Optional extensions==
Although optional and not shown in this example, many clients ask the server for the SMTP extensions that the server supports, by using the <code>EHLO</code> greeting of the Extended SMTP specification (RFC 1870). Clients fall back to <code>HELO</code> only if the server does not respond to <code>EHLO</code>.
 
Modern clients may use the ESMTP extension keyword <code>SIZE</code> to query the server for the maximum message size that will be accepted. Older clients and servers may try to transfer excessively sized messages that will be rejected after consuming network resources, including connect time to network links that is paid by the minute.
 
Users can manually determine in advance the maximum size accepted by ESMTP servers. The client replaces the <code>HELO</code> command with the <code>EHLO</code> command.
<span style="color: blue">S: 220 smtp2.example.com ESMTP Postfix</span>
C: EHLO bob.example.org
<span style="color: blue">S: 250-smtp2.example.com Hello bob.example.org [192.0.2.201]</span>
<span style="color: blue">S: 250-SIZE 14680064</span>
<span style="color: blue">S: 250-PIPELINING</span>
<span style="color: blue">S: 250 HELP</span>
Thus ''smtp2.example.com'' declares that it will accept a fixed maximum message size no larger than 14,680,064 [[Octet (computing)|octets]] (8-bit bytes). Depending on the server's actual resource usage, it may be currently unable to accept a message this large.
 
In the simplest case, an ESMTP server will declare a maximum <code>SIZE</code> immediately after receiving an <code>EHLO</code>. According to RFC 1870, however, the numeric parameter to the <code>SIZE</code> extension in the <code>EHLO</code> response is optional. Clients may instead, when issuing a <code>MAIL FROM</code> command, include a numeric estimate of the size of the message they are transferring, so that the server can refuse receipt of overly-large messages.
 
==Security and spamming==
{{Main|Anti-spam techniques (e-mail)}}
The original SMTP specification did not include a facility for authentication of senders. Subsequently, the [[SMTP-AUTH]] extension was defined by RFC 2554.<ref>RFC 2554, ''SMTP Service Extension for Authentication'', J. Myers (March 1999)</ref> ESMTP provides a mechanism for email clients to specify a security mechanism to a mail server, authenticate the exchange, and negotiate a security profile ([[Simple Authentication and Security Layer]], SASL) for subsequent message transfers.
 
Microsoft products implement the proprietary [[Secure Password Authentication]] (SPA) protocol through the use of the SMTP-AUTH extension.
 
However, the impracticality of widespread SMTP-AUTH implementation and management means that E-mail [[Spam (electronic)|spamming]] is not and cannot be addressed by it.
 
Modifying SMTP extensively, or replacing it completely, is not believed to be practical, due to the [[network effect]]s of the huge installed base of SMTP. [[Internet Mail 2000]] was one such proposal for replacement.
 
Spam is enabled by several factors, including vendors implementing [[Mail Transfer Agent|MTAs]] that are not standards-compliant, which make it difficult for other MTAs to enforce standards, security vulnerabilities within the operating system (often exacerbated by always-on broadband connections) that allow spammers to remotely control end-user PCs and cause them to send spam, and a lack of "intelligence" in many MTAs.
 
There are a number of proposals for sideband protocols that will assist SMTP operation. The [[Anti-Spam Research Group]] (ASRG) of the [[Internet Research Task Force]] (IRTF) is working on a number of [[Email authentication]] and other proposals for providing simple source authentication that is flexible, lightweight, and scalable. Recent [[Internet Engineering Task Force]] (IETF) activities include [[MARID]] (2004) leading to two approved IETF experiments in 2005, and [[DomainKeys Identified Mail]] in 2006.
 
In 2012, a group of organizations proposed a new specification, called [[DMARC]] to reduce email abuse and spoofing.
 
==Implementations==
{{Main|List of mail servers|Comparison of mail servers}}
 
==Related Requests For Comments==
* RFC 1123 – Requirements for Internet Hosts—Application and Support (STD 3)
* RFC 1870 – SMTP Service Extension for Message Size Declaration (оbsoletes: RFC 1653)
* RFC 2505 – Anti-Spam Recommendations for SMTP MTAs (BCP 30)
* RFC 2920 – SMTP Service Extension for Command Pipelining (STD 60)
* RFC 3030 – SMTP Service Extensions for Transmission of Large and Binary MIME Messages
* RFC 3207 – SMTP Service Extension for Secure SMTP over Transport Layer Security (obsoletes RFC 2487)
* RFC 3461 – SMTP Service Extension for Delivery Status Notifications (obsoletes RFC 1891)
* RFC 3463 – Enhanced Status Codes for SMTP (obsoletes RFC 1893, updated by RFC 5248)
* RFC 3464 – An Extensible Message Format for Delivery Status Notifications (obsoletes RFC 1894)
* RFC 3798 – Message Disposition Notification (updates RFC 3461)
* RFC 3834 – Recommendations for Automatic Responses to Electronic Mail
* RFC 4952 – Overview and Framework for Internationalized E-mail (updated by RFC 5336)
* RFC 4954 – SMTP Service Extension for Authentication (obsoletes RFC 2554, updates RFC 3463, updated by RFC 5248)
* RFC 5068 – E-mail Submission Operations: Access and Accountability Requirements (BCP 134)
* RFC 5248 - A Registry for SMTP Enhanced Mail System Status Codes (BCP 138) (updates RFC 3463)
* RFC 5321 – The Simple Mail Transfer Protocol (obsoletes RFC 821 aka STD 10, RFC 974, RFC 1869, RFC 2821, updates RFC 1123)
* RFC 5322 – Internet Message Format (obsoletes RFC 822 aka STD 11, and RFC 2822)
* RFC 5336 – SMTP Extension for Internationalized Email Addresses (updates RFC 2821, RFC 2822, and RFC 4952)
* RFC 5504 – Downgrading Mechanism for Email Address Internationalization
* RFC 6409 – Message Submission for Mail (STD 72) (obsoletes RFC 4409, RFC 2476)
* RFC 6522 – The Multipart/Report Content Type for the Reporting of Mail System Administrative Messages (obsoletes RFC 3462, and in turn RFC 1892)
 
==See also==
*[[Bounce address]]
*[[Email encryption]]
*[[Ident protocol|Ident]]
*[[POP before SMTP]] / [[SMTP after POP]]
*[[Sender Policy Framework]] (SPF)
*[[Variable envelope return path]]
*[[Dkim]]
 
==Notes==
{{Reflist}}
 
==References==
* {{cite book | last=Hughes | first=L | title=Internet e-mail Protocols, Standards and Implementation | publisher=Artech House Publishers | year=1998 | isbn=0-89006-939-5}}
* {{cite book | last=Hunt | first=C | title=sendmail Cookbook | publisher=O'Reilly Media | year=2003 | isbn=0-596-00471-0}}
* {{cite book | last=Johnson | first=K | title=Internet Email Protocols: A Developer's Guide | publisher=Addison-Wesley Professional | year=2000 | isbn=0-201-43288-9}}
* {{cite book | last=Loshin | first=P | title=Essential Email Standards: RFCs and Protocols Made Practical | publisher=John Wiley & Sons | year=1999 | isbn=0-471-34597-0}}
* {{cite book | last=Rhoton | first=J | title=Programmer's Guide to Internet Mail: SMTP, POP, IMAP, and LDAP | publisher=Elsevier | year=1999 | isbn=1-55558-212-5}}
* {{cite book | last=Wood | first=D | title=Programming Internet Mail | publisher=O'Reilly | year=1999 | isbn=1-56592-479-7}}
 
==External links==
* [http://www.ietf.org/html.charters/eai-charter.html Email Address Internationalization IETF Working Group]
 
{{E-mail clients}}
 
[[Category:Email]]
[[Category:Internet mail protocols]]
[[Category:Application layer protocols]]
 
-->
Ստացված է «https://hy.wikipedia.org/wiki/SMTP» էջից