SMTP: \r\n\r (without second \n) as double newline

后端 未结 2 725
日久生厌
日久生厌 2021-01-22 05:37

I have SMTP parser that works mostly fine. There is a problem when receiving traffic from third party software that sends double newlines as \"\\r\\n\\r\" (without the second \"

2条回答
  •  广开言路
    2021-01-22 05:46

    RFC2821. Section 2.3.7:

    SMTP commands and, unless altered by a service extension, message
    data, are transmitted in "lines". Lines consist of zero or more data
    characters terminated by the sequence ASCII character "CR" (hex value 0D) followed immediately by ASCII character "LF" (hex value 0A).

    http://www.ietf.org/rfc/rfc2821.txt

    --Dave

提交回复
热议问题