PMG Relay Outgoing Mails for specific Domain to Smarthost?

Abrucci

New Member
Jul 31, 2021
11
1
3
26
Hey there,

currently our Proxmox Mail Gateway sends Mails, send to Port 26 from our internal Exchange Server from itself.
Now one of our Domains is hosted @t-online.de and we can not change the MX Record.

Currently we fetch the incoming Mails from this Domain via Fetchmail.
Is it possible to Relay Mails send from that Domain to Port 26 to the @t-online.de Mailserver without relaying any other Domain?


Incoming normal Domain: External -> PMG SMTP -> Exchange/Plesk Server
Outgoing normal Domain: Exchange/Plesk Server -> Relay to PMG -> External

Incoming specific Domain: External -> T-Online -> PMG (Fetchmail) -> Exchange Server
Outgoing specific Domain: Exchange Server -> Relay to PMG -> Relay to T-Online -> External
 
Last edited:
Outgoing specific Domain: Exchange Server -> Relay to PMG -> Relay to T-Online -> External
I'm not sure I understand your request completely - so if I missed something please try to rephrase the setup...

You want mails _from_ one specific domain not to be routed directly through the internet, but sent to t-online as smart host?

In other words it depends on the sending email-address where the mail should be routed to?

If that's the case this should be doable by modifying the postfix configuration in PMG (you need to use the templateing system):
https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#pmgconfig_template_engine

Start with the transport(5) manpage of postfix - and http://www.postfix.org/postconf.5.html#sender_dependent_relayhost_maps

I hope this helps!
 

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!