Thank you. This works perfectly over port 465. What would need to change to make it work over port 587 with startTLS besides just changing the ports in the setup above?For those of you using zoho as smtp server I managed to get it working with the following:
/etc/postfix/main.cf
Code:# See /usr/share/postfix/main.cf.dist for a commented, more complete version myhostname=proxmox.domain.com smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) biff = no # appending .domain is the MUA's job. append_dot_mydomain = no # Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases mydestination = $myhostname, localhost.$mydomain, localhost # relayhost = mynetworks = 127.0.0.0/8 inet_interfaces = loopback-only recipient_delimiter = + compatibility_level = 2 relayhost = smtp.zoho.com:465 smtp_use_tls = yes smtp_sasl_auth_enable = yes smtp_sasl_security_options = smtp_tls_wrappermode = yes smtp_tls_security_level = encrypt smtp_tls_policy_maps = hash:/etc/postfix/tls_policy smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_tls_CAfile = /etc/ssl/certs/Entrust_Root_Certification_Authority.pem smtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_tls_session_cache smtp_tls_session_cache_timeout = 3600s sender_canonical_classes = envelope_sender, header_sender sender_canonical_maps = regexp:/etc/postfix/sender_canonical smtp_header_checks = regexp:/etc/postfix/smtp_header_checks
/etc/postfix/sasl_passwd
smtp.zoho.com user@domain.com:PASSWD
/etc/postfix/sender_canonical
/.+/ user@domain.com
/etc/postfix/smtp_header_checks
/^From:.*/ REPLACE From: Proxmox alert <user@domain.com>
/etc/postfix/tls_policy
smtp.zoho.com:465 encrypt
Then run the following to apply the changes
Bash:chmod 600 /etc/postfix/sasl_passwd postmap /etc/postfix/sasl_passwd postmap /etc/postfix/tls_policy apt-get install libsasl2-modules postfix reload && systemctl restart postfix.service
Just changing the ports doesn't work. The log says warning: TLS library problem: error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../ssl/record/ssl3_record.c:331: