Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for Configuring inbound rules on SES
     

Configuring inbound rules on SES

Amazon Simple Email Service (SES) not only addresses the use-case ofoutbound emails to users but also haveinbound emails where you can receive emails from a designated recipient.

To get started with SES, you can refer to my recent post.

Key takeaways from the blog

Configuring Inbound rule set

From the AWS console, you can navigate to SES (new console UI) and from the navigationRule Sets underEmail Receiving.
New console
You can click on theCreate rule set button to enter a rule set name and create a new rule set.
Create rule set
Once the rule set is created, the console displays the details of the newly createdrule set.
Created rule set

Configuring action rules

For a rule set, we can have multiple recipients with multiple destination actions configured i.e. you can have a rule set thatreceives all the emails from an email recipientreach@zachjonesnoel.com and on receiving the email SES can invoke an Lambda function so that the further processing can be done.
To create the above rule, click theCreate rule button and the console takes you through a 4 step process to create a new rule.

Step 1 : Define rule settings

You can define certain rule settings such as name and to enable/disable the rule and also security settings to enable -

  • Transport Layer Security (TLS) which defines if to accept or drop the incoming email messages if the email aren't sent over a secure connection.
  • Spam and virus scanning which enables scanning the incoming email message with spam check and virus scanning if the email is found to be malicious, the email is dropped.Define rule settings
Step 2 : Add recipient conditions

As mentioned earlier, we can have multiple recipients and this configuration can be done in this step.
Note : The recipient have to belong to the domain owned by the same AWS account i.e the domain has to be verified on SES. To verify your domain, you can refer to the details from myprevious post.
Add recipient conditions

Different types of recipients supported on SES.

Supported typeWildcardExample
All email identities of the verified domains in the AWS account (default)--
Specify email identityuser@verified-domainreach@demo.com
All mails of a domain except sub-domainsverified-domaindemo.com
All mails of a specific sub-domain onlysub-domain.verified-domainmails.demo.com
All mails of a all sub-domains.verified-domain.demo.com
Step 3 : Add actions

For a rule, we can have multiple actions which are configured. The supported types of actions are -

  • Add headerAdd headerWhenever the email is received, it adds a custom header to the email.
  • Bounce responseBounce responseIf the email has to be rejected, this action performs it by bouncing the email.
  • AWS Lambda function invocationAWS Lambda function invocationWhenever the email is received, it can invoke a Lambda function which can do the further processing.
  • Publish to SNS topicPublish to SNS topicThe received email either withbase64 orutf-8 encoding can publish the email the message to a SNS topic and all the subscribers of that topic would receive the email.
  • Upload the email to S3 bucketUpload the email to S3 bucketThe email content can be uploaded into a designated S3 bucket.
  • Integration with Amazon WorkMailIntegration with Amazon WorkMailAmazon WorkMail has integration with SES to receive all the emails and from WorkMail app, you could access the emails.
  • Stop rule setStop rule setThis terminates the SES rule.
Step 4 : Review

You can review the configurations and create the rule.

Pricing

The blog post explains about incoming messages and the pricing fromSES pricing for incoming emails is as explained -

An incoming mail chunk is 256 kilobytes (KB) of incoming data, including headers, message content (text and images), and attachments. When you use Amazon SES to receive email, you pay $0.09 for every 1,000 incoming mail chunks.

Additionally, the action which uses other AWS services costs with it's respective pricing.

Conclusion

SES a managed service from AWS makes it easier for application developers to integrate as per their business logic. The inbound rules helps addressing use-cases which requires receiving emails and processing from the email content.

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Build On!

Would you like to become an AWS Community Builder? Learn more about the program and apply to join when applications are open next.

More fromAWS Community Builders

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp