Method of Postfix replacement export IP address in Linux

Source: Internet
Author: User

Description
Their own post Office server because of configuration problems, was brought to mass bulk spam. Now the egg hurts, send emails to Gmail or other mailboxes, will be sent back or directly in the bin. One complaint too troublesome, direct change postfix export IP on the line.

Realize:

The code is as follows Copy Code

# cp/etc/postfix/master.cf/etc/postfix/master.cf.bak.2013.10.29

Save the original configuration, error also better recovery!!

  code is as follows copy code

# vim/etc/postfix/master.cf
smtp      Unix  -      -      -       -      -       SMTP
# when relaying Mail as backup MX, disable Fallback_relay to avoid MX loops
relay     unix -  &nbs p;   -      -      -       -       SMTP
        -o smtp_fallback_relay=


Change to the following, here 192.168.1.1 is the IP address you want to replace

The code is as follows Copy Code

smtp       unix -      -      -       -      -       SMTP
       -o smtp_bind_address=192.168.1.1
# when relaying mail as backup MX, disable Fallback_relay to avoid MX loops
relay     unix -       -      -      -       -       SMTP
       -O smtp_bind_address=192.168.1.1
       -o smtp_fallback_relay=

#/etc/ Init.d/postfix restart //restart Postfix

Appendix:
If you have more than one IP, how do you set it?

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.