ansible-role-postfix/templates/postfix/conf.d/virtual_aliases.j2

26 lines
534 B
Text
Raw Normal View History

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