SMTP Protocol original command code and how it works _php tutorial

Source: Internet
Author: User
Tags mx record
Http://www.linuxforum.net jephe Wu (2001-04-21 18:16:42) 1.SMTP is working in two cases: one is the transfer of e-mail from the client to the server, and the other is the transfer from one server to Another server 2.SMTP is a request/response protocol, and the commands and responses are based on ASCII text and end with the CR and LF characters. The response includes a three-digit code that represents the return status of 3.SMTP on the TCP protocol 25th port to listen for connection requests 4. Connection and send process: A. Establish a TCP connection B. client sends the HELO command to identify the sender's own identity, and then the client sends the Mail command server to correct In response, indicates readiness to receive C. The client sends the RCPT command to identify the intended recipient of the e-mail message, and can have multiple RCPT rows on the server side to indicate whether they would like to accept mail for the recipient D. End of negotiation, send mail, send E. With. To indicate the end of the input to send out F. End this send and quit with the Quit command. 5. Two other commands: VRFY---Used to verify the existence of a given user's mailbox and to receive detailed information about that user. EXPN---Used to expand the mailing list. 6. Mail routing process: the SMTP server routes e-mail messages based on the domain name of the intended recipient in DNS for Domain name services. The SMTP server routes e-mail based on MX records in DNS, the MX record registers the domain name and the associated SMTP relay host, and the e-mail that belongs to that domain should be sent to that host. If the SMTP server mail.abc.com received a letter to send to shuser@sh.abc.com:a. SendMail requests DNS to give the CNAME record of the host sh.abc.com, if so, if the CNAME is to shmail.abc.com, request Shmail.abc.com's CNAME record again until there is no                   B. Assume that the CNAME is to shmail.abc.com, and then SendMail request the DNS of the @abc.com domain to give shmail.abc.com MX records, Shmail MX 5 shmail.abc.com Shmail2.abc.com c. SendMail finally requests that DNS give shmail.abc.com a record, which is the IP address, if the return value is 1.2.3.4 D. SendMail connected to 1.2.3.4, send this to ShuseR@sh.abc.com's letter to 1.2.3.4 SMTP daemon 7.SMTP basic command set for this server: command description------------------------------HELO identity user identity to the server The sender can cheat and lie, but in general the server can detect. Mail initiates message transfer mail FROM:RCPT identifies a single recipient of the message, and often after the mail command there are multiple RCPT to:data after a single or multiple RCPT commands, representing all The message recipient has identified and initialized the data transfer to. End. VRFY is used to verify that the specified user/mailbox exists; For security reasons, the server often prohibits this command EXPN verify that a given list of mailboxes exists, expands the list of mailboxes, and is often disabled by the Help query server what commands are supported NOOP no action, service The device should respond OK QUIT session RSET reset session, the current transfer is canceled--------------------------------8.    The address specified in the MAIL from command is called the envelope from address and does not need to be consistent with the sender's own address. RCPT to, the specified recipient address is called the envelope to address, and is irrelevant to what the actual to: line is.    9. Why is there no rcpt CC and RCPT BCC:? All recipient negotiations are implemented through the RCPT TO command, and if it is BCC, the envelope recipient is deleted after the negotiation is sent 10. The message is divided into the envelope section, the letterhead section and the body part envelope from, envelope to and message from:, M    Essage to: completely irrelevant. Evnelope is provided by the server inter-host SMTP backend, and message from/to is provided by the user. There is no colon is also the difference. 11. How is the envelope part checked to see if a letter was forged?    A. The relevance of the received line. Now the SMTP mail transfer system, in the envelope section in addition to the two ends of the internal host processing, consider the two corporate firewalls between the part, if the two firewall machines are A and B, but the receiver check envelope received: Row found after the C. is forged. B. ReceiveD: Whether the host and IP address pairs in the row correspond to the following: Receibed:from galangal.org (turmeric.com [104.128.23.115] by mail. bieberdorf.edu ..... was manually added to the last Received Line: Received:from galangal.org ([104.128.23.115]) by mail. bieberdorf.edu (8.8.5) Received:from Lemongr Ass.org by galangal.org (8.7.3) Received:from graprao.com by lemongrass.org (8.6.4) Jephe Wu

http://www.bkjia.com/PHPjc/531900.html www.bkjia.com true http://www.bkjia.com/PHPjc/531900.html techarticle http://www.linuxforum.net jephe Wu (2001-04-21 18:16:42) 1.SMTP is working in two situations: one is to transfer e-mail from the client to the server, and the other is to transfer from one server to another ...

  • 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.