From 6c09b1739924ffe4442dbb00371e35b3a7f194fc Mon Sep 17 00:00:00 2001 From: phil Date: Sun, 21 May 2023 23:09:11 +0200 Subject: [PATCH] Update dict --- templates/postfix/conf.d/virtual_aliases.j2 | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/templates/postfix/conf.d/virtual_aliases.j2 b/templates/postfix/conf.d/virtual_aliases.j2 index 28b3d18..4e988a6 100644 --- a/templates/postfix/conf.d/virtual_aliases.j2 +++ b/templates/postfix/conf.d/virtual_aliases.j2 @@ -3,8 +3,7 @@ # Example # # postfix_aliases: -# - domain: -# name: mydomain.org +# - domain: mydomain.org # comment: | # # Mydomain.org # # List of Aliases @@ -14,13 +13,13 @@ # - "alice@yourdomain.org {% if postfix_aliases is defined %} -{% for domain in postfix_aliases %} -### {{ domain.name}} -{% if domain.comment is defined %} -{{ domain.comment }} +{% for item in postfix_aliases %} +### {{ item.domain }} +{% if item.comment is defined %} +{{ item.comment }} {% endif %} -{% for alias in domain.aliases %} -{{ "%-50s %s" | format(alias.name + '@' + domain.name, alias.dest | join(',')) }} +{% for alias in item.aliases %} +{{ "%-50s %s" | format(alias.name + '@' + item.domain, alias.dest | join(',')) }} {% endfor %} {% endfor %}