Relay to Mailservers based on TO: Email-Addr

Ramalama

Well-Known Member
Dec 26, 2020
860
198
53
35
Hi, is it possible to use PMG to Route incoming Mails based on their destination mail address, to specific Mailservers?
Thats called in German a "Mailweiche", but im not sure how it's called in English.

The usecase is very simple, for example you have two companies that merged together, but both have still their own infrastructure and mailserver, with their old Domain...
Now both Companies want to be reachable under the same domain. For that usecase you can setup a simple "Mailweiche" with Postfix and you can use Postfix-Admin as a GUI to simply setup users->destinations.
So user1@newcompany.com will be relayed to mailserver1 and user2@newcompany.com will be relayed to mailserver2.

I installed a test instance of PBS to play a bit, but seems to me like there is no such option. Looks like PBS is just meant to be used with only one destination Mailserver generally.

Cheers
 
Hi, is it possible to use PMG to Route incoming Mails based on their destination mail address, to specific Mailservers?
Thats called in German a "Mailweiche", but im not sure how it's called in English.
Not sure if I understood you 100% - but put shortly - just add a Transport (GUI->Configuration->Mail Proxy->Transport) for each domain, with their respective mailserver?

I hope this helps!
 
Not sure if I understood you 100% - but put shortly - just add a Transport (GUI->Configuration->Mail Proxy->Transport) for each domain, with their respective mailserver?

I hope this helps!
Yeah indeed, i wrote non understandable crap :)

What i meant was:
rama@golima.de -> Kerio
stoiko@golima.de -> Exchange
lama@golima.de -> Zimbra

Routing to Mailserver based on destination email address.
Not Domain based. All users are under the se domain.

Thanks stoiko :)
 
Last edited:
per address transports are not really exposed in the GUI - and we're not planning on adding that (as it makes things quite a bit more complicated, and I don't think it's a very common setup).

You can adapt the postfix config (I think adding another transport_map file with each of those added manually, should work):
https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#pmgconfig_template_engine
 
  • Like
Reactions: Ramalama
Yeah indeed, i wrote non understandable crap :)

What i meant was:
rama@golima.de -> Kerio
stoiko@golima.de -> Exchange
lama@golima.de -> Zimbra

Routing to Mailserver based on destination email address.
Not Domain based. All users are under the se domain.

Thanks stoiko :)
Even if you got this to deliver the way you want using transport maps, I deeply pity the administrators that have to maintain the absolutely cursed configurations necessary to make cross-server email delivery function correctly within that domain (unless for some very strange reason it's not an issue).
 
Even if you got this to deliver the way you want using transport maps, I deeply pity the administrators that have to maintain the absolutely cursed configurations necessary to make cross-server email delivery function correctly within that domain (unless for some very strange reason it's not an issue).
I don't use PMG, just wanted to evaluate if should try it.
But without that ability i see no reason to switch from standard postfix + postfix-admin to pmg.

Basically postfix-admin does that via mapping.
Cheers :-)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!