corrigiendo errores

This commit is contained in:
Mauro Torrez 2019-05-28 20:31:23 -03:00
parent 1838d4792e
commit f1066458fb
3 changed files with 29 additions and 4 deletions

View File

@ -5,6 +5,18 @@
# carpeta por defecto para el mail
dovecot_mail_home: "{{ vmail_home | default('/srv/mail') }}"
# usuario por defecto para el mail
dovecot_mail_user: "{{ vmail_user | default('vmail') }}"
# uid por defecto para vmail
dovecot_mail_uid: "{{ vmail_uid | default(5000) }}"
# grupo por defecto para vmail
dovecot_mail_group: "{{ vmail_group | default('vmail') }}"
# gid por defecto para vmail
dovecot_mail_gid: "{{ vmail_gid | default(5000) }}"
# carpeta de mail de cada usuario
dovecot_user_home: "{{ dovecot_mail_home }}/mail/%d/%n"

View File

@ -24,6 +24,19 @@
{% endif %}
]
- name: Crear grupo para el mail
group:
name: "{{ dovecot_mail_group }}"
gid: "{{ dovecot_mail_gid }}"
- name: Crear usuario para el mail
user:
name: "{{ dovecot_mail_user }}"
uid: "{{ dovecot_mail_uid }}"
group: "{{ dovecot_mail_group }}"
home: "{{ dovecot_mail_home }}"
shell: /bin/false
- name: Directorios de configuración de Dovecot
file:
path: "{{ item }}"

View File

@ -27,8 +27,8 @@ namespace inbox {
# System user and group used to access mails. If you use multiple, userdb
# can override these by returning uid or gid fields. You can use either numbers
# or names. <doc/wiki/UserIds.txt>
mail_uid = {{ vmail_user }}
mail_gid = {{ vmail_group }}
mail_uid = {{ dovecot_mail_user }}
mail_gid = {{ dovecot_mail_group }}
# Group to enable temporarily for privileged operations. Currently this is
# used only with INBOX when either its initial creation or dotlocking fails.
@ -134,7 +134,7 @@ mail_gid = {{ vmail_group }}
# Space separated list of plugins to load for all services. Plugins specific to
# IMAP, LDA, etc. are added to this list in their own .conf files.
mail_plugins = $mail_plugins {% if dovecot_plugin_quota_enable -%}
mail_plugins = $mail_plugins {% if dovecot_quota_enable -%}
quota
{% endif %}
@ -144,7 +144,7 @@ quota
# Mailbox list indexes can be used to optimize IMAP STATUS commands. They are
# also required for IMAP NOTIFY extension to be enabled.
{% if dovecot_plugin_quota_enable and dovecot_plugin_quota.driver == "count" -%}
{% if dovecot_quota_enable and dovecot_quota_driver == "count" -%}
mailbox_list_index = yes
{% endif %}