Configures /etc/postfix/sasl_passwd for relayhost SMTP authentication with optional MX lookup mode. Generates hashed credentials file and triggers postmap.
// Source: https://github.com/Oefenweb/ansible-postfix | License: MIT | Copyright Oefenweb.nl <https://github.com/Oefenweb>
// Provided via justclaw.it.com; keep this notice with the code.
{{ ansible_managed | comment }}
{% if postfix_relayhost_mxlookup %}
{{ postfix_relayhost }}:{{ postfix_relayhost_port }} {{ postfix_sasl_user }}:{{ postfix_sasl_password }}
{% else %}
[{{ postfix_relayhost }}]:{{ postfix_relayhost_port }} {{ postfix_sasl_user }}:{{ postfix_sasl_password }}
{% endif %}
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key