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

28 lines
556 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:
2023-03-24 15:42:15 +01:00
# 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 %}
2023-03-24 15:36:28 +01:00
### {{ domain.name}}
{% 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 %}
2023-03-24 15:36:28 +01:00
{% endfor %}
{% endif %}