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

27 lines
540 B
Text
Raw Normal View History

2023-04-19 12:56:49 +02:00
### {{ ansible_managed }}
2023-03-24 15:30:27 +01:00
# Example
#
# postfix_aliases:
2023-05-21 23:09:11 +02:00
# - domain: 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 %}
2023-05-21 23:09:11 +02:00
{% for item in postfix_aliases %}
### {{ item.domain }}
{% if item.comment is defined %}
{{ item.comment }}
{% endif %}
2023-05-21 23:09:11 +02:00
{% for alias in item.aliases %}
{{ "%-50s %s" | format(alias.name + '@' + item.domain, alias.dest | join(',')) }}
{% endfor %}
2023-03-24 15:36:28 +01:00
{% endfor %}
{% endif %}