Ansible role to install Postfix and configure it to send emails through Amazon SES service.
This role follows official Amazone documentation for SES with some modifications to ensure idempotency.
Currently, the role only supports CentOS and Red Hat Enterprise Linux (RHEL) EL7 distribution flavors.
If you need support for other flavors, feel free to submit a pull request.
To use this role, you have to have to have Amazon AWS account (to create it follow the online instructions) and IAM user for SMTP authentication with SES. To create it, follow the online instructions on Obtaining SMTP Credentials. Note that the obtained SMTP user name and password are not the same as IAM user's access key ID and secret access key.
For the role to work properly, the "from" email address has to be verified with SES. If your account is still in sandbox, all "to" emails also have to be verified. For more information, check Amazon's instructions on verifying email addresses.
Name | Type | Description | Mandatory | Default |
---|---|---|---|---|
postfix_aws_ses_host |
string | Hostname of Amazon SES server. | no | email-smtp.eu-west-1.amazonaws.com |
postfix_aws_ses_port |
integer | Port of Amazon SES server. | no | 25 |
postfix_aws_ses_username |
string | Username for SMTP authentication with Amazon SES server. | yes | |
postfix_aws_ses_password |
string | Password for SMTP authentication with Amazon SES server. | yes | |
postfix_aws_default_from_email |
string | Default From email address. | yes | |
postfix_aws_sender_canonical_maps |
list | List of canonical mappings for envelope and header sender addresses of the form: pattern: string
address: string
comment: string where |
no | pattern: "/.+"
address: "{{ postfix_aws_default_from_email }}"
comment: Map all sender addresses to the default From email address |
No dependencies.
To use this role add this to your playbook:
- hosts: servers
become: true
roles:
- { role: genialis.postfix-aws }
Licensed under the GPLv3 License. See the COPYING file for details.