[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[msmtp-users] starttls timeout with GnuTLS



Hi,

when msmtp is compiled with GnuTLS, sending emails fails with the
following output (sensitive data replaced with '***'):

==========
host                  = ***
port                  = 587
timeout               = off
protocol              = smtp
domain                = ***
auth                  = none
user                  = ***
password              = *
passwordeval          = (not set)
ntlmdomain            = (not set)
tls                   = on
tls_starttls          = on
tls_trust_file        = /etc/ssl/certs/ca-certificates.crt
tls_crl_file          = (not set)
tls_fingerprint       = (not set)
tls_key_file          = (not set)
tls_cert_file         = (not set)
tls_certcheck         = on
tls_force_sslv3       = off
tls_min_dh_prime_bits = (not set)
tls_priorities        = (not set)
auto_from             = off
maildomain            = (not set)
from                  = ***
dsn_notify            = (not set)
dsn_return            = (not set)
keepbcc               = off
logfile               = (not set)
syslog                = LOG_USER
aliases               = (not set)
reading recipients from the command line
<-- 220 *** ESMTP
--> EHLO ***
<-- 250-***
<-- 250-PIPELINING
<-- 250-SIZE 104857600
<-- 250-ETRN
<-- 250-STARTTLS
<-- 250-ENHANCEDSTATUSCODES
<-- 250-8BITMIME
<-- 250 DSN
--> STARTTLS
<-- 220 2.0.0 Ready to start TLS
msmtp: TLS handshake failed: the operation timed out
msmtp: could not send mail (account default from ***)
==========

Compiling with "--with-ssl=openssl" instead fixes the issue.

Otherwise initiating STARTTLS using gnutls-cli or openssl works
flawlessly (sensitive data replaced with '***', interactive input
prefixed with '->'):

==========
$ gnutls-cli -s *** -p 587

Processed 167 CA certificate(s).
Resolving '***'...
Connecting to '***:587'...

- Simple Client Mode:

220 *** ESMTP

-> ehlo ***

250-***
250-PIPELINING
250-SIZE 104857600
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

-> starttls

220 2.0.0 Ready to start TLS
*** Starting TLS handshake
- Certificate type: X.509
- Got a certificate list of 2 certificates.
- Certificate[0] info:
    ***
- Certificate[1] info:
    ***
- Status: The certificate is trusted. 
- Successfully sent 0 certificate(s) to server.
- Description: (TLS1.2)-(ECDHE-RSA-SECP256R1)-(AES-128-GCM)
- Session ID: DC:CB:A0:25:CD:99:86:26:7E:A7:05:A3:44:57:8B:A5:4A:73:7A:E6:25:7E:13:8C:31:92:00:D3:C1:A0:E8:5A
- Ephemeral EC Diffie-Hellman parameters
 - Using curve: SECP256R1
 - Curve size: 256 bits
- Version: TLS1.2
- Key Exchange: ECDHE-RSA
- Server Signature: RSA-SHA256
- Cipher: AES-128-GCM
- MAC: AEAD
- Compression: NULL

-> ehlo ***

250-***
250-PIPELINING
250-SIZE 104857600
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

-> quit

221 2.0.0 Bye
- Peer has closed the GnuTLS connection
==========

Any ideas what might be going on?

Regards.