Topic: TLS Disconnect From Application Server
==== Required information ====
- iRedMail version: iRedMail-0.9.6
- Linux/BSD distribution name and version: Ubuntu 16.04
- Store mail accounts in which backend: PostgreSQL
- Web server: Nginx
- Manage mail accounts with iRedAdmin-Pro: YES
====
Hello.
I have a server hosted with Google Cloud running a PHP application. Because Google Cloud do not allow outbound connections on port 25 and 587 I host the MX server with OVH and have it configured to listen on a second submission port, 5877 like this:
5877 inet n - n - - smtpd
-o syslog_name=postfix/submission
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o content_filter=smtp-amavis:[127.0.0.1]:10026
This works, I verified using Thunderbird mail client and manually connecting to that port!
However, when using SMTP authentication on port 5877 from my application server to the MX server I get the following in the mail.log file:
May 24 22:23:19 mx postfix/submission/smtpd[8335]: connect from 39.102.199.104.bc.googleusercontent.com[104.XXX.XXX.XX]
May 24 22:23:19 mx postfix/submission/smtpd[8335]: Anonymous TLS connection established from 39.102.199.104.bc.googleusercontent.com[104.XXX.XXX.XX]: TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)
May 24 22:23:19 mx postfix/submission/smtpd[8335]: lost connection after STARTTLS from 39.102.199.104.bc.googleusercontent.com[104.XXX.XXX.XX]
May 24 22:23:19 mx postfix/submission/smtpd[8335]: disconnect from 39.102.199.104.bc.googleusercontent.com[104.XXX.XXX.XX] ehlo=1 starttls=1 commands=2
It seems that the TLS causes it to just die?
I am using a Let's Encrypt certificate, and my postfix is configured like this:
smtpd_tls_key_file = /etc/letsencrypt/live/mx.domain.com/privkey.pem
smtpd_tls_cert_file = /etc/letsencrypt/live/mx.domain.com/fullchain.pem
smtpd_tls_CAfile = /etc/letsencrypt/live/mx.domain.com/fullchain.pem
This should be correct, and provide full trust to any client connecting. It does, because I tested it with Google Mail client, Thunderbird, RoundCube, all good. So why does my application server fail to send email?
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.