From: Stephan Bosch Date: Fri, 13 Sep 2019 20:49:37 +0000 (+0200) Subject: lmtp: Accept MAIL command with broken sender address. X-Git-Tag: 2.3.9~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0072d71de6ee1b9c0f66919b10d9c3bd6d85a960;p=thirdparty%2Fdovecot%2Fcore.git lmtp: Accept MAIL command with broken sender address. The address is treated as <> in most cases. For logging, the unparsed broken address is available in the `raw' field of the address. --- diff --git a/src/lib-smtp/smtp-server-cmd-mail.c b/src/lib-smtp/smtp-server-cmd-mail.c index 7fbcaa9348..2834a59bbf 100644 --- a/src/lib-smtp/smtp-server-cmd-mail.c +++ b/src/lib-smtp/smtp-server-cmd-mail.c @@ -132,6 +132,7 @@ void smtp_server_cmd_mail(struct smtp_server_cmd_ctx *cmd, return; } if (ret < 0) { + i_assert(set->mail_path_allow_broken); e_debug(conn->event, "Invalid FROM: %s " "(proceeding with <> as sender)", error); } diff --git a/src/lmtp/main.c b/src/lmtp/main.c index d73d5e661f..478072fb03 100644 --- a/src/lmtp/main.c +++ b/src/lmtp/main.c @@ -86,6 +86,7 @@ static void main_init(void) lmtp_set.protocol = SMTP_PROTOCOL_LMTP; lmtp_set.auth_optional = TRUE; lmtp_set.rcpt_domain_optional = TRUE; + lmtp_set.mail_path_allow_broken = TRUE; lmtp_server = smtp_server_init(&lmtp_set);