Skip to content

Ansible role fo set up Postfix with AWS SES service.

License

Notifications You must be signed in to change notification settings

AcroMedia/ansible-postfix-aws

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ansible-postfix-aws

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.

Requirements

Currently, the role only supports CentOS , Red Hat Enterprise Linux (RHEL) EL7, and Ubuntu 18.04 LTS 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.

Role Variables

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 pattern represents a regular expression that matches the original sender address and address represents the sender address with which to replace the original one. For more information, see Postfix's postconf.5 manual page. The comment represent an optional text to put as a comment in the /etc/postfix/sender_canonical file.

no

pattern: "/.+/"
address: "{{ postfix_aws_default_from_email }}"
comment: Map all sender addresses to the default From email address

Dependencies

No dependencies.

Example Playbook

To use this role add this to your playbook:

- hosts: servers
  become: true
  roles:
     - { role: dblenkus.postfix-aws }

License

Licensed under the GPLv3 License. See the COPYING file for details.

Author Information

Domen Blenkuš
Tadej Janež

About

Ansible role fo set up Postfix with AWS SES service.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 100.0%