ansible-role-postfix/templates/postfix/conf.d/virtual_aliases.j2
2023-05-21 23:09:11 +02:00

26 lines
540 B
Django/Jinja

### {{ ansible_managed }}
# Example
#
# postfix_aliases:
# - domain: mydomain.org
# comment: |
# # Mydomain.org
# # List of Aliases
# aliases:
# - name: foo
# dest:
# - "alice@yourdomain.org
{% if postfix_aliases is defined %}
{% for item in postfix_aliases %}
### {{ item.domain }}
{% if item.comment is defined %}
{{ item.comment }}
{% endif %}
{% for alias in item.aliases %}
{{ "%-50s %s" | format(alias.name + '@' + item.domain, alias.dest | join(',')) }}
{% endfor %}
{% endfor %}
{% endif %}