此博文为copy版本,可能不及时更新,要想查看最新版本,请访问:
https://it.smallstrong.org/2019/05/how-to-configure-postfix-to-relay-email.html?view=classic
1. Why relay via Gmail?
Today it's very hard to set up an email server which can be trusted by other email servers. So even if you can configure a postfix server in a couple of minutes, you cannot send email successfully to other email servers because they don't trust you and deny emails sending from your own postfix server.
Another issue is most ISPs forbid TCP port 25 so your email server cannot send SMTP with port 25. Fortunately, 587 port which is used by Gmail is allowed.
Email relay is not a new tech but it works for the above situation. And Gmail server supports it for free! Almost all other email servers trust the Gmail ser