https://github.com/s-hamann/ansible-openwrt-msmtp
Ansible role for msmtp configuration on OpenWrt
https://github.com/s-hamann/ansible-openwrt-msmtp
ansible-role msmtp openwrt
Last synced: 8 months ago
JSON representation
Ansible role for msmtp configuration on OpenWrt
- Host: GitHub
- URL: https://github.com/s-hamann/ansible-openwrt-msmtp
- Owner: s-hamann
- Created: 2024-03-11T17:00:36.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-11T17:40:23.000Z (over 2 years ago)
- Last Synced: 2025-01-18T14:29:20.254Z (over 1 year ago)
- Topics: ansible-role, msmtp, openwrt
- Language: Jinja
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
OpenWrt msmtp
=============
This role installs and configures [msmtp](https://marlam.de/msmtp/) on [OpenWrt](https://www.openwrt.org/) targets.
Requirements
------------
This role has no special requirements on the controller.
It does, however, require a working [Python](https://www.python.org/) installation on the target system or [gekmihesg's Ansible library for OpenWrt](https://github.com/gekmihesg/ansible-openwrt) on the Ansible controller.
Role Variables
--------------
* `msmtp_default_config`
Set default configuration settings for all accounts.
This variable must be a dictionary where the keys are msmtp configuration options and dictionary values are the respective configuration values.
Refer to the [msmtp documentation](https://marlam.de/msmtp/msmtp.html) for valid options.
Optional.
* `msmtp_accounts`
Set msmtp accounts and account-specific configuration.
This variable must be a dictionary where the keys are msmtp account names and the dictionary values are dictionaries, with the same semantics as `msmtp_default_config`.
Optional.
* `msmtp_package`
The name of the msmtp package to install.
Usually either `msmtp` or `msmtp-nossl`.
Defaults to `msmtp` if TLS is enabled in `msmtp_default_config` or `msmtp_accounts` and `msmtp-nossl` otherwise.
* `msmtp_group`
The name of a system group to have read access to the msmtp config file.
Only users in this group can use msmtp.
This role creates the group if it does not exist on the target system.
Optional.
Dependencies
------------
This role does not depend on any specific roles.
Example Configuration
---------------------
The following is a short example for some of the configuration options this role provides:
```yaml
msmtp_default_config:
tls: true
port: 587
msmtp_accounts:
default:
host: mail.oursite.example
port: 465
tls: true
tls_starttls: false
from: %U@oursite.example
syslog: LOG_MAIL
freemail:
host: smtp.freemail.example
from: joe_smith@freemail.example
auth: on
user: joe.smith
password: secret123
```
License
-------
MIT