In learning Amazon Web Services, I’m trying to do everything I can on the AWS platform. It gives me a chance learn more about AWS, and get hands on exposure to the platform. My first AWS project was to host this blog entirely in AWS. I’ll go into details in another post, but briefly, I set up an EC2 instance with a WordPress AMI, then I set up the domain using Amazon Route 53.
After I figured out Web Hosting in AWS, the question was, how do I set up email hosting in AWS?
The thing I love about AWS, is that everything is manual. You gotta set up everything yourself. This again is great because it gives us a chance to actually UNDERSTAND how things work. It brings together the entire world of IT into one amazing, sophisticated platform.
Email Hosting in AWS
Like hosting your own web server, you can use AWS to host e-mail. And there’s not only one way to do it. The following are some options:
Amazon Simple Email Service (SES)
Manually Set up an e-mail server on a Linux EC2 instance using an email server solution like iRedMail
Get 3rd party dedicated email hosting (Rackspace, Zoho, GSuite, Office 365), and set it up in Amazon Route53, or in Amazon SES.
I’ll discuss using Amazon Workmail here, as that is what I finished setting up today.
I started off with Amazon SES, which stands for “Simple Email Service.’
I thought that would be the correct solution for me, since it says “Simple Email” and it can be simple, except that it’s not quite as simple as you might think, at least for the beginner like myself.
Long story short, it is a little tricky to set up both sending and receiving in SES, for personal use. It’s not impossible, but it requires a bit of reading and learning about about how SES functions.
I did some experimentation, and I still haven’t been completely successful, although now after finishing setting up Workmail, I could probably do it through SES as well.
The easiest and most straightforward option if you want a purely AWS email solution, is to go with Amazon Workmail.
Setting up Workmail was trickier for me, because I was playing around with SES at first, which kind of screwed up my Workmail settings. But after discussion on the AWS developer forums, I learned that an email can be set up very quickly in Workmail, even without having your own domain name. I already host a domain name in AWS using Route53, so I used my own domain name for WorkMail.
- After logging into the AWS console, go to the WorkMail service from the main screen.
- Create a New Organization. choose Quick Setup then enter any Organization Name. The organization should be created in a couple minutes.
- If you have your own domain, click on domains on the left and add your domain.
- Verify your domain on the next screen by entering the DNS records into your DNS hosting provider. I use Amazon Route53, so I just copied the DNS records directly into my Route53.
- The final step is to create an email address. Do this by creating a new WorkMail User. If you set up your own domain in WorkMail, choose that for the email address.
That should be it.
The troubleshooting I had to go through was because I tried to set things up using SES first. I created incoming mail rules that would put all incoming mail into an S3 bucket. So I had an issue with receiving email in WorkMail, even though I was able to send email out. A couple exchanges with the experts on the developer forums guided me out of that issue.
After you have email running smoothly from the WorkMail Web Console, (Below is a pretty little screenshot of how the console looks):
If you’re like me, you would probably would want to configure your desktop email client for your AWS hosted email account. Being a Mac user, I’ve been using Mac Mail. I got fed up with some weird spam email generation that wouldn’t go away, so I switched to a sleeker email client called Spark Mail. I think they won awards for being the best email client for mac. You can of course choose whatever email client you wish, be it, Microsoft Outlook, Mozilla Thunderbird, Mac Mail, or Opera.
When you add an account in whatever client you choose, the AWS documentation provides the necessary IMAP (incoming) & SMTP (outgoing) email settings you need to enter. Make sure you click on that AWS Documentation to get the correct IMAP/SMTP settings for your workmail account.