From 89e40ceb20251c9a51de4fc4b334c144d4b2310d Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 6 Mar 2018 22:43:24 +0800 Subject: mail/dovecot: tweak passwd.j2 a bit --- roles/mail/templates/dovecot/passwd.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'roles/mail/templates') 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 #} -- cgit v1.2.2