ansible-msmtp-mailer/templates/msmtprc.j2

47 lines
1.2 KiB
Plaintext
Raw Normal View History

2014-03-21 19:16:55 +00:00
# {{ ansible_managed }}
# Default settings that all others accounts inherit
2014-03-21 19:16:55 +00:00
defaults
auth on
tls on
tls_starttls on
2014-06-24 05:43:16 +00:00
{% if msmtp_tls_trust_file is defined %}
tls_trust_file {{msmtp_tls_trust_file}}
{% else %}
2014-03-21 19:16:55 +00:00
tls_trust_file /etc/ssl/certs/ca-certificates.crt
2014-06-24 05:43:16 +00:00
{% endif %}
2014-03-21 19:16:55 +00:00
# Logging
2014-03-21 19:16:55 +00:00
{% if msmtp_log is defined %}
{% if msmtp_log == "syslog" %}
syslog on
{% elif msmtp_log == "file" and msmtp_logfile is defined %}
logfile {{msmtp_logfile}}
{% endif %}
{% endif %}
# default is localhost. Use domain part of your email address or FQDN of host.
domain {{msmtp_domain}}
# default is off. When on, an envelope-from address of the form user@domain will be generated.
auto_from off
# The default is to remove BCC headers.
# remove_bcc_headers on|off
2014-03-21 19:16:55 +00:00
{% if msmtp_accounts is defined %}
{% for msmtp_account in msmtp_accounts %}
#
account {{msmtp_account.account}}
host {{msmtp_account.host}}
port {{msmtp_account.port}}
auth {{msmtp_account.auth}}
from {{msmtp_account.from}}
2014-03-21 19:16:55 +00:00
user {{msmtp_account.user}}
password {{msmtp_account.password}}
{% endfor %}
{% endif %}
# Default account to use
account default : {{msmtp_default_account}}
2014-06-24 05:43:16 +00:00
aliases /etc/aliases