docker-mail-relay icon indicating copy to clipboard operation
docker-mail-relay copied to clipboard

Can't relay on sendgrid using TLS

Open pgarcianavent opened this issue 8 years ago • 1 comments

I can't relay messages to Sendgrid using TLS, I get this error in the mailllog

2017-07-31T19:25:14.229313+00:00 smtp postfix/smtpd[312]: warning: cannot get RSA certificate from file "/etc/ssl/certs/ssl-cert-snakeoil.pem": disabling TLS support 2017-07-31T19:25:14.229345+00:00 smtp postfix/smtpd[312]: warning: TLS library problem: error:02001002:system library:fopen:No such file or directory:bio/bss_file.c:255:fopen('/etc/ssl/certs/ssl-cert-snakeoil.pem', 'r'): 2017-07-31T19:25:14.229369+00:00 smtp postfix/smtpd[312]: warning: TLS library problem: error:20074002:BIO routines:FILE_CTRL:system lib:bio/bss_file.c:257: 2017-07-31T19:25:14.229390+00:00 smtp postfix/smtpd[312]: warning: TLS library problem: error:140DC002:SSL routines:SSL_CTX_use_certificate_chain_file:system lib:ssl_rsa.c:723:

Later, When I'm trying to send I get this other error.

2017-07-31T19:31:10.154432+00:00 smtp postfix/smtp[537]: SSL_connect error to smtp.sendgrid.net[167.89.125.25]:587: Operation timed out 2017-07-31T19:31:10.155469+00:00 smtp postfix/smtp[537]: C9D798162B: Cannot start TLS: handshake failure 2017-07-31T19:36:10.358940+00:00 smtp postfix/smtp[537]: SSL_connect error to smtp.sendgrid.net[108.168.183.160]:587: Operation timed out 2017-07-31T19:36:10.363822+00:00 smtp postfix/smtp[537]: C9D798162B: to=[email protected], relay=smtp.sendgrid.net[108.168.183.160]:587, delay=640, delays=40/0.04/600/0, dsn=4.7.5, status=deferred (Cannot start TLS: handshake failure)

Any Ideas ?

Thanks, Pablo

pgarcianavent avatar Jul 31 '17 19:07 pgarcianavent

As a work-around, I've found that you can mount /etc/ssl as a (read-only) volume from the host into the container, assuming that you have the missing cert path present on your host.

witten avatar Oct 01 '17 21:10 witten