3

I'm using the Postfix mail server and I have 6 IPs available. I'd like to use another IP to it with my pricipal ip.

How can I do this?

For example: main IP: 66.66.66.66 other IP: 66.66.66.67

2 Answers2

5

Edit the file /etc/postfix/main.cf (sudo nano /etc/postfix/main.cf), search for the line:

inet_interfaces = all

And change it to:

inet_interfaces = 127.0.0.1, 66.66.66.66, 66.66.66.67

Save, exit and restart postfix (sudo service postfix restart).

Eric Carvalho
  • 54,385
  • When i restart it: postfix: fatal: parameter inet_interfaces: no local interface found for 66.66.66.67 (the new ip) – Omer Stimpack Mar 09 '13 at 00:07
  • @stimpack Are you sure one of your interfaces is configured with this new IP? The message says this address wasn't found in any interface. It isn't really 66.66.66.67, is it? – Eric Carvalho Mar 09 '13 at 00:14
  • @Carvalho i just assigned thoses ips in my vps, i didn't make any interface, how can i make it? ( 66.66.66.67 was just example) – Omer Stimpack Mar 09 '13 at 00:25
  • @stimpack Please edit your QUESTION and include the output of ifconfig. – Eric Carvalho Mar 09 '13 at 00:30
0

In my case, I configured the machine to use only IPv4.

cat /etc/sysctl.d/local.conf 
# Disable IP V6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

and configure postfix to use only IPv4

vi /etc/postfix/main.cf

use only IP v4

inet_protocols = ipv4

and off-course

systemctl restart postfix.service