Bladeren bron

postfixadmin configuration

master
bovenliggende
commit
c93f2aa3e6
9 gewijzigde bestanden met toevoegingen van 63 en 0 verwijderingen
  1. +2
    -0
      tasks/main.yml
  2. +19
    -0
      tasks/postfixadmin.yml
  3. +6
    -0
      templates/mysql_virtual_alias_domain_catchall_maps.cf.j2
  4. +5
    -0
      templates/mysql_virtual_alias_domain_mailbox_maps.cf.j2
  5. +5
    -0
      templates/mysql_virtual_alias_domain_maps.cf.j2
  6. +6
    -0
      templates/mysql_virtual_alias_maps.cf.j2
  7. +9
    -0
      templates/mysql_virtual_domains_maps.cf.j2
  8. +5
    -0
      templates/mysql_virtual_mailbox_limit_maps.cf.j2
  9. +6
    -0
      templates/mysql_virtual_mailbox_maps.cf.j2

+ 2
- 0
tasks/main.yml Bestand weergeven

@@ -4,6 +4,8 @@
apt:
pkg: postfix

- include: postfixadmin.yml

- name: configuration pull directory
local_action: file
args:


+ 19
- 0
tasks/postfixadmin.yml Bestand weergeven

@@ -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

+ 6
- 0
templates/mysql_virtual_alias_domain_catchall_maps.cf.j2 Bestand weergeven

@@ -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'

+ 5
- 0
templates/mysql_virtual_alias_domain_mailbox_maps.cf.j2 Bestand weergeven

@@ -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'

+ 5
- 0
templates/mysql_virtual_alias_domain_maps.cf.j2 Bestand weergeven

@@ -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'

+ 6
- 0
templates/mysql_virtual_alias_maps.cf.j2 Bestand weergeven

@@ -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

+ 9
- 0
templates/mysql_virtual_domains_maps.cf.j2 Bestand weergeven

@@ -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

+ 5
- 0
templates/mysql_virtual_mailbox_limit_maps.cf.j2 Bestand weergeven

@@ -0,0 +1,5 @@
user = postfix
password = password
hosts = localhost
dbname = postfix
query = SELECT quota FROM mailbox WHERE username='%s' AND active = '1'

+ 6
- 0
templates/mysql_virtual_mailbox_maps.cf.j2 Bestand weergeven

@@ -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

Laden…
Annuleren
Opslaan