postal icon indicating copy to clipboard operation
postal copied to clipboard

Failed to read SMTP TLS certificate

Open mdobydullah opened this issue 5 years ago • 7 comments

Hi, I set up Postal with docker (followed: https://docs.postalserver.io/) and added cert files to the postal.yml file.

smtp_server:
  tls_enabled: true
  tls_certificate_path: /opt/postal/config/smtp.crt
  tls_private_key_path: /opt/postal/config/smtp.key

Tested with: https://www.gmass.co/smtp-test

Results:

<< 250-My capabilities are
<< 250-STARTTLS
<< 250 AUTH CRAM-MD5 PLAIN LOGIN
>> STARTTLS
<< 220 Ready to start TLS
ERROR: An error occurred while attempting to establish an SSL or TLS connection.

Then I checked Postal SMTP log:

ssl file not found

How can I solve this?

mdobydullah avatar Jul 30 '21 06:07 mdobydullah

This is not a bug in Postal. Please use discussions.

Within the container, config is mounted at /config. This means you need to simply reference files as /config/smtp.crt.

adamcooke avatar Jul 30 '21 08:07 adamcooke

Within the container, config is mounted at /config. This means you need to simply reference files as /config/smtp.crt.

Please put this in the documentation. This change means that TLS will always silently stop working when upgrading from v1 to v2.

Fornax96 avatar Aug 09 '21 09:08 Fornax96

thats a good spot actually

@adamcooke this whole sentence is incorrect right? image

willpower232 avatar Aug 09 '21 10:08 willpower232

oh Postal the installer expects them at /opt/postal/config, Postal the service expects them at /config

willpower232 avatar Aug 09 '21 10:08 willpower232

Actually, yes - good spotting indeed. If you have custom config files specified, you need to ensure they're in /opt/postal/config and you search and replace /opt/postal/config with /config in postal.yml. I'll update the docs.

adamcooke avatar Aug 09 '21 11:08 adamcooke

I've now updated these docs :) https://docs.postalserver.io/install/upgrade-to-v2

adamcooke avatar Aug 09 '21 14:08 adamcooke

thats a good spot actually

@adamcooke this whole sentence is incorrect right? image

oh Postal the installer expects them at /opt/postal/config, Postal the service expects them at /config

Hello Mr. Will,

I have the same problem, and no emails are sent when I try to to send via secured connection using TLS. So, please let me know the solution in this case.

Below are few images for your reference: Screenshot_1 Screenshot_2 Screenshot_3

Thank you in advance!

XenyFord avatar Sep 01 '21 20:09 XenyFord