Introduce more configuration variables

This commit is contained in:
phil 2023-04-19 12:47:39 +02:00
parent 237cfae5a5
commit 8df0ffd7e2
6 changed files with 61 additions and 4 deletions

View file

@ -0,0 +1,7 @@
### {{ ansible_managed }}
{% if postfix_authorized_submit_users is defined %}
{% for user in postfix_authorized_submit_users %}
{{ user }}
{% endfor %}
{% endif %}

View file

@ -0,0 +1,7 @@
### {{ managed_by_ansible }}
{% if postfix_canonical_maps is defined %}
{% for map in postfix_canonical_maps %}
{{ "%-30s %s" | format(map.src, map.dest) }}
{% endfor %}
{% endif %}

View file

@ -0,0 +1,7 @@
### {{ managed_by_ansible }}
{% if postfix_sender_canonical_maps is defined %}
{% for map in postfix_sender_canonical_maps %}
{{ "%-30s %s" | format(map.src, map.dest) }}
{% endfor %}
{% endif %}

View file

@ -116,6 +116,31 @@ transport_maps =
{% endfor %}
{% endif %}
relayhost: {{ postfix_relayhost}}
{% if postfix_canonical_maps is defined %}
canonical_maps =
{% for map in postfix_canonical_maps %}
{{ map.type}}:{{ map.path }}
{% endfor %}
{% endif %}
{% if postfix_sender_canonical_maps is defined %}
sender_canonical_maps =
{% for map in postfix_sender_canonical_maps %}
{{ map.type}}:{{ map.path }}
{% endfor %}
{% endif %}
{% if postfix_type == "internet" %}
# Postfix-default: alias_maps = hash:/etc/mail/aliases nis:mail.aliases
# Prevents delays caused by NIS queries
{% endif %}
alias_maps =
{% for map in postfix_alias_map %}
{{ map.type }}:{{ map.path }}
{% endfor %}
{% if postfix_smtpd_sasl_type is defined %}
### SMTP Auth, server side
broken_sasl_auth_clients = yes
@ -298,10 +323,6 @@ html_directory = /usr/share/doc/postfix/html
disable_vrfy_command = yes
recipient_delimiter = +
# Postfix-default: alias_maps = hash:/etc/mail/aliases nis:mail.aliases
# Prevents delays caused by NIS queries
alias_maps =
# Error notifications
# http://www.postfix.org/postconf.5.html#notify_classes
notify_classes = data, delay, resource, software
@ -335,3 +356,11 @@ proxy_read_maps =
{{ map }}
{% endfor %}
{% endif %}
{% if postfix_authorized_submit_users is defined %}
# Allow/ prevent sendmail delivery for specific users
authorized_submit_users =
{% for map in postfix_authorized_submit_users %}
{{ map }}
{% endfor %}
{% endif %}