Using PMG for in- and outgoing mails as relay/semi-smarthost

nsk

New Member
Jun 16, 2021
2
0
1
17
Hello everyone, sorry if the question has already been asked, I couldn't find anything about it.

We are currently using the PMG as a cluster, which filters incoming mail and then forwards it to the actual mail server.

Now this infrastructure is to be expanded so that not one mail server is responsible for all x domains, but many V-hosts operate their own mail server.

Is it possible that outgoing e-mails are checked in via the mail server of the V-Host, they are passed on to the PMG to check them and then given back to the mail server so that it can send them.

So for both, incoming and outgoing mail, PMG should only work as checking authority(milter) and not send outgoing mails, but rather give it back to the sending mail server. This is kind of a smarthost, but not really I guess.

We are currently using Postfix on the V hosts.

Thanks in advance.
 
Not sure I understand, why you don't simply let PMG send the mails out?

PMG does not support this out of the box - but I guess you could adapt the postfix configuration (in that case the outbound postfix smtpd (running on port 10025)) master.cf - to relay mail from your domains to the hosts themselves (sender_dependent_relay_maps).
Keep in mind that I never tried this - and that this is not really a supported setup - so please do some testing and carefully read the logs.

Adapting the postfix configuration in PMG needs to happen via the templateing system:
https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#pmgconfig_template_engine

I hope this helps!
 
Many thanks for the quick response.

So far we had the problem, due to many customers and only one outgoing mail server, that it could quickly lead to ending up on a blacklist. To get around this, we wanted to provide each customer with their own mail server so that, in if they spam, only these customers are affected.

If this is not possible or is only possible with difficulty, we would simply set up additional PMGs and send the emails over it. The question here is if makes sense, since I do not know whether the round-robin method will also be used for sending mails. What is the best way to proceed?

Thanks in advance!
 
f this is not possible or is only possible with difficulty, we would simply set up additional PMGs and send the emails over it.
Sounds a bit easier as setup.

The question here is if makes sense, since I do not know whether the round-robin method will also be used for sending mails. What is the best way to proceed?
Well - this depends on the config - but if you simply only accept mail from Domain A on PMG A and configure the mailserver of Domain A to send via PMG A (additionally you might also configure the trusted networks accordingly to only contain the IP of the mailserver for Domain A) this should work.

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!