[//]: # (SPDX-License-Identifier: MIT)
# 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](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](https://datatracker.ietf.org/doc/html/rfc2822#section-3.4.1) `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](https://datatracker.ietf.org/doc/html/rfc2822#section-3.4.1) `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