1
2
3
4
5
6
7
8
9
10
11
12
13
14
# In main.cf: 

#virtual_mailbox_domains: mydomain.com   <-- with this it works, with the following line I get relay access denied
virtual_mailbox_domains: pgsql:/etc/postfix/postfix_vmailbox_domains.cf


# In postfix_vmailbox_domains.cf:

hosts=localhost
user= u_master
password= blahblah
dbname= cms_master

query= SELECT domain FROM cms_domains WHERE domain='%d'