0N/A/* Copyright (c) 2013-2018 Dovecot authors, see the included COPYING file */ 0N/A * SMTP parameter parsing 0N/A /* esmtp-param = esmtp-keyword ["=" esmtp-value] 0N/A esmtp-keyword = (ALPHA / DIGIT) *(ALPHA / DIGIT / "-") 0N/A esmtp-value = 1*(%d33-60 / %d62-126) 0N/A ; any CHAR excluding "=", SP, and control 0N/A ; characters. If this string is an email address, 0N/A ; i.e., a Mailbox, then the "xtext" syntax [32] parser->
error =
"Unexpected character in parameter keyword";
parser->
error =
"Unexpected character in parameter value";
/* AUTH=: RFC 4954, Section 5 We ignore this parameter, but we do check it for validity /* cannot specify this multiple times */ "Invalid AUTH= parameter value: %s",
error);
"Invalid AUTH= address value: %s",
error);
/* ignore, our own AUTH data is added below */ /* BODY=<type>: RFC 6152 */ /* cannot specify this multiple times */ /* =8BITMIME: RFC 6152 */ /* =BINARYMIME: RFC 3030 */ const unsigned char *p, *
pend;
/* ENVID=<envid>: RFC 3461 */ /* cannot specify this multiple times */ "Invalid ENVID= parameter value: %s",
error);
/* RFC 3461, Section 4.4: Due to limitations in the Delivery Status Notification format, the value of the ENVID parameter prior to encoding as "xtext" MUST consist entirely of printable (graphic and white space) characters from the US-ASCII repertoire. p = (
const unsigned char *)
envid;
"Invalid ENVID= parameter value: " "Contains non-printable characters";
/* RET=<keyword>: RFC 3461 */ /* cannot specify this multiple times */ /* SIZE=<size-value>: RFC 1870 */ /* cannot specify this multiple times */ /* size-value ::= 1*20DIGIT */ "Invalid MAIL parameter: %s",
error);
/* parse known parameters */ /* add the rest to ext_param for specific /* RFC 5321, Section 4.1.1.11: If the server SMTP does not recognize or cannot implement one or more of the parameters associated with a particular MAIL FROM or RCPT TO command, it *
error_r =
"Unsupported parameters";
/* add AUTH= parameter */ /* BODY=<type>: RFC 6152 */ /* =8BITMIME: RFC 6152 */ /* =BINARYMIME: RFC 3030 */ /* ENVID=<envid>: RFC 3461 */ /* RET=<keyword>: RFC 3461 */ /* SIZE=<size-value>: RFC 1870 */ /* proxy the SIZE parameter (account for additional size) */ /* NOTIFY=<type>: RFC 3461 notify-esmtp-value = "NEVER" / 1#notify-list-element notify-list-element = "SUCCESS" / "FAILURE" / "DELAY" We check and normalize this parameter. /* cannot specify this multiple times */ const unsigned char *p, *
pend;
/* ORCPT=<address>: RFC 3461 orcpt-parameter = "ORCPT=" original-recipient-address original-recipient-address = addr-type ";" xtext We check and normalize this parameter. /* cannot specify this multiple times */ "Invalid ORCPT= parameter: %s",
"Invalid character in xtext";
/* RFC 3461, Section 4.2: Due to limitations in the Delivery Status Notification format, the value of the original recipient address prior to encoding as "xtext" MUST consist entirely of printable (graphic and white space) characters from the US-ASCII repertoire. "Invalid ORCPT= address value: " "Contains non-printable characters";
"Invalid RFC822 address";
"Invalid RCPT parameter: %s",
error);
/* parse known parameters */ /* add the rest to ext_param for specific applications /* RFC 5321, Section 4.1.1.11: If the server SMTP does not recognize or cannot implement one or more of the parameters associated with a particular MAIL FROM or RCPT TO command, it *
error_r =
"Unsupported parameters";
/* NOTIFY=<type>: RFC 3461 notify-esmtp-value = "NEVER" / 1#notify-list-element notify-list-element = "SUCCESS" / "FAILURE" / "DELAY" /* ORCPT=<address>: RFC 3461 */ /* NOTIFY: RFC 3461, Section 4.1 */ /* ORCPT: RFC 3461, Section 4.2 */