Oefenweb.postfix

Postfix

CI Ansible Galaxy

This guide helps you set up a Postfix server on systems like Debian.

Requirements

There are no special requirements.

Variables

  • postfix_install [default: [postfix, mailutils, libsasl2-2, sasl2-bin, libsasl2-modules]]: Packages that will be installed.

  • postfix_hostname [default: {{ ansible_fqdn }}]: The hostname used in configurations.

  • postfix_mailname [default: {{ ansible_fqdn }}]: The mail name used in /etc/mailname.

  • postfix_compatibility_level [optional]: Allows backward compatibility settings.

  • postfix_default_database_type [default: hash]: The default type for use with commands like newaliases.

  • postfix_aliases [default: []]: Email aliases to include in /etc/aliases.

  • postfix_virtual_aliases [default: []]: Virtual email aliases in /etc/postfix/virtual.

  • postfix_relayhost [default: '']: The hostname for relaying all emails.

  • postfix_relayhost_port [default: 587]: The port for the relay host.

  • postfix_sasl_auth_enable [default: true]: Enable authentication for the SMTP client.

  • postfix_sasl_user [default: postmaster@{{ ansible_domain }}]: The username for SASL relay.

  • postfix_sasl_password [default: k8+haga4@#pR]: The password for SASL relay (change this!).

  • postfix_smtp_tls_security_level [default: encrypt]: Security level for TLS in the SMTP client.

  • postfix_smtpd_banner [default: $myhostname ESMTP $mail_name (Ubuntu)]: The greeting message sent by the server.

  • postfix_message_size_limit [default: 10240000]: Maximum email size in bytes.

Dependencies

You'll need:

  • debconf
  • debconf-utils

Example(s)

Basic setup without SASL:

---
- hosts: all
  roles:
    - oefenweb.postfix
  vars:
    postfix_aliases:
      - user: root
        alias: [email protected]

Setup with virtual aliases:

---
- hosts: all
  roles:
    - oefenweb.postfix
  vars:
    postfix_virtual_aliases:
      - virtual: [email protected]
        alias: [email protected]

Enable email relaying:

---
- hosts: all
  roles:
    - oefenweb.postfix
  vars:
    postfix_relayhost: mail.yourdomain.org

Route emails using AWS SES:

---
- hosts: all
  roles:
    - oefenweb.postfix
  vars:
    postfix_relayhost: email-smtp.us-east-1.amazonaws.com
    postfix_sasl_user: AKIXXXXXXXXXXXXXXXXX

Setup with Gmail:

---
- hosts: all
  roles:
    - oefenweb.postfix
  vars:
    postfix_relayhost: smtp.gmail.com
    postfix_sasl_user: 'foo'
    postfix_sasl_password: 'bar'

License

MIT

Author Information

Created by Mischa ter Smitten.

Feedback

Your feedback is welcome!

Informazioni sul progetto

Set up a postfix server in Debian-like systems

Installa
ansible-galaxy install Oefenweb.postfix
Licenza
mit
Download
344.4k
Proprietario