hygienic-books c345bd5538 fix(role): Fix Postfix syntax error
We had a stray letter in a configuration field intended to be used
for port numbers which resulted in port numbers such as 587c where
the letter tripped up Postfix' SMTP client which in turn caused
it to exit early. Any e-mail stuck in queue to be sent upstream would
remain stuck indefinitely as no connection was possible.

We're opting to not implement a config test. A 'postfix check' will
not find such issues and a service restart via an Ansible handler
will work without issues. Postfix will only complain about such an
issue when connecting its client to the upstream server for real mail
delivery. Any detection or validation mechanism would require the
same real-life test of sending an e-mail. At this time its appears
saner to not implement a test rather than implementing an invasive
test.
2026-06-30 16:25:52 +02:00
2025-04-02 23:39:17 +02:00
2025-04-02 23:39:17 +02:00
2025-04-02 20:19:41 +00:00
2025-04-02 23:39:17 +02:00

Role Name

role-common-send_only_mta

Description

Configure Postfix on Debian as a send-only Mail Transfer Agent.

Requirements

Your target machines must be Debian.

Role Variables

Per defaults/main.yml this role expects both a recipient e-mail address and login credentials for an SMTP mail submission server to be available in a HashiCorp Vault instance. Feel free to override these variables as needed with host or group vars. If you stick with HashiCorp Vault the default path for SMTP credentials is settings/comms/e-mail/default/sender, the default path for a recipient address is settings/comms/e-mail/default/recipient.

Sender data

  • addr-spec: Your sender e-mail address rendered as an RFC 2822 addr-spec string such as noreply@example.com.
  • credentials-password-sasl-smtp-auth-login: A password that Postfix will use to log in to the SMTP mail submission server via the AUTH LOGIN SMTP SASL authentication mechanism.
  • credentials-username: The SMTP username needed to log in to the SMTP mail submission server.
  • submission-server-fqdn: Your upstream SMTP mail submission server's fully qualified domain name such as smtp.example.com.
  • submission-server-port: The TCP port you want Postfix to use to connect to the SMTP mail submission server.

Recipient data

  • addr-spec: Same as above, a recipient e-mail address rendered as an RFC 2822 addr-spec string such as noreply@example.com.

Dependencies

None.

Example Playbook

In your playbook.yml call it like so:

- name: 'Awesome playbook'
  hosts: all
  roles:
    - 'role-common-send_only_mta'

License

MIT

Description
Configure Postfix on Debian as a send-only Mail Transfer Agent
Readme MIT 35 KiB
Languages
Jinja 100%