Recently, the mailbox was not available because the Google Cloud closed SMTP port 25. Therefore, two methods are considered: first, re-build the mail system, change the postfix port; second, on the existing mail system, add multiple ports directly. For the first method, there is a script that does not want to be built, although there is a batch deployment. So we finally chose the second method.
The prototype of the second method was found on the web, but the test failed because some problems were ignored during the test. After consulting the great God's help, the problem will be solved. Here are the specific steps:
1.VIM/ETC/POSTFIX/MASTER.CF (MASTER.CF path is based on the path where you installed the postfix path to the MASTER.CF)
In the first line without the # number
SMTP inet n-n--SMTPD
The next line increases:
SMTP2 inet n-n--SMTPD
Save exit
2. Modify the/etc/services file, increase the SMTP listening port, this article takes 26 port as an example
Vim/etc/services
Found it:
SMTP 25/tcp Mail
SMTP 25/UDP Mail
Then, add two lines below it:
SMTP2 2525/tcp Mail2
SMTP2 2525/udp Mail2
Exit Save and restart Postfix. It is said that reload postfix no effect, so did not try.
3. To see if the firewall has a limit on port 26, modify the firewall policy
-A input-p tcp-m multiport--dports 26,25-j ACCEPT
Restarting the firewall
By the end of all the steps, tested, the 25 and 26 port functions are the same, that is, the client uses the same account, referring to 25 ports and 26 ports can be sent to send and receive mail.
This article is from the "Old Yang" blog, please be sure to keep this source http://9056911010.blog.51cto.com/9318579/1603833
Postfix adding multi-port