Mailu / Mailu

Insular email distribution - mail server as Docker images

Home Page:https://mailu.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use port 465 post email

tin607 opened this issue · comments

commented

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:

  1. 163(163.com)

Fail:

  1. QQ(qq.com)
  2. 189(189.cn)
  3. aliyun(aliyun.com)
  4. 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