spantaleev / matrix-docker-ansible-deploy

🐳 Matrix (An open network for secure, decentralized communication) server setup using Ansible and Docker
GNU Affero General Public License v3.0
4.82k stars 1.04k forks source link

email-sending settings (relay): SSL (smpts) on port 465 doesn't connect to distant smptd #216

Closed jeromecc closed 5 years ago

jeromecc commented 5 years ago

Hi!

My postfix 3.1.0 email server was set up for years to accept SSL/TLS connections on port 465. I configured email options this way:

matrix_mailer_sender_address: "another.sender@example.com" matrix_mailer_relay_use: true matrix_mailer_relay_host_name: "mail.example.com" matrix_mailer_relay_host_port: 465 matrix_mailer_relay_auth: true matrix_mailer_relay_auth_username: "another.sender@example.com" matrix_mailer_relay_auth_password: "some-password"

Connections were refused.

I had to modify the settings of postfix (master.cf) to accept "SUBMISSION" STARTTLS protocol on port 587 to allow connections from synapse mailer relay.

I just wanted to write it there so that people using the less common way (on port 465) to setup postfix TLS would know that they can fix the problem by allowing STARTTLS on port 587. Both protocols seem to be able to happily coexist in the same smptd instance...

Thanks for the amazing work. I wouldn't have the available ressources (time and skills) to run my Synapse instance without the work of this amazing community! :+1:

spantaleev commented 5 years ago

Hi!

Happy to hear the playbook provided an easy way to get your Matrix server running! :smile:

Thank you for reporting this problem! :+1:

I've also confirmed that port 465 indeed doesn't work and have updated the documentation to mention it. I guess that it may be possible to make exim talk to a smarthost on port 465 (protocol = smtps?), but I haven't tried it. I guess we don't need to bother ourselves with such an outdated protocol.