瀏覽代碼

postfixadmin configuration

master
父節點
當前提交
c93f2aa3e6
共有 9 個文件被更改,包括 63 次插入0 次删除
  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 查看文件

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

- include: postfixadmin.yml

- name: configuration pull directory
local_action: file
args:


+ 19
- 0
tasks/postfixadmin.yml 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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 查看文件

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

Loading…
取消
儲存