Use port 465 post email
tin607 opened this issue · comments
container mailu-smtp-1 modify /etc/postfix/main.cf file, as follows:
smtp_tls_security_level=encrypt
smtp_tls_wrappermode=yes
container mailu-smtp-1 use the tool iptables to forward port 25 to 465
iptables -t nat -A OUTPUT -p tcp -s 192.168.xxx.xxx --dport 25 -j DNAT --to-destination :465
iptables -t nat -A INPUT -p tcp -d 192.168.xxx.xxx --sport 465 -j SNAT --to-source :25
192.168.xxx.xxx is the container mailu-smtp-1 IP address, also be possible not to set it up.
Test sending mail to server
Success:
- 163(163.com)
Fail:
- QQ(qq.com)
- 189(189.cn)
- aliyun(aliyun.com)
- gmail(gmail.com)
Too many mail servers do not support 465. Sadness...
The RFC is clear, listening on port 25 is what email servers ought to do.
see https://datatracker.ietf.org/doc/html/rfc5321#section-4.5.4.2