Add template for sasl auth configuration
This commit is contained in:
parent
8cf866e399
commit
649e769424
3 changed files with 12 additions and 1 deletions
|
@ -46,6 +46,7 @@
|
||||||
- relay_by_sender
|
- relay_by_sender
|
||||||
- relay_checks
|
- relay_checks
|
||||||
- sender_checks
|
- sender_checks
|
||||||
|
- smtp_sasl_auth_password
|
||||||
- transport_global_exceptions
|
- transport_global_exceptions
|
||||||
- transport_relay
|
- transport_relay
|
||||||
notify: reload postfix
|
notify: reload postfix
|
||||||
|
|
5
templates/postfix/conf.d/smtp_sasl_auth_password.j2
Normal file
5
templates/postfix/conf.d/smtp_sasl_auth_password.j2
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#{{ ansible_managed }}
|
||||||
|
|
||||||
|
{% if postfix_smtp_sasl_auth is defined %}
|
||||||
|
{{ "%-50s %s:%s" | format(postfix_smtp_sasl_auth_relay, postfix_smtp_sasl_auth_user, postfix_smtp_sasl_auth_password) }}
|
||||||
|
{% endif %}
|
|
@ -123,7 +123,12 @@ smtpd_sasl_exceptions_networks = {{ postfix_smtpd_sasl_exceptions_networks | joi
|
||||||
### SMTP Auth client side
|
### SMTP Auth client side
|
||||||
smtp_sasl_auth_enable = yes
|
smtp_sasl_auth_enable = yes
|
||||||
smtp_sasl_auth_soft_bounce = no
|
smtp_sasl_auth_soft_bounce = no
|
||||||
smtp_sasl_password_maps = hash:/etc/postfix/sasl/sasl_passwd
|
{% if postfix_smtp_sasl_password_maps is defined %}
|
||||||
|
smtp_sasl_password_maps =
|
||||||
|
{% for map in postfix_smtp_sasl_password_maps %}
|
||||||
|
{{ map.type }}:{{ map.path }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
smtp_sasl_security_options = noanonymous
|
smtp_sasl_security_options = noanonymous
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue