Install and configure postfix on an Ubuntu or Redhat server.
Primarily for use in hosting environments so a website can deliver mail via 127.0.0.1.
-
Redhat or Ubuntu
-
Your playbook must gather_facts
- default_mail_recipient: The email address of the person who should receive mail for root (stuff that was generated by the server; ie cron failure notifications)
For servers that accept incoming mail:
- postfix_tls_cert: Absolute path to the TLS public certificate
- postfix_tls_key: Absolute path to the TLS private key
For systems behind a load balancer:
- postfix_myhostname: In some cases, ansible won't be able to figure out what to use for this, so you'll need to specify it manually
Tweaks: These only get applied if your playbook specifies them. Otherwise, the defaults for these are left up to your OS.
-
postfix_inet_interfaces: Defaults to "all" on debian, and "localhost" on red hat.
-
postfix_mynetworks: Default for both OS's is only to trust localhost.
-
Set 'enable_resolv_conf_watcher' to 'true' if postfix is having issues with resolving DNS.
None
---
- hosts: servers
roles:
- name: Install postfix
role: acromedia.postfix
default_mail_recipient: webmaster@example.com
GPLv3
Acro Media Inc. https://www.acromedia.com/