Score:0

Setting up Mail Server for multiple domains mapped to different ip addresses

ph flag

We have taken dedicated hosting and using it for hosting multiple domains.

The different domains are mapped to different ip addresses.

for example

example1.com mapped to 1.0.0.1

and

example2.com mapped to 1.0.0.2

1.0.0.1 was the ip address that came initially with the hosting and we purchased and added another ip 1.0.0.2 later.

Right now postfix has been set up to deliver mails and configuration has been done in

/etc/postfix/virtual

to send mail for both domains to the same account (user1) like below:

[email protected] user1
[email protected] user1

The additional ip address were added using netplan by editing the 01-netcfg.yaml file as follows:

#This file describes the network interfaces available on your system
#For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    enp2s0:
      dhcp4: yes
      addresses: [1.0.0.1/22, 1.0.0.2/22, 69.64.50.12/22]

PROBLEM: The mail only arrives when sent to [email protected] i.e. the domain mapped to initial ip address 1.0.0.1 and not to [email protected] mapped to the additional ip address - 1.0.0.2

As already stated 1.0.0.1, 1.0.0.2 are just example ip addresses here

Tilman avatar
cn flag
Please add relevant details. What do you mean by "mapped to"? Show your exact DNS entries. What do you mean by "does not arrive"? Is there an error message? Do you get a non-delivery message (aka bounce)? What does the Postfix log show in the case ot the mail not arriving? And, on a different track: why did you assign different IP addresses in the first place? What do you want to achieve by that?
in flag
There should be something in `/var/log/mail.log` showing that a message was received. If there isn’t, you’ll want to confirm that port 25 is not blocked for that second IP address
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.