Update meta and readme

This commit is contained in:
Unknown 2018-05-07 22:28:10 +08:00
parent b8218116a7
commit 3c17537de5
3 changed files with 20 additions and 23 deletions

View file

@ -186,7 +186,7 @@ Apache License
same "printed page" as the copyright notice for easier same "printed page" as the copyright notice for easier
identification within third-party archives. identification within third-party archives.
Copyright {yyyy} {name of copyright owner} Copyright 2018 Adham Helal, Christian Wagner
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,44 +1,42 @@
[![Build Status](https://travis-ci.org/chriswayg/ansible-msmtp.svg?branch=master)](https://travis-ci.org/chriswayg/ansible-msmtp) [![Build Status](https://travis-ci.org/chriswayg/ansible-msmtp.svg?branch=master)](https://travis-ci.org/chriswayg/ansible-msmtp)
# Readme # chriswayg.msmtp-mailer
This ansible role deploys msmtp for Debian 9 stretch (tested on vagrant) This ansible role deploys msmtp for Debian / Ubuntu.
## Prerequisite ## Prerequisite
* Having ansible installed on your workstation. * Having ansible installed on your workstation.
* Having an SMTP server * Having an SMTP server
## How to install ## How to install
* Use github to clone/fork in your role directory * Use github to clone/fork into your role directory
* ansible galaxy ```ansible-galaxy install adham.helal.msmtp``` * ansible galaxy ```ansible-galaxy install chriswayg.msmtp-mailer```
## Variables ## Variables
All the default variables are located **defaults/main.yml**. Mostly you would need to configure the following variables. All the default variables are located **defaults/main.yml**. Mostly you would need to configure the following variables.
- *msmtp_accounts:* You can define one or more smtp account - *msmtp_accounts:* You can define one or more smtp accounts:
``` ```
msmtp_accounts: msmtp_accounts:
- account : "gmail" - account : gmail
host : "smtp.gmail.com" host : smtp.gmail.com
port : 587 port : 587
auth : "on" auth : "on"
user : "example@gmail.example" from : example@gmail.example
user : example@gmail.example
password : "some password" password : "some password"
- account : "mysmtp" - account : mysmtp
host : "smtp.example" host : smtp.example
port : 587 port : 587
auth : "on" auth : "on"
user : "myuser" from : admin@example.org
password : "123456" user : myuser@example.org
password : plain-text-password2
``` ```
- *msmtp_default_account:* Default smtp account to use - *msmtp_default_account:* Default smtp account to use
```msmtp_default_account: "gmail"``` ```msmtp_default_account: "gmail"```
- *msmtp_from:* From field
```msmtp_from : "No Reply"```
- Logging - Logging
- Option A (syslog) - Option A (syslog)
@ -81,13 +79,12 @@ You can configure your variables in ansible with one of the following
* Edit the default/main.yml (not recommended) * Edit the default/main.yml (not recommended)
## Run ## Run
**By default the mstmp will fail because the configuration uses a bogus smtp server you need to use a valid smtp server** **By default mstmp will work as the configuration uses a real smtp server (for testing only!)**
```ansible-playbook -l hostname msmtp.yml``` ```ansible-playbook -l hostname msmtp.yml```
## Test ## Test
You should get a test mail if it works on the root mail You should get a test mail if it works on the root mail
## Possible issues ## Documentation
From field requires more work [msmtp manual](http://msmtp.sourceforge.net/doc/msmtp.html)
[http://msmtp.sourceforge.net/doc/msmtp.html#Envelope_002dfrom-address](http://msmtp.sourceforge.net/doc/msmtp.html#Envelope_002dfrom-address)

View file

@ -11,7 +11,7 @@ galaxy_info:
versions: versions:
- trusty - trusty
- xenial - xenial
- bionic # - bionic
categories: categories:
- system - system
- networking - networking