postfix

Ansible Role: Postfix

Postfix mail transfer agent (MTA)

This role is part of the Mailserver project.

MySQL Schema

  • ToDo

Examples

Postfix MTA with MySQL backend and multiple milters

- role: postfix
  postfix_hostname: "mail.example.com"
  postfix_config:

    local_catchall_alias: "[email protected]"

    ssl:
      key: "/etc/letsencrypt/live/mail.example.com/privkey.pem"
      certificate: "/etc/letsencrypt/live/mail.example.com/fullchain.pem"
      dhparams:
        file: "/etc/ssl/postfix_dhparams.pem"

      # Workaround for Outlook 2013 that requires TLSv1
      #protocols: "!SSLv2,!SSLv3"

    daemon_user: "postfix"
    milter_group: "milter" 

    milters:
      submission:
        - name: opendkim
          socket: "milters/opendkim.sock"
        - name: clamav
          socket: "milters/clamav-milter.ctl"
      incoming_recipient_restriction:
        - name: sqlgrey
          socket: "milters/sqlgrey.sock"
      incoming_smtpd:
        - name: spamassassin
          socket: "milters/spamass.sock"
        - name: clamav
          socket: "milters/clamav-milter.ctl"

    transports:
      - name: mailman
        unpriv: 'n'
        chroot: 'n'
        command: 'pipe'
        args:
          - 'flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py'
          - '${nexthop} ${user}'

  postfix_mysql:
    host: "127.0.0.1"
    port: 3306
    user: "postfix"
    password: "correct horse battery staple"
    database: "maildb"
Install
ansible-galaxy install mailserver/ansible-role-postfix
GitHub repository
License
Unknown
Downloads
78