瀏覽代碼

Adding vmail user/group. Setting Dovecot auth config.

merge-requests/1/merge
Christoph Haas 10 年之前
父節點
當前提交
07916f2a89
共有 4 個檔案被更改,包括 21 行新增0 行删除
  1. +2
    -0
      group_vars/all
  2. +1
    -0
      ispmail.yml
  3. +4
    -0
      roles/ispmail-dovecot/handlers/main.yml
  4. +14
    -0
      roles/ispmail-dovecot/tasks/main.yml

+ 2
- 0
group_vars/all 查看文件

@@ -1,2 +1,4 @@
ispmail_mysql_mailuser_password: fLxsWdf5ABLqwhZr

ispmail_dovecot_auth_mechanisms: plain login


+ 1
- 0
ispmail.yml 查看文件

@@ -7,4 +7,5 @@
- ispmail-certificate
- ispmail-database
- ispmail-postfix
- ispmail-dovecot


+ 4
- 0
roles/ispmail-dovecot/handlers/main.yml 查看文件

@@ -0,0 +1,4 @@
---
- name: restart dovecot
service: name=dovecot state=restarted


+ 14
- 0
roles/ispmail-dovecot/tasks/main.yml 查看文件

@@ -0,0 +1,14 @@
---
- name: Create the vmail group
group: name=vmail gid=5000
- name: Create the vmail user
user: name=vmail uid=5000 group=vmail
- name: Create mailbox directory
file: path=/var/vmail state=directory owner=vmail group=vmail
- name: Allow LOGIN authentication method for Outlook clients
lineinfile: dest=/etc/dovecot/conf.d/10-auth.conf regexp='^auth_mechanisms =' line='auth_mechanisms = {{ispmail_dovecot_auth_mechanisms}}' backrefs=yes
- name: Disabling system authentication
lineinfile: dest=/etc/dovecot/conf.d/10-auth.conf regexp='^!include auth-system.conf.ext' line='#!include auth-system.conf.ext' backrefs=yes
- name: Enabling SQL-based authentication
lineinfile: dest=/etc/dovecot/conf.d/10-auth.conf regexp='^\#!include auth-sql.conf.ext' line='!include auth-sql.conf.ext' backrefs=yes


Loading…
取消
儲存