Browse Source

added domain alias support

tags/v1.4.1^0
Robin Thoni 6 years ago
parent
commit
1bf00f49c3

+ 1
- 0
postfix/config/main.cf View File

39
 virtual_mailbox_maps = pgsql:/etc/postfix/pgsql_virtual_mailbox_maps.cf
39
 virtual_mailbox_maps = pgsql:/etc/postfix/pgsql_virtual_mailbox_maps.cf
40
 virtual_alias_maps = pgsql:/etc/postfix/pgsql_virtual_alias_maps.cf,
40
 virtual_alias_maps = pgsql:/etc/postfix/pgsql_virtual_alias_maps.cf,
41
                      pgsql:/etc/postfix/pgsql_virtual_alias_maps_regexp.cf,
41
                      pgsql:/etc/postfix/pgsql_virtual_alias_maps_regexp.cf,
42
+                     pgsql:/etc/postfix/pgsql_virtual_alias_domain_maps.cf,
42
                      pgsql:/etc/postfix/pgsql_virtual_alias_maps_alias.cf
43
                      pgsql:/etc/postfix/pgsql_virtual_alias_maps_alias.cf
43
 relay_domains = pgsql:/etc/postfix/pgsql_relay_domains.cf
44
 relay_domains = pgsql:/etc/postfix/pgsql_relay_domains.cf
44
 virtual_minimum_uid=100
45
 virtual_minimum_uid=100

+ 5
- 0
postfix/config/pgsql_virtual_alias_domain_maps.cf View File

1
+hosts = POSTGRES_HOST
2
+user = POSTGRES_USER
3
+password = POSTGRES_PASSWORD
4
+dbname = POSTGRES_DB
5
+query = SELECT a.goto FROM alias_domain ad LEFT JOIN alias a ON a.domain = ad.target_domain WHERE ad.alias_domain = '%d' AND ad.active = true AND a.address = '%u' || '@' || ad.target_domain

+ 1
- 0
postfix/vars-files View File

3
 /etc/postfix/pgsql_relay_domains.cf
3
 /etc/postfix/pgsql_relay_domains.cf
4
 /etc/postfix/pgsql_transport.cf
4
 /etc/postfix/pgsql_transport.cf
5
 /etc/postfix/pgsql_virtual_alias_maps_alias.cf
5
 /etc/postfix/pgsql_virtual_alias_maps_alias.cf
6
+/etc/postfix/pgsql_virtual_alias_domain_maps.cf
6
 /etc/postfix/pgsql_virtual_alias_maps.cf
7
 /etc/postfix/pgsql_virtual_alias_maps.cf
7
 /etc/postfix/pgsql_virtual_alias_maps_regexp.cf
8
 /etc/postfix/pgsql_virtual_alias_maps_regexp.cf
8
 /etc/postfix/pgsql_virtual_mailbox_domains.cf
9
 /etc/postfix/pgsql_virtual_mailbox_domains.cf

Loading…
Cancel
Save