Forwarding an Incoming Email to Two Different Servers (Same Domain)

WichtigesYT

Active Member
Feb 21, 2021
31
0
26
Germany
lauchyt.de
Hello everyone,

I’m currently trying to configure Proxmox Mail Gateway to forward an incoming email to two different mail servers, even though both belong to the same domain. My goal is to have the same email delivered to both servers.

Setup:​

  • Proxmox Mail Gateway receives emails for mydomain.com.
  • I want incoming emails to be forwarded to both Server A and Server B.
  • Both servers handle email for mydomain.com.

My Approach So Far:​

I’ve tried setting this up using transport rules, but it doesn’t seem to work. I can define a single destination server without any issues, but I can’t find a way to send the email to both servers simultaneously.

Problem:​

  • Emails are only being delivered to one of the two servers.
  • I can’t find an option to send a copy of the email to the second server.
  • The logs show that the email is always routed to the first server defined in the transport settings.
Does anyone have an idea how to achieve this in Proxmox Mail Gateway? Is there a way to create a rule or mapping that allows the email to be sent to both servers?

Thanks for your help!
 
What do you want to achieve? I can't think of a system where your desired scenario could be configured out-of-the-box. If so, then mail servers run in a cluster and your gateway delivers the mails round-robin or based on costs to one or other server. At the moment, I don't see the point of your desired scenario as you ultimately have to ensure that your two mail servers serve one and the same database for the domain.
 
Hello everyone,

I’m currently trying to configure Proxmox Mail Gateway to forward an incoming email to two different mail servers, even though both belong to the same domain. My goal is to have the same email delivered to both servers.

I’ve tried setting this up using transport rules, but it doesn’t seem to work. I can define a single destination server without any issues, but I can’t find a way to send the email to both servers simultaneously.


Problem:​

  • Emails are only being delivered to one of the two servers.
  • I can’t find an option to send a copy of the email to the second server.
  • The logs show that the email is always routed to the first server defined in the transport settings.

Just saw your timely post as I want to do the same.
In my case, I want to run multiple internal mail servers running different groupware stacks, receiving the same mail, for testing purposes.
Like you, my first thought was to define multiple transports for the same domain. Pity it doesn't work. I wonder if it's doable with postfix somehow, possibly on one of the internal servers.
 
Last edited:
Hello everyone,

I have two locations, each running a Proxmox Mail Gateway and a mail server. My goal is to create a highly available setup so that if one server goes down, the remaining server continues handling all mail traffic without issues until the failed server is back online.


Setup:
Location A:
- Proxmox Mail Gateway A
- Mail Server A

Location B:
- Proxmox Mail Gateway B
- Mail Server B


- Both Proxmox Mail Gateways receive and filter emails for the same domain.
- Both mail servers handle email for the same domain.
- When both servers are online, emails should be delivered to both mail servers from one Proxmox Mail Gateway.



Problem/Questions:

- How can I ensure that a failure at one location does not disrupt email delivery?

- Should I run both Proxmox Mail Gateways in cluster mode, or is there a better approach?

- How can I ensure that no emails are lost during a failure and that everything synchronizes correctly when the failed server comes back online?


Has anyone set up something similar and can share best practices on how to achieve this?


Thanks for your help!
 
Last edited:
The way you describe it is contrary to best practice in my eyes.

The mail servers must run in a cluster to ensure reliability. This is about the database level, so PMG is out of the picture for now. You have to make sure that the two mail servers synchronize so that changes within the mailboxes are also synchronized. How do you want to make sure that the clients only ever communicate with the mail server that is online if they are in two locations?

Or are you only concerned with ensuring that no mails are lost in the event of a problem at one of the locations?

Best practice in my eyes would be two PMGs with two MX entries with weighting.

Location A has a weighting of 10 and location B has a weighting of 20.

If location A goes offline, the mails go to location B. There is no need for a mail server here, as the PMG at location B caches all incoming mails until the mail server at location A is available again and the PMG can deliver the mails.

You can of course also set up a mail server at location B, but then you must ensure that both mail servers are running in a cluster, e.g. a DAG cluster for an MS Exchnage. However, this is not recommended via WAN routes/VPN.