• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question How to allow mailserver to send mail between mailboxes on different domains but the same VPS server

sammage

New Pleskian
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!
 
Apologies, it would appear that the local sending is now working for everything EXCEPT for the ones with remote mailservers.
Not sure what made it start working but now we can narrow the solutions most likely to this DNS setup:

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)
 
Interesting issue..

Actually I didn't experience the same setup before but here is the solution:

Right into the heart of the issue:

Backup first and check
If this didn't help pls share the error message in /var/log/maillog
 
Thanks i appreciate the reply!
Not sure what i did to fix it but it is all running perfectly now!
 
Back
Top