@@ -4,6 +4,8 @@ | |||||
apt: | apt: | ||||
pkg: postfix | pkg: postfix | ||||
- include: postfixadmin.yml | |||||
- name: configuration pull directory | - name: configuration pull directory | ||||
local_action: file | local_action: file | ||||
args: | args: | ||||
@@ -0,0 +1,19 @@ | |||||
--- | |||||
- name: postfix sql map directory | |||||
file: | |||||
path: /etc/postfix/sql/ | |||||
state: directory | |||||
- name: postfix sql map configuration | |||||
template: | |||||
src: "{{item}}.j2" | |||||
dest: /etc/postfix/sql/{{item}} | |||||
with_items: | |||||
- mysql_virtual_alias_domain_catchall_maps.cf | |||||
- mysql_virtual_alias_domain_maps.cf | |||||
- mysql_virtual_domains_maps.cf | |||||
- mysql_virtual_mailbox_maps.cf | |||||
- mysql_virtual_alias_domain_mailbox_maps.cf | |||||
- mysql_virtual_alias_maps.cf | |||||
- mysql_virtual_mailbox_limit_maps.cf |
@@ -0,0 +1,6 @@ | |||||
# handles catch-all settings of target-domain | |||||
user = postfix | |||||
password = password | |||||
hosts = localhost | |||||
dbname = postfix | |||||
query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1' |
@@ -0,0 +1,5 @@ | |||||
user = postfix | |||||
password = password | |||||
hosts = localhost | |||||
dbname = postfix | |||||
query = SELECT maildir FROM mailbox,alias_domain WHERE alias_domain.alias_domain = '%d' and mailbox.username = CONCAT('%u', '@', alias_domain.target_domain) AND mailbox.active = 1 AND alias_domain.active='1' |
@@ -0,0 +1,5 @@ | |||||
user = postfix | |||||
password = password | |||||
hosts = localhost | |||||
dbname = postfix | |||||
query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('%u', '@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1' |
@@ -0,0 +1,6 @@ | |||||
user = postfix | |||||
password = password | |||||
hosts = localhost | |||||
dbname = postfix | |||||
query = SELECT goto FROM alias WHERE address='%s' AND active = '1' | |||||
#expansion_limit = 100 |
@@ -0,0 +1,9 @@ | |||||
user = postfix | |||||
password = password | |||||
hosts = localhost | |||||
dbname = postfix | |||||
query = SELECT domain FROM domain WHERE domain='%s' AND active = '1' | |||||
#query = SELECT domain FROM domain WHERE domain='%s' | |||||
#optional query to use when relaying for backup MX | |||||
#query = SELECT domain FROM domain WHERE domain='%s' AND backupmx = '0' AND active = '1' | |||||
#expansion_limit = 100 |
@@ -0,0 +1,5 @@ | |||||
user = postfix | |||||
password = password | |||||
hosts = localhost | |||||
dbname = postfix | |||||
query = SELECT quota FROM mailbox WHERE username='%s' AND active = '1' |
@@ -0,0 +1,6 @@ | |||||
user = postfix | |||||
password = password | |||||
hosts = localhost | |||||
dbname = postfix | |||||
query = SELECT maildir FROM mailbox WHERE username='%s' AND active = '1' | |||||
#expansion_limit = 100 |