18

I'm new to Amazon Web Services (AWS) and AWS Simple Email Service (SES).

Does AWS SES allow an app to receive emails? I could not find a reference in SES developer guide.

My app requires that received emails for a customer be identified per customer and eventually they will be stored on a database (programatically). Every customer will have an email on the domain hosting the app.

For example say the app is hosted on www.example.com on AWS. Then customers of this myapp can have emails like: john@example.com, barry@example.com, lisa@example.com like that.

If this is not possible in AWS SES, please suggest on alternatives (for high volume emailing) on how this can be done in AWS environment?

  • Wait. Are you talking about sending or receiving? – mailq Dec 7 '11 at 0:02
9

Amazon's SES is strictly for sending email. If you want to receive email you'd have to setup a mail transport agent (MTA) like Sendmail, Postfix, Qmail, etc on an EC2 server instance and point your DNS MX records to that instance. In which case you'd also likely need to utilize an Elastic IP (EIP) so you have a static IP. Not to mention you might end up with finding the IP address range blocked potentially by certain DNSBLs.

I tend to refrain from receiving email within AWS and have receiving mail servers outside on either dedicated co-located servers or VPSes as they tend to be cheaper and less encumbered.

  • 22
    This is no longer true. Amazon SES's new update comes with the addition of receipt rules, which enable you to store emails in a variety of different ways. – Elegant.Scripting Oct 2 '15 at 1:08
  • 1
    It is still true, aws.amazon.com/ses (read the first two lines), although SES has the capability to receive the email using receipt rules, it could not be designated as the traditional or personal mailbox. – Adnan May 5 '18 at 6:11
41

Today is your big day! AWS SES now launched Email receiving: https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html

You note, that is not designed to use as personal mailbox. Current setting create perfect platform for automated receiving e-mails. Perfect for automated process of any generated reports (like a bank messages, DMARC reports, electronic invoices, etc.)

For example, here is message as was saved to S3: https://s3-eu-west-1.amazonaws.com/s3.jakub-boucek.cz/temp/lts0ahe3tucqpoii4ji0g0u3u08nrpuk1g0p3bo1 and this is output of notification delivered to my https endpoint: http://pastebin.com/yR3RjjkE

  • 1
    Excellent find, Jakub. I hadn't yet seen the announcement about this yet. – EEAA Sep 28 '15 at 22:28
  • 1
    I found it complex to setup SES. Has anyone identified a simplistic tutorial? Can Gmail be configured as a client to the service? – blong Oct 4 '16 at 17:38
  • Hi @blong yes, SES is very complex. Is unable to make Gmail (or another provider) make as "client" for this. This is not classic inbox, SES is machine processor for inbound mails. Your can use SES for redirect mails to Gmail. But it is not simple too. Look to AWS Lambda SES Email Forwarder project. – JakubBoucek Oct 18 '16 at 8:54
  • Hi @JakubBoucek , thanks for replying to my questions. It looks like I'll need to find another approach. Here's something I may consider: simplyian.com/2015/01/07/… – blong Oct 18 '16 at 13:16
  • 1
    @limasxgoesto0 Use any MIME parser, like an: github.com/nodemailer/mailparser – JakubBoucek Jun 22 '17 at 8:59
3

Update: After I posted this answer Amazon added support for receiving email through SES. It's designed for automated processing and not usable as a typical IMAP mailbox. See https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html for details.

Outdated:

Amazon SES is only for sending email.

(Source: http://aws.amazon.com/ses/)

Amazon Simple Email Service (Amazon SES) is a highly scalable and cost-effective bulk and transactional email-sending service for businesses and developers.

Receiving email is not that hard. Definitely easier than sending email, with all its anti-spam hurdles. How about setting up a Postfix server with virtual users? What kind of volume are you thinking about?

  • 2
    If you downvoted, I would appreciate a comment about the reason. At the time this answer was written (4 years ago) it was certainly not wrong. – Martijn Heemels Dec 17 '15 at 0:42
  • ...you're right, the answer was not wrong at the time it was posted. But today, the information is incorrect. So a down vote is not about you, it's about the information. You might consider an edit or an update with correct info. (just a suggestion) – agentv Jan 9 '18 at 8:28
2

Amazon SES is only for sending and it never receives mail (just bounces).

You need to verify the sender's mail address to be valid. What email address this will be is up to you. You can have Freemail-Accounts, an account on your mail server on EC2, an account on your mail server in your company or whatever email account you own. But it must be yours.

0

The best approach I have found is to install 'dovecot' mail server locally. Tune it to listen on 127.0.0.1 and Maildir:

listen = 127.0.0.1
# mail_location = mbox:~/mail:INBOX=/var/mail/%u # Comment this and add next:
mail_location = maildir:~/Maildir

Then install s3fs

sudo apt install s3fs
sudo echo "s3fs#mailbox-konkove /home/kes/Maildir/new fuse _netdev,allow_other,profile=mail,uid=1000,gid=1000,use_cache=/tmp/S3,defaults,noatime,endpoint=eu-west-1 0 0" >> /etc/fstab

configure AWS CLI

And configure your mail client to get mails from ~/Maildir via IMAP protocol

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.