LMTP has no officially registered default service port, but 24 is the de-facto
standard. When client connects through TCP, the local client port number is used
to setup the proxy connection as well. However, when the client connects through a
unix socket, there is no port number to use and a default is needed.
}
i_zero(&set);
- set.set.port = client->local_port;
+ set.set.port = (client->local_port != 0 ?
+ client->local_port : LMTP_PROXY_DEFAULT_PORT);
set.set.timeout_msecs = LMTP_PROXY_DEFAULT_TIMEOUT_MSECS;
set.protocol = SMTP_PROTOCOL_LMTP;
#include "smtp-client.h"
#define LMTP_PROXY_DEFAULT_TTL 5
+#define LMTP_PROXY_DEFAULT_PORT 24
struct smtp_server_cmd_ctx;
struct smtp_server_cmd_rcpt;