Skip to content

Commit

Permalink
lmtp: Use port 24 if no port has been provided
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wido authored and GitLab committed Aug 8, 2016
1 parent 0b96670 commit dfe53c8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lmtp/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ client_proxy_rcpt_parse_fields(struct lmtp_proxy_rcpt_settings *set,
} 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)
Expand Down

0 comments on commit dfe53c8

Please sign in to comment.