buluma.postfix

Ansible Role postfix

This role installs and sets up Postfix on your server.

GitHub Version Issues Pull Requests Downloads
github Version Issues PullRequests Ansible Role

Example Playbook

Here’s an example configuration taken from molecule/default/converge.yml that is tested with each update.

---
- name: Setup Postfix
  hosts: all
  become: true
  gather_facts: true

  roles:
    - role: buluma.postfix
      # postfix_relayhost: "[relay.example.com]"
      postfix_myhostname: "smtp.example.com"
      postfix_mydomain: "example.com"
      postfix_myorigin: "example.com"
      postfix_mynetworks:
        - 127.0.0.0/8
        - 192.168.0.0/16
      postfix_aliases:
        - name: root
          destination: [email protected]
      # Ziggo settings: ("email-address" and "email-password" are placeholders)
      postfix_relayhost: "[smtp.ziggo.nl]:587"
      postfix_smtp_sasl_auth_enable: true
      postfix_smtp_sasl_password_map: "/etc/postfix/relay_pass"
      postfix_smtp_sasl_security_options: ""
      postfix_smtp_tls_wrappermode: false
      postfix_smtp_tls_security_level: may
      postfix_smtp_sasl_password_map_content: |
        [smtp.ziggo.nl]:587 email-address:email-password

Make sure your system is ready. In CI, this is done using molecule/default/prepare.yml:

---
- name: Prepare Environment
  hosts: all
  become: true
  gather_facts: false

  roles:
    - role: buluma.bootstrap
    - role: buluma.core_dependencies

For a complete guide on how to use these roles, check out the documentation.

Role Variables

You can find default variable values in defaults/main.yml:

---
# default settings for postfix

postfix_myhostname: "{{ ansible_fqdn }}"
postfix_mydomain: "{{ ansible_domain | default('localdomain', true) }}"
postfix_myorigin: "{{ ansible_domain | default('localdomain', true) }}"
postfix_inet_interfaces: "loopback-only"
postfix_inet_protocols: all
postfix_banner: "$myhostname ESMTP $mail_name"
postfix_mydestination: $mydomain, $myhostname, localhost.$mydomain, localhost
postfix_mynetworks:
  - 127.0.0.0/8

Requirements

Make sure to install the pip packages listed in requirements.txt.

State of Used Roles

These roles help set up your system, but you can choose different methods too.

Requirement GitHub Version
buluma.bootstrap Ansible Molecule Version
buluma.core_dependencies Ansible Molecule Version

Context

This role works well with many others. For more details, see the documentation of these roles.

Compatibility

This role has been tested on these container images:

Container Tags
Amazon Candidate
EL 9, 8
Debian All
Fedora All
Ubuntu All
Kali All

You need at least Ansible version 2.12. It has been tested on previous and current versions.

If you encounter any problems, please report them on GitHub.

Changelog

For the history of changes, check the Changelog.

License

This project is licensed under the Apache-2.0.

Author Information

The author of this role is Shadow Walker.

Informazioni sul progetto

Install and configure postfix on your system.

Installa
ansible-galaxy install buluma.postfix
Licenza
apache-2.0
Download
86.9k
Proprietario
DevOps Engineer