Mercurial > dovecot > core-2.2
changeset 20593:8afdd7adf237
lmtp: Use port 24 if no port has been provided
This allows using the LMTP, IMAP and POP3 proxy on the same
Dovecot installation without the userdb providing the port
to connect to.
TCP port 24 is registered at IANA as: "any private mail system"
LMTP being the Local Mail Transfer Protocol classifies as a private
mail system and thus justifies the usage of port 24.
Prior to this patch the LTMP client would connect to TCP port 0 by
default if the userdb did not provide a port to connect to.
author | Wido den Hollander <wido@widodh.nl> |
---|---|
date | Sat, 09 Apr 2016 13:43:16 +0200 |
parents | b42d619d85c7 |
children | 620e747d25e1 |
files | src/lmtp/commands.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lmtp/commands.c Sat Aug 06 17:59:10 2016 +0200 +++ b/src/lmtp/commands.c Sat Apr 09 13:43:16 2016 +0200 @@ -263,6 +263,8 @@ } else if (strcmp(key, "protocol") == 0) { if (strcmp(value, "lmtp") == 0) set->protocol = LMTP_CLIENT_PROTOCOL_LMTP; + if (!port_set) + set->port = 24; else if (strcmp(value, "smtp") == 0) { set->protocol = LMTP_CLIENT_PROTOCOL_SMTP; if (!port_set)