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:
webmaster@example1.com user1
webmaster@example2.com 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 webmaster@example1.com i.e. the domain mapped to initial ip address 1.0.0.1 and not to webmaster@example2.com 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