aboutsummaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2018-03-06 22:43:24 +0800
committerAaron LI <aly@aaronly.me>2018-03-14 11:35:08 +0800
commit89e40ceb20251c9a51de4fc4b334c144d4b2310d (patch)
tree1f893f9ff105f29f8820d7f7b5512521a83ad1da /roles
parent89b3b2abc7860062d1438257c43400e97e829064 (diff)
downloadansible-dfly-vps-89e40ceb20251c9a51de4fc4b334c144d4b2310d.tar.bz2
mail/dovecot: tweak passwd.j2 a bit
Diffstat (limited to 'roles')
-rw-r--r--roles/mail/templates/dovecot/passwd.j24
1 files changed, 2 insertions, 2 deletions
diff --git a/roles/mail/templates/dovecot/passwd.j2 b/roles/mail/templates/dovecot/passwd.j2
index b62ba2e..e2552f2 100644
--- a/roles/mail/templates/dovecot/passwd.j2
+++ b/roles/mail/templates/dovecot/passwd.j2
@@ -18,7 +18,7 @@
{% for dev in user.devices|default([]) %}
{{ name }}@{{ domain }}@{{ dev }}:{{ passdb[name].devices[dev] }}::::::user={{ name }}@{{ mydomain }}
{% endfor %}{# devices #}
-{% if user.name != "root" and "aliases" in user %}
+{% if user.name != "root" and user.aliases is defined %}
# aliases
{% for alias in user.aliases|default([]) %}
{{ alias }}@{{ domain }}:{{ passdb[name].pass }}::::::user={{ name }}@{{ mydomain }}
@@ -26,6 +26,6 @@
{{ alias }}@{{ domain }}@{{ dev }}:{{ passdb[name].devices[dev] }}::::::user={{ name }}@{{ mydomain }}
{% endfor %}{# devices #}
{% endfor %}{# alias #}
-{% endif %}{# alias #}
+{% endif %}{# aliases #}
{% endfor %}{# user #}
{% endfor %}{# domain #}