mailRoutingAddress via LDAP

Francesco M. Taurino

Renowned Member
Jan 29, 2016
27
7
68
48
hi all,

in "mail proxy", under "transports" tab, it's possible to assign an "inbox" server for a realying
domain. eg:

relay domain: mydomain.com
host: inbox.mydomain.com
port: 25
use MX: unchecked

so only pmg postfix is exposed to internet, cleaning and routing emails.
but if there are, say, four "inbox" servers behind pmg, each used for a group of users,
with specific ldap attribute "mailRoutingAddress", it would be possible to modify postfix files
-manually- to get this up and running? it would be possible to add a line like this one

virtual_alias_maps = ldap:/etc/postfix/ldap-aliases.cf

to postfix main.cf to use a custom ldap aliases definition file?

many thanks,

francesco
 
I am working on a similar project, I am getting a recipient rejected message (
CLIENT: 450 4.7.1 : Recipient address rejected: Service is unavailable).

How do I get PMG to recognize virtual addresses found in /etc/postfix/virtual ?

Here is what I did, perhaps I took a wrong turn:
create templates folder: mkdir /etc/pmg/templates
copy base template to custom template folder: cp -p /var/lib/pmg/templates/* /etc/pmg/templates/

edit main template: nano /etc/pmg/templates/main.cf.in
Add: virtual_alias_maps = hash:/etc/postfix/virtual

build your alias file (see://www.postfix.org/VIRTUAL_README.html ): nano /etc/postfix/virtual
Add: firstalias@example.com john@example.com

sync & restart things:
sudo pmgconfig sync
postmap /etc/postfix/virtual
systemctl restart postfix


john@example.com is working properly.
 
Looks like a found a solution in "Unix & Linux System Administration Handbook":

main.cf needs two lines (I just had one - virtual_alias_maps):

virtual_alias_domains = $virtual_alias_maps
virtual_alias_maps = hash:/etc/postfix/virtual

John Schmerold
Katy Computer Systems, Inc
https://katycomputer.com
St Louis