2023-03-24 14:56:37 +01:00
|
|
|
# {{ ansible_managed }}
|
|
|
|
|
2023-03-24 15:30:27 +01:00
|
|
|
# Example
|
2023-03-24 14:56:37 +01:00
|
|
|
#
|
|
|
|
# postfix_aliases:
|
2023-03-24 15:30:27 +01:00
|
|
|
# - domain:
|
2023-03-24 15:42:15 +01:00
|
|
|
# name: mydomain.org
|
2023-03-24 14:56:37 +01:00
|
|
|
# comment: |
|
2023-03-24 15:30:27 +01:00
|
|
|
# # Mydomain.org
|
|
|
|
# # List of Aliases
|
2023-03-24 14:56:37 +01:00
|
|
|
# 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}}
|
2023-03-24 14:56:37 +01:00
|
|
|
{% if domain.comment is defined %}
|
2023-03-24 15:30:27 +01:00
|
|
|
{{ domain.comment }}
|
2023-03-24 14:56:37 +01:00
|
|
|
{% endif %}
|
|
|
|
{% for alias in domain.aliases %}
|
2023-03-24 15:30:27 +01:00
|
|
|
{{ "%-50s %s" | format(alias.name + '@' + domain.name, alias.dest | join(',')) }}
|
2023-03-24 14:56:37 +01:00
|
|
|
{% endfor %}
|
2023-03-24 15:36:28 +01:00
|
|
|
|
2023-03-24 14:56:37 +01:00
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|