Clouden AWS SES Gateway
by Clouden Oy https://clouden.net/products/clouden-aws-ses-gateway-for-odoo$ 87.24
Availability |
Odoo Online
Odoo.sh
On Premise
|
Odoo Apps Dependencies |
Discuss (mail)
|
Lines of code | 198 |
Technical Name |
aws_ses_gateway |
License | OPL-1 |
Website | https://clouden.net/products/clouden-aws-ses-gateway-for-odoo |
Availability |
Odoo Online
Odoo.sh
On Premise
|
Odoo Apps Dependencies |
Discuss (mail)
|
Lines of code | 198 |
Technical Name |
aws_ses_gateway |
License | OPL-1 |
Website | https://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).
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
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
- Sign in to AWS Console or create a new AWS account if you don't already have one.
- Navigate to the AWS Console in your web browser: https://console.aws.amazon.com.
- Make sure you've selected your preferred Region (e.g. Ireland / eu-west-1) in the console.
Step 2: Configure AWS SES
- Navigate to AWS SES in AWS Console by typing "ses" in the search and selecting Amazon Simple Email Service.
- Ensure you have a verified identity (domain or email address). See Amazon SES for more instructions.
Step 3: Configure AWS SES Receipt Rule
- Select "Configuration / Email receiving" in the left Amazon SES menu.
- Select an existing rule set (e.g. default-rule-set) or create a new rule set.
- Under "All receipt rules", create a new rule.
- Enter a unique rule name and leve other settings at their defaults.
- Add a Recipient condition to match your domain or email address (see the Guidelines for further info).
- Add an Action to Deliver to S3 bucket.
- Select an existing bucket or "Create S3 bucket" and enter a bucket name to store your email in.
- If you plan to store email for multiple recipients in the bucket, enter a unique Object key prefix (otherwise leave it empty).
- 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):
- Navigate to IAM in the AWS Console (type "iam" in the search bar and select IAM).
- Select "Roles" in the left menu and find the role. Click the role name to open it.
- Under Permissions, select "Add Permissions" / "Create inline policy".
- Under the JSON tab, enter the JSON policy shown below.
- 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:
- Navigate to IAM in the AWS Console (type "iam" in the search bar and select IAM).
- Select "Users" in the left menu and select "Add users" to create a new user.
- Enter a user name for the new user account.
- Select "Access key - Programmatic access" as the credential type, leave "Password" disabled.
- Without adding the user to a group, select "Next: Tags", and then "Next: Review" to move on.
- Select "Create user" to create the user. It will have no permissions at this point.
- Copy the Access key ID and the Secret access key somewhere. You will need them later. Select "Close".
- Select the new user you just created in the IAM user list.
- Under Permissions, select "Add inline policy".
- Under the JSON tab, enter JSON the policy shown below.
- 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
- Install the "aws_ses_gateway" add-on to your Odoo server in the usual fashion.
- Ensure that the Python modules in requirements.txt are installed.
- If necessary, restart your Odoo server and sign in.
- Navigate to Odoo main menu / Apps, find "Clouden AWS SES Gateway" and select Install to install it.
- Navigate to Odoo main menu / Settings / General Settings / Discuss.
- Configure your Alias Domain (see Odoo documentation for more information).
Step 6: Configure the AWS SES Gateway Add-on
- Still under Discuss, Select "AWS SES Gateway Configurations", and select "Create" to add a new configuration.
- Enter a Name for the new configuration.
- Enter the Bucket Name that you used to configure a SES Receipt Rule.
- Enter the Key Prefix that you used to configure a SES Receipt Rule (or leave empty if none).
- If you created an IAM User earlier, enter the Access Key Id of its credentials.
- If you created an IAM User earlier, enter the Secret Access Key of its credentials.
- Enter the AWS region name you're using (e.g. "eu-west-1") or leave empty to use the default region.
- Select "Test Connection" to verify that the configuration works. If there are problems, check each setting again.
- 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