I have a VPS with multiple domains set up on it on a shared IP.
This server also runs a mail server for each domain with a few mailboxes linked to some of them.
It is all running perfect for sending/receiving to all the usual off-locations (gmail, hotmail etc) BUT i cannot figure out how to allow local delivery of emails to another domain on the same server.
For instance:
localdomain1.com (located on my VPS)
localdomain2.com (located on my VPS)
outsidedomain.com (NOT located on my VPS)
Send email from [email protected] -> [email protected] = OK!
BUT
Send email from [email protected] -> [email protected] = Instant email-bounce with this error: "user unknown in virtual mailbox table"
I understand that this is likely because it is discovering that the IP for the receiver (localdomain2.com) is the same as the sender (localdomain1.com) and therefore locally goes to find the mailbox for "[email protected]" but of course that mailbox is located under another account (on the same server) so it can't find the mailbox and stops the send.
In theory i could add a catching-mailbox in the localdomain1.com account with forwarding to the real location but this is not sustainable at scale.
Are there changes i could make to the DNS to solve this problem and automate it rather than apply a bandaid to the problem?
The specs:
Linux VPS
Plesk Control Panel
Ubuntu 18.04.4 LTS
"Installed mail server": Postfix
"Install and use another IMAP/POP3 server": Dovecot
"Outgoing mail mode": Send from domain IP addresses
DNS for the domains using the local mailserver:
domain1.com MX mail.domain1.com (each domain has its own "mail." used)
mail.domain1.com A XX.XX.XX.XXX (local shared IP)
DNS for domains with remote mailservers:
There is also one website that uses a mailserver on a different host, keep in mind any solutions ideally will work with external mailservers and/or forwarders in the future:
domain2.com MX mail.domain2.com
mail.domain2.com A XX.XX.XX.XXX (external IP of mailserver)
I feel terrible bothering everyone and asking for help, usually it's the other way around! But after spending a good couple hours searching i somehow did not find anyone on any forum with this same situation.
Thanks in advance!
This server also runs a mail server for each domain with a few mailboxes linked to some of them.
It is all running perfect for sending/receiving to all the usual off-locations (gmail, hotmail etc) BUT i cannot figure out how to allow local delivery of emails to another domain on the same server.
For instance:
localdomain1.com (located on my VPS)
localdomain2.com (located on my VPS)
outsidedomain.com (NOT located on my VPS)
Send email from [email protected] -> [email protected] = OK!
BUT
Send email from [email protected] -> [email protected] = Instant email-bounce with this error: "user unknown in virtual mailbox table"
I understand that this is likely because it is discovering that the IP for the receiver (localdomain2.com) is the same as the sender (localdomain1.com) and therefore locally goes to find the mailbox for "[email protected]" but of course that mailbox is located under another account (on the same server) so it can't find the mailbox and stops the send.
In theory i could add a catching-mailbox in the localdomain1.com account with forwarding to the real location but this is not sustainable at scale.
Are there changes i could make to the DNS to solve this problem and automate it rather than apply a bandaid to the problem?
The specs:
Linux VPS
Plesk Control Panel
Ubuntu 18.04.4 LTS
"Installed mail server": Postfix
"Install and use another IMAP/POP3 server": Dovecot
"Outgoing mail mode": Send from domain IP addresses
DNS for the domains using the local mailserver:
domain1.com MX mail.domain1.com (each domain has its own "mail." used)
mail.domain1.com A XX.XX.XX.XXX (local shared IP)
DNS for domains with remote mailservers:
There is also one website that uses a mailserver on a different host, keep in mind any solutions ideally will work with external mailservers and/or forwarders in the future:
domain2.com MX mail.domain2.com
mail.domain2.com A XX.XX.XX.XXX (external IP of mailserver)
I feel terrible bothering everyone and asking for help, usually it's the other way around! But after spending a good couple hours searching i somehow did not find anyone on any forum with this same situation.
Thanks in advance!