I'm just looking into Amazons Web Services and I've used Elastic Beanstalk to set up a Ruby web app. It all works great but with one big exception. I cannot have user email accounts for the domain and cannot have incoming emails.
Is there a technical reason why this is the case (no incoming mail service), or am I missing something? I'm reading a lot about using Gmail or installing postfix manually, are these the only options, and if so why?
Amazon offers this service now, it's called WorkMail: https://aws.amazon.com/workmail/
You can have user emails on the domain in one of two ways. If you want to keep it at aws, spinup an ec2 instance and run the mail server of your choice, or else just use a third party mail host/provider (like gmail, or rackspace email which I use) and just point your mx records to those external mail servers.
I also wish that AWS offered mail hosting (and domain registrations), but its not hard to just parcel out the small pieces of your solution.
You can use ses nowadays for inbound programmatic email, and read it from a sqs queue, this is advisable for higher then normal mailbox usage profiles.
Else soon you can use WorkMail's new imap service which was announced beta preview at 2016 re:invent.
Related
With regard to this question in which I was using a barebones method to find the mail provider of a particular user, since I was using Amazon SES to send mails, but, am also quite new to it, I was wondering if Amazon SES provides a way to do so? Does Amazon SES give a way(api/service etc) to find the mail provider of the user that I'm sending email to?
Your question is a little vague in exactly what outcome you are trying to achieve with this data.
I am unsure if you are familiar with how mail delivery works on the Internet. My apologies if this is not news to you. At a basic level, email is simply ferried from machine to machine (SMTP server to SMTP server) until it find 'the' server that eventually your mailbox resides on. (This is a relatively gross oversimplification in modern times, but still true).
The first step is you get the message to a SMTP server with instructions to deliver the message, typically with a destination email address. Now, if you are using AWS SES APIs, there is the additional step that before it gets to the initial SMTP server, you first exercise the SES API which in turn ferries that message to Amazon's SMTP servers.
Now, the first SMTP server needs to know where to send it to. This is typically done by executing a DNS query on the destination domain and looking up the MX record. (More information on MX Records here). The MX record will contain an entry (or list of entries) which tell other SMTP servers how to contact that SMTP server for the domain. This is likely where your question is getting at - somehow identifying which 'provider' is in use. In current times, it is very common a large managed service provider like office 365 or similar runs that service for a domain. This is usually programmed into the client's MX record, which is the 'giveaway' that they are using O365 or whatever. However, plenty of domains run their 'own' servers and there is no technical reason preventing such. (Small lie: Since the beginning of time SPAM has been there and the 'reputation' of sending SMTP servers has been quite important in deterring SPAM, or at least was at some point in time. This is one of the reasons that AWS is so picky on you not sending unsolicited emails - it would count against the reputation of their SES SMTP servers sending it and they need it to be 'good' so they don't wind up on block lists at the Amazon level)
Here is the next complication and likely why even if an initial lookup was performed, the data cannot be guaranteed to give you what you want. Since the SMTP service is inherently hop-to-hop, there is nothing stopping the MX record at the DNS domain from merely being a proxy to another set of SMTP servers. Remember, that SMTP is one of the oldest protocols there is on the Internet and its simplicity is what made it functional before all of the infrastructure we have in place today. A SMTP server takes commands from users (or other SMTP servers) and then does its part to pass the message on closer to the actual user.
I am unsure if your end functionality would somehow modify the message sent based on the destination, or if perhaps it wouldn't send at all. Both are not supported by the AWS SES APIs (link). (BTW, it would have to be at the AWS SES APIs that did this, since this functionality simply isn't in the vocabulary of SMTP). You can look at the AWS SES API reference for what it can do, and what it can offer, but if modifying the message before delivery based on provider is what you want there is no current function in that.
Links:
https://en.wikipedia.org/wiki/MX_record
https://docs.aws.amazon.com/ses/latest/APIReference/Welcome.html
No, SES does not provide such functionality.
I have an issue with AWS SES that it does not support inbound emails for ap-southeast (Sydney) region, therefore I'm unable to use WorkMail nor their solution using S3 + SNS + Lambda. Is there any a way that I can use different email hosting from different provider without deleting my MX and TXT records within Route53, something like redirect? If there is which email hosting provider that can support this which then I can use client email MS Outlook? Thank you.
I found my own solution as below:
I chose the email hosting service from Zoho (free version as there is only me, you can upgrade to paid version any time, its quite cheap though.)
I then setup the MX and TXT (including SPF and DKIM) records by using the ones provided by Zoho and added to Route53. Remember you have to delete the existing MX as well as TXT records if there is any.
Once I've done the first 2 steps, I could setup my own email accounts such as support#mydomain.com, sales#mydomain.com, etc within the Zoho Control Panel.
Now I can check incoming emails for those custom email accounts using Zoho web email portal or Zoho Android app. Note: with free version, Zoho does not allow IMAP or POP access which means you can't sync emails into email clients such as MS Outlook, however this is already good for me.
I want to host my app on an VPS/VPC and am currently leaning towards the AWS EC2 server. I'm looking at the console right now and I see a bunch of services offered like CloudSearch(managed search service) and SES(email sending service).
Considering the fact that I have already written code to do these things (at least for the search) that works locally, do I/should I still utilize these services? If so, why and how?
You do not need to use these services. But there are limits on sending emails from EC2 instances. (http://aws.amazon.com/ec2/faqs/#general , search for Are there any limitations in sending email from EC2 instances?).
If you intent to send huge amount of emails then you want to use SES.
For creating webhosting in EC2 instance you can use Easyengine, refer the below link for it:
http://docs.rtcamp.com/easyengine/install/aws.html
If you intend to send emails from your website you can either use Amazon SES or also any other mailing service.
For sending e-mail using Amazon SES follow the below steps:
Step 1) Verify the email address from which you need to send emails.
Step 2) Use the credentials which you get from step1 in your web application to send email to your user.
How do I setup new email addresses if I am hosting my static website on Amazon s3? I want something like info#mydomain.com and contact#mydomain.com.
I know there is that SES service, but that is more for sending out emails.
I can try using GoogleApps but I thought there should be a way to do it on Amazon since every other hosting service provides that service.
I guess setting up your own Mail Server to Receive mails would be a big task for you. I would suggest to look for options like
Office 365 - Exchange Online - works at $4 / user / month
Google Apps - works at $5 / user / month
Setting up and configuring those server is straight forward; you would need take care in the DNS Zone File configuration. If you are choosing Office 365 and your DNS provided is GoDaddy, they do all settings for you. There would be similar things for Google Apps as well, if not there is very good Tech. Support to assisting you.
PS : For sending mails alone you can simply use SES
I am confused with sending emails on Ec2.
i want to know why would we need SES if we can send emails using sendmail like we normally use in VPS servers.
Whats the benefit of that. Am i missing something
There isn't much difference if you are sending only few emails. But if you are sending many emails daily like user notifications, promotion etc then amazon doesn't like then being send from EC2.
Bulk emailing might get ec2 ip ranges blacklisted I guess, so when you send bulk emails from EC2, AWS will issue a notice. I have seen that when I had some configuration issue with my script and send a few hundred email in a very short period.
Amazon provides a way to remove these limitation on EC2 by submitting a request through the link given below
https://portal.aws.amazon.com/gp/aws/html-forms-controller/contactus/ec2-email-limit-rdns-request
You might have to setup elasticips for the EC2 instances, DKIM signing mechanism, SPF record, antispam, TLS etc.
Sending email using AWS SES apis are very easy (atleast from my point of view) compared to the above config and if you are a EC2 user then SES is available free of charge.