]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lmtp: Accept MAIL command with broken sender address.
authorStephan Bosch <stephan.bosch@open-xchange.com>
Fri, 13 Sep 2019 20:49:37 +0000 (22:49 +0200)
committerStephan Bosch <stephan.bosch@open-xchange.com>
Fri, 4 Oct 2019 21:25:54 +0000 (23:25 +0200)
The address is treated as <> in most cases. For logging, the unparsed broken
address is available in the `raw' field of the address.

src/lib-smtp/smtp-server-cmd-mail.c
src/lmtp/main.c

index 7fbcaa9348c1fe8897b43fe694b3c9b2f6c58cab..2834a59bbf7e624a16c5d00dc93babd25fe943ca 100644 (file)
@@ -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);
        }
index d73d5e661f208267ddffe4ca79bba96a678de16f..478072fb03ae40dd3486c49d2fdff9bc57cb3944 100644 (file)
@@ -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);