Make use of relay_recipient_maps

michabbs

Member
May 5, 2020
113
13
23
Is it possible to use Postfix'es relay_recipient_maps feature?
I would like to have a list of all existing mailboxes, so that PMG could immediately reject emails to unknown users. I currently use it on my backup mx and it works very well. I am now going to set up PMG and am a little bit surprised PMG does not support it. (Or does it?)
 
I would like to have a list of all existing mailboxes, so that PMG could immediately reject emails to unknown users.
PMG uses recipient verification for this feature - see http://www.postfix.org/ADDRESS_VERIFICATION_README.html
(it's configurable in GUI->Configuration->Mail Proxy->Options)

if you want to adapt the postfix config used in PMG you can do so as well - just use the config templateing system:
https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#pmgconfig_template_engine

I hope this helps!
 
  • Like
Reactions: michabbs
I created my /etc/pmg/templates/main.cf.in with extra 'relay_recipient_maps' setting and it works perfect. :)

Now I imagine how could I synchronize relay_recipients.db in cluster? I simply put it to /etc/pmg. No success... I tried also to save it to /etc/pmg/templates. Also nothing was copied to another node... :-(

Of course I could write my own script, but... PMG configs are already synced anyway, so... How to (ab)use this feature? :cool:
 
Of course I could write my own script, but... PMG configs are already synced anyway, so... How to (ab)use this feature?
in principle the complete contents of /etc/pmg/templates should be synchronized - however - '.db' files are explicitly exempted from this...
meaning - you can get the source to all nodes - but would need to run postmap manually/via cron/some other mechanism (inotify) whenever the file changes.

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!