yauh.msmtp

yauh.msmtp

Ansible role for setting up msmtp mail transport agent

Requirements

SMTP server that msmtp may use for sending emails

Role Variables

All emails sent via the sendmail or mail commands will be delivered to msmtp_default_recipient. The sender address is msmtp_from. SMTP credentials are configured using the msmtp_hub_* variables.

TLS certificate checks are enabled using msmtp_tls_certcheck and the trust file is configured via msmtp_tls_trust_file.

This role may send a testmail unless msmtp_send_testmail is set to false.

msmtp_default_recipient: [email protected]
msmtp_from: [email protected]
msmtp_hub_pass: test
msmtp_hub_port: 587
msmtp_hub_server: smtp.gmail.com
msmtp_hub_user: [email protected]
msmtp_tls_certcheck: 'on'
msmtp_tls_trust_file: /etc/ssl/certs/ca-certificates.crt
msmtp_send_testmail: yes

Dependencies

None

Example Playbook

In order to specify the SMTP credentials it is advisable to either use a local variable file or possibly even Ansible vault.

``` `

  • hosts: all
  • roles:
    • { role: yauh.msmtp, msmtp_send_testmail: false }

## License
BSD

## Author Information
Stephan Hochhaus [email protected]

[https://github.com/yauh](https://github.com/yauh)
About

Set up msmtp mail transport agent

Install
ansible-galaxy install yauh.msmtp
GitHub repository
License
Unknown
Downloads
118
Owner
Making things work. Beware: Sometimes it's not a pretty sight.