forked from evolix/ansible-roles
dovecot: default conf for packmail
This commit is contained in:
parent
251299cee6
commit
a0006a1318
|
@ -3,3 +3,8 @@
|
||||||
service:
|
service:
|
||||||
name: dovecot
|
name: dovecot
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
|
- name: reload dovecot
|
||||||
|
service:
|
||||||
|
name: dovecot
|
||||||
|
state: reloaded
|
||||||
|
|
|
@ -7,5 +7,54 @@
|
||||||
- dovecot-imapd
|
- dovecot-imapd
|
||||||
- dovecot-pop3d
|
- dovecot-pop3d
|
||||||
- dovecot-sieve
|
- dovecot-sieve
|
||||||
|
- dovecot-managesieved
|
||||||
|
tags:
|
||||||
|
- dovecot
|
||||||
|
|
||||||
|
- name: update ldap auth
|
||||||
|
lineinfile:
|
||||||
|
dest: /etc/dovecot/dovecot-ldap.conf.ext
|
||||||
|
line: "{{ item.key }} = {{ item.value }}"
|
||||||
|
regexp: "^#*{{ item.key }}"
|
||||||
|
state: present
|
||||||
|
with_items:
|
||||||
|
- { key: 'hosts', value: '127.0.0.1' }
|
||||||
|
- { key: 'auth_bind', value: 'yes' }
|
||||||
|
- { key: 'ldap_version', value: 3 }
|
||||||
|
- { key: 'base', value: "{{ ldap_suffix }}" }
|
||||||
|
- { key: 'user_attrs', value: 'homeDirectory=home' }
|
||||||
|
- { key: 'user_filter', value: '(&(isActive=TRUE)(uid=%u))' }
|
||||||
|
- { key: 'pass_attrs', value: 'uid=user,userPassword=password' }
|
||||||
|
when: ldap_suffix is defined
|
||||||
|
notify: reload dovecot
|
||||||
|
tags:
|
||||||
|
- dovecot
|
||||||
|
|
||||||
|
- name: create vmail group
|
||||||
|
group:
|
||||||
|
name: vmail
|
||||||
|
gid: 5000
|
||||||
|
tags:
|
||||||
|
- dovecot
|
||||||
|
|
||||||
|
- name: create vmail user
|
||||||
|
user:
|
||||||
|
name: vmail
|
||||||
|
group: vmail
|
||||||
|
uid: 5000
|
||||||
|
shell: /bin/false
|
||||||
|
tags:
|
||||||
|
- dovecot
|
||||||
|
|
||||||
|
- name: deploy evolix config
|
||||||
|
template:
|
||||||
|
src: z-evolinux-defaults.conf.j2
|
||||||
|
dest: /etc/dovecot/conf.d/z-evolinux-defaults.conf
|
||||||
|
mode: "0644"
|
||||||
|
notify: reload dovecot
|
||||||
|
tags:
|
||||||
|
- dovecot
|
||||||
|
|
||||||
- include: munin.yml
|
- include: munin.yml
|
||||||
|
tags:
|
||||||
|
- dovecot
|
||||||
|
|
53
dovecot/templates/z-evolinux-defaults.conf.j2
Normal file
53
dovecot/templates/z-evolinux-defaults.conf.j2
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
|
disable_plaintext_auth = no
|
||||||
|
auth_mechanisms = plain login
|
||||||
|
!include auth-ldap.conf.ext
|
||||||
|
service auth {
|
||||||
|
unix_listener auth-userdb {
|
||||||
|
mode = 0600
|
||||||
|
user = vmail
|
||||||
|
group = vmail
|
||||||
|
}
|
||||||
|
unix_listener /var/spool/postfix/private/auth-client {
|
||||||
|
mode = 0666
|
||||||
|
user = postfix
|
||||||
|
group = postfix
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mail_location = maildir:/home/vmail/%d/%n
|
||||||
|
mail_uid = 5000
|
||||||
|
mail_gid = 5000
|
||||||
|
|
||||||
|
protocol lda {
|
||||||
|
mail_plugins = sieve
|
||||||
|
}
|
||||||
|
|
||||||
|
service managesieve-login {
|
||||||
|
inet_listener sieve {
|
||||||
|
port = 4190
|
||||||
|
}
|
||||||
|
|
||||||
|
inet_listener sieve_deprecated {
|
||||||
|
port = 2000
|
||||||
|
}
|
||||||
|
service_count = 1
|
||||||
|
process_min_avail = 0
|
||||||
|
vsz_limit = 64M
|
||||||
|
}
|
||||||
|
|
||||||
|
service managesieve {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protocol sieve {
|
||||||
|
managesieve_max_line_length = 65536
|
||||||
|
mail_max_userip_connections = 10
|
||||||
|
mail_plugins =
|
||||||
|
managesieve_logout_format = bytes=%i/%o
|
||||||
|
managesieve_implementation_string = Dovecot Pigeonhole
|
||||||
|
managesieve_sieve_capability =
|
||||||
|
managesieve_notify_capability =
|
||||||
|
managesieve_max_compile_errors = 5
|
||||||
|
}
|
Loading…
Reference in a new issue