v 14.0 Third Party
Lines of code 198
Technical Name aws_ses_gateway
LicenseOPL-1
Websitehttps://clouden.net/products/clouden-aws-ses-gateway-for-odoo
You bought this module and need support? Click here!
Lines of code 198
Technical Name aws_ses_gateway
LicenseOPL-1
Websitehttps://clouden.net/products/clouden-aws-ses-gateway-for-odoo

Clouden AWS SES Gateway

Incoming Amazon AWS SES email support for Odoo

Clouden AWS SES Gateway connects Odoo to Amazon AWS SES (Simple Email Service).

Clouden AWS SES Gateway icon

Overview

This Odoo add-on fetches incoming mail that was received by AWS SES and delivered to an S3 bucket using a rule set. Received mail is delivered to Odoo in the same way as when using built-in IMAP/POP support.

Key features

  • Fetch incoming mail from AWS SES / S3 to Odoo
  • Configure AWS access key and region or use default authentication (EC2 instance role)
  • Supports multiple configurations (buckets and optional key prefixes)
  • Cron job fetches new mail every 5 minutes
Clouden AWS SES Gateway illustration

Installation

  • Install the add-on to your Odoo
  • Ensure you have the Python boto3 package installed
  • Configure AWS SES with delivery to S3
  • Configure the add-on with AWS credentials

See doc/index.rst for more details on installation.

Installation of Clouden Odoo AWS SES Gateway

Overview

This guide describes how to configure the Clouden Odoo AWS SES Gateway to receive email from AWS SES to Odoo. The gateway is used only for receiving email. If you also want to send email through AWS SES, you can separately configure an Outgoing Mail Server according to Odoo instructions.

Note that Clouden Odoo AWS SES Gateway uses a scheduled cron job to automatically poll AWS S3 for new email messages every 5 minutes. You can also click "Fetch Now" in the AWS SES Configuration view to immediately fetch new messages.

If you already know how to configure AWS SES Email Receipt Rules and how to configure AWS credentials, you don't have to follow this guide exactly. Make sure to complete these requirements:

  • AWS SES is receiving emails into an S3 bucket.
  • Odoo has either role based access (e.g. EC2 Instance Role) you've created IAM User credentials.
  • The IAM role or IAM user has access to the S3 bucket (see example policy below)
  • Clouden Odoo AWS SES Gateway add-on is installed on the Odoo server.
  • You've created an AWS SES Gateway Configuration in Odoo settings.

The rest of this document guides you in more detail how to configure these requirements.

Step 1: Open the AWS console

  1. Sign in to AWS Console or create a new AWS account if you don't already have one.
  2. Navigate to the AWS Console in your web browser: https://console.aws.amazon.com.
  3. Make sure you've selected your preferred Region (e.g. Ireland / eu-west-1) in the console.

Step 2: Configure AWS SES

  1. Navigate to AWS SES in AWS Console by typing "ses" in the search and selecting Amazon Simple Email Service.
  2. Ensure you have a verified identity (domain or email address). See Amazon SES for more instructions.

Step 3: Configure AWS SES Receipt Rule

  1. Select "Configuration / Email receiving" in the left Amazon SES menu.
  2. Select an existing rule set (e.g. default-rule-set) or create a new rule set.
  3. Under "All receipt rules", create a new rule.
  4. Enter a unique rule name and leve other settings at their defaults.
  5. Add a Recipient condition to match your domain or email address (see the Guidelines for further info).
  6. Add an Action to Deliver to S3 bucket.
  7. Select an existing bucket or "Create S3 bucket" and enter a bucket name to store your email in.
  8. If you plan to store email for multiple recipients in the bucket, enter a unique Object key prefix (otherwise leave it empty).
  9. Leave other options at their defaults, review the rule settings, and confirm with "Create rule".

Step 4: Configure role based access for Odoo or create an AWS IAM User

If your Odoo server already has role based access to AWS (e.g. using an EC2 Instance Role):

  1. Navigate to IAM in the AWS Console (type "iam" in the search bar and select IAM).
  2. Select "Roles" in the left menu and find the role. Click the role name to open it.
  3. Under Permissions, select "Add Permissions" / "Create inline policy".
  4. Under the JSON tab, enter the JSON policy shown below.
  5. Select "Review policy", enter a name for the policy, and select "Create policy".

If your Odoo server does NOT have role based access, create a new AWS IAM User and credentials:

  1. Navigate to IAM in the AWS Console (type "iam" in the search bar and select IAM).
  2. Select "Users" in the left menu and select "Add users" to create a new user.
  3. Enter a user name for the new user account.
  4. Select "Access key - Programmatic access" as the credential type, leave "Password" disabled.
  5. Without adding the user to a group, select "Next: Tags", and then "Next: Review" to move on.
  6. Select "Create user" to create the user. It will have no permissions at this point.
  7. Copy the Access key ID and the Secret access key somewhere. You will need them later. Select "Close".
  8. Select the new user you just created in the IAM user list.
  9. Under Permissions, select "Add inline policy".
  10. Under the JSON tab, enter JSON the policy shown below.
  11. Select "Review policy", enter a name for the policy, and select "Create policy".

This is the inline JSON policy to create in both cases. Replace YOUR-BUCKET-NAME with the bucket you created earlier.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": "s3:ListBucket",
            "Resource": "arn:aws:s3:::YOUR-BUCKET-NAME",
            "Effect": "Allow"
        },
        {
            "Action": [
                "s3:GetObject",
                "s3:DeleteObject"
            ],
            "Resource": "arn:aws:s3:::YOUR-BUCKET-NAME/*",
            "Effect": "Allow"
        }
    ]
}

Step 5: Configure the Odoo Add-on

  1. Install the "aws_ses_gateway" add-on to your Odoo server in the usual fashion.
  2. Ensure that the Python modules in requirements.txt are installed.
  3. If necessary, restart your Odoo server and sign in.
  4. Navigate to Odoo main menu / Apps, find "Clouden AWS SES Gateway" and select Install to install it.
  5. Navigate to Odoo main menu / Settings / General Settings / Discuss.
  6. Configure your Alias Domain (see Odoo documentation for more information).

Step 6: Configure the AWS SES Gateway Add-on

  1. Still under Discuss, Select "AWS SES Gateway Configurations", and select "Create" to add a new configuration.
  2. Enter a Name for the new configuration.
  3. Enter the Bucket Name that you used to configure a SES Receipt Rule.
  4. Enter the Key Prefix that you used to configure a SES Receipt Rule (or leave empty if none).
  5. If you created an IAM User earlier, enter the Access Key Id of its credentials.
  6. If you created an IAM User earlier, enter the Secret Access Key of its credentials.
  7. Enter the AWS region name you're using (e.g. "eu-west-1") or leave empty to use the default region.
  8. Select "Test Connection" to verify that the configuration works. If there are problems, check each setting again.
  9. Select "Save" to confirm creating the new configuration.

See also

Add-on home page: https://clouden.net/products/clouden-aws-ses-gateway-for-odoo

Odoo Proprietary License v1.0
This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).
You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).
It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.
The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.