diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2021-01-11 14:07:43 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2021-01-11 14:07:43 +0200 |
commit | 5f7ee67e0c718f9e98b2d240016f17226c82fae1 (patch) | |
tree | f0c0ab04d5a0ee3c7c419e10524b6066b66043d2 | |
parent | 51ffe23a906052d1ad5ba7100415da7df73f4152 (diff) | |
download | mailutils-5f7ee67e0c718f9e98b2d240016f17226c82fae1.tar.gz mailutils-5f7ee67e0c718f9e98b2d240016f17226c82fae1.tar.bz2 |
SMTP mailer: fix selection of the default port
* libproto/mailer/smtp.c (smtp_open): Use MU_SMTPS_PORT only if
MAILER_TLS_ALWAYS is required.
-rw-r--r-- | libproto/mailer/smtp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libproto/mailer/smtp.c b/libproto/mailer/smtp.c index d2f134db6..cb9ac0a6b 100644 --- a/libproto/mailer/smtp.c +++ b/libproto/mailer/smtp.c @@ -230,13 +230,13 @@ smtp_open (mu_mailer_t mailer, int flags) rc = _mailer_smtp_init_late (mailer); if (rc) return rc; memset (&hints, 0, sizeof (hints)); hints.flags = MU_AH_DETECT_FAMILY; - hints.port = smtp_mailer->tls ? MU_SMTPS_PORT : MU_SMTP_PORT; + hints.port = smtp_mailer->tls == MAILER_TLS_ALWAYS ? MU_SMTPS_PORT : MU_SMTP_PORT; hints.protocol = IPPROTO_TCP; hints.socktype = SOCK_STREAM; rc = mu_sockaddr_from_url (&sa, mailer->url, &hints); if (rc) return rc; |