Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shaftoe/ansible-postfix
https://github.com/shaftoe/ansible-postfix
ansible-role debian email postfix
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/shaftoe/ansible-postfix
- Owner: shaftoe
- Created: 2020-05-08T07:48:46.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-20T17:53:22.000Z (over 4 years ago)
- Last Synced: 2024-11-14T21:38:46.361Z (2 months ago)
- Topics: ansible-role, debian, email, postfix
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ansible Postfix role
An Ansible role that takes care of installing Postfix MTA on the destination and relay **every** email sent locally to `default_email` address.
NOTE: Postfix `inet_interfaces` is set to `loopback-only` so it should be pretty safe (i.e. no open relay 😆)
## Features
- deliver every email sent internally (for example by *cron daemon*) to the email address set in `default_mail` variable
- perform some address rewrite: If the long form host address (`FQDN`) is something like `myhost01.mydomain.com`, then `MAIL FROM` (envelop AND `From:` headers) will be rewritten into `[email protected]` while `To:` and `Reply-to:` headers will be rewritten to `default_email`
- if the support for an authenticated SASL relay host is enabled, proxy all the messages through it## Configuration
Remember to define the mandatory `default_email` variable somewhere (personally I keep it in my `inventory` file), every email sent from the system (e.g. from *cron daemon*) will be forwareded to this address, and "Reply-to"
The role also provides support for an authenticated SASL SMTP relay host, to enable you need to also define those variables:
- `postfix_relayhost_fqdn`
- `postfix_relayhost_port`
- `postfix_relayhost_username`
- `postfix_relayhost_password`I'm using MailJet as a relay service and [their documentation][mailjet-docs] as a reference.
## Supported platforms
Tested on **Debian Buster** but should work allright on any *Debian-based* system
[mailjet-docs]: