Postfix adding multi-port

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.