How can add/verify dynamically domains and email addresses to amazon SES? - amazon-web-services

I used a service for mailing my users and that service uses amazon SES to send emails.
When I signed up and did setup a sender agent, that service just required two things:
company name which I typed "cmpny".
agent name which I selected from a predefined list, I chose "joe" .
thus the result was a sender email address joe#cmpny.email-service.com(displayed just bellow the form) and after submit the form I tested the mailing feature and it did work immediately.
I know (by aws docs) that an entity (either domain or email address) needs to be verified before get work therefore that requirement demands a manual operation.
How did this service (in an automatically way) ...
verify cmpny.email-service.com domain in SES ?
verify joe#cmpny.email-service.com address in SES?
thanks in advance.

By using SES, you just need to verify the root domain, in this case email-service.com. Then email-service.com can create any quantity of subdomains they want using Route53 like cmpny.email-service.com and send emails using the created subdomain without any additional check.
Check the AWS docs page about this subject at verify-domains, or the excerpt that explains it below:
If you verify a domain with Amazon SES, you can send from any subdomain of that domain without specifically verifying the subdomain. For example, if you verify example.com, you do not need to verify a.example.com or a.b.example.com. As specified in RFC 1034, each DNS label can have up to 63 characters and the whole domain name must not exceed a total length of 255 characters.

Related

AWS SES Identity "pending verification" for DKIM config

Brand new to AWS & Simple Email Service (SES) and have an app that needs to generate some email using SES. All I'm trying to do is set things up so that my app's service user (called, say, myapp-dev) has Access & Secret Keys that have permission to use SES APIs for generating emails. Furthermore I need these SES-generated emails to be sent from either no-reply#myapp.example.com which is not a valid email address, as well as hello#myapp.example.com which is a valid email address. This is because some SES emails will be alerts/notifications that end users should not respond to, and other emails will be emails that they may very well want/need to reply to.
I've already created a myapp-dev user that has AmazonSESFullAccess permissions.
Not knowing any better, I then went to the SES dashboard and clicked Manage Identities and started creating a new "SES Identity". I'm not sure if I need to do this or not (given my needs) or whether my myapp-dev user is ready to use the SES APIs as-is. Adding this new SES identity, it asked me to enter my domain and gave me the option to generate DKIM configurations for that domain. I read up quickly on DKIM and it sounds like its a way to authenticate that emails did in fact come from my domain, so it sounds like its something I'd like leverage. So I generated DKIM configs and now SES says that my new identity has a status of "pending verification".
Main concern is bolded above: with AmazonSESFullAccess permission, is my myapp-dev user ready to rock n' roll? Or will SES APIs fail/refuse to send emails until my SES identity (for my domain) is "verified"?
What do I actually need to do to change the SES identity from "pending" to "verified"? I did see a note that I needed to modify TXT and CNAME DNS records to configure DKIM with my domain, is that it? Or do I need to do something else?
Thank in advance for any and all clarification!
Found an alternate answer in this thread:
https://forums.aws.amazon.com/thread.jspa?threadID=125362
Here's what might have happened: Some domain name providers will automatically add example.com on to the end of the name/host field. So if you enter _xx.example.com, they'll "silently" change it to _xx.example.com.example.com
This is currently the case with namecheap, as I've painfully learned.....
It turned out this was my issue. Make sure to double check!
You need to wait for dns verification, can take a while.
You also need to take the Sandbox into account and open a ticket to move out from it.
https://docs.aws.amazon.com/ses/latest/DeveloperGuide/request-production-access.html
To help protect our customers from fraud and abuse and to help you
establish your trustworthiness to ISPs and email recipients, we do not
immediately grant unlimited Amazon SES usage to new users. New users
are initially placed in the Amazon SES sandbox. In the sandbox, you
have full access to all Amazon SES email-sending methods and features
so that you can test and evaluate the service; however, the following
restrictions are in effect:
You can only send mail to the Amazon SES mailbox simulator and to
verified email addresses and domains.
You can only send mail from verified email addresses and domains.
You can send a maximum of 200 messages per 24-hour period.
Amazon SES can accept a maximum of one message from your account per
second.

How to receive email for domain registered with Amazon Route53

I registered a domain iqxxxx.io on Route53 which will be hosting web service. A hosted zone is generated automatically after the registration is complete. I created a record set which points to an Elastic Beanstalk environment.
In order to enable HTTPS, I tried to request a SSL certificate via AWS Certificate Manager for domain *.iqxxxx.io. I chose "email validation" which means an email will be sent to the domain owner with following emails:
administrator#iqxxxx.io
admin#iqxxxx.io
hostmaster#iqxxxx.io
webmaster#iqxxxx.io
postmaster#iqxxxx.io
When I registered the domain, my own email address is listed for all "Registrant contact", "Administrative contact", "Technical contact", although only "Registrant contact" is shown as verified.
How am I supposed to get all the verification email that was sent to these iqxxxx.io emails? Is that because Administrative contact and Technical contact have not been verified yet? What do I need to do to get these verified?
You can now configure ACM to validate the cert via DNS, which sounds like it would be a much easier solution.
But if you want to do it via email, you will need to create an MX record for your domain, and point it to the appropriate SES endpoint for incoming email.
Then set up a default rule set, and point it to an SNS topic. You can then set up your actual email, confirm your subscription, and then when you try to use email validation for the domain you should receive the 5 emails that get sent (admin#, hostmaster#, etc)
The email body will be in JSON, but you can pull out the confirmation link easily enough.
Answer
You must have an email from one of these emails,
administrator#iqxxxx.io
admin#iqxxxx.io
hostmaster#iqxxxx.io
webmaster#iqxxxx.io
postmaster#iqxxxx.io
AWS will send most of admin#iqxxxx.ie.

Use Amazon SES and Google GSuite for the same domain

I have a domain that I manage using Amazon Route 53. It contains TXT/MX records of Amazon Simple Email Service, that I use to process incoming email to a certain email address via AWS Lambda. I also need to register the domain to Google Admin, i.e. GSuite so that I may manage my business emails via Google console. How do I achieve this? I tried setting up Google Admin, entered the MX records of Google Mail, but it resulted in failure of AWS SES services.
It isn't possible to split email for a single domain across multiple services like this. When a sender on the Internet resolves your domain's mail exchanger (MX), the answer must contain a set of one or more hostnames for systems that will all behave identically for any given recipient email address.¹
The easy solution is to create a subdomain for your SES mail, for example contact.example.com, and simply use that domain for your SES messages.
If you really need to have all the addresses have exactly the same domain, set up a subdomain for SES as described above, but then configure GSuite to forward messages for the specific addresses that you want to go to SES, such as info#example.com, over to info#contact.example.com.
GSuite will then accept messages for those addresses, rewrite the recipient address, and hand them over to SES.
As a G Suite administrator, you can configure numerous email routing and delivery options to suit your organization. For example, you can route mail to Gmail and an external server. Or, you might need to route incoming mail for non-Gmail users. You can also set up routing policies that vary by organization
https://support.google.com/a/answer/6297084
¹behave identically from the sender's perspective. How they may handle the message internally is implementation specific, but for any given email address, all of the listed mail exchangers must accept or reject it, because an authoritative response of "No Such User" from any one of these systems will not trigger the sending system to try any of the others.

Changing MAIL FROM Domain in Amazon AWS SES

I'm using a marketing email application called Mautic to use AWS SES to send emails. I'm receiving the emails successfully but they're all from the domain amazonses.com. I followed the AWS SES documentation to verify ownership of my domain, I enabled SPF and DKIM successfully, and I put the proper MX records into my GoDaddy DNS. Everything is 'verified' in the AWS Console, but I'm not sure how to get it to use the "MAIL FROM" domain I've setup. Mautic has no settings with respect to the "MAIL FROM" domain so I'm pretty sure I'm just missing the last step on the SES in order to get it to actually use the 'from' domain I've setup.
Please let me know if I can provide any more details that might be helpful. Thanks for your time in advance!
I had the same issue, but it was because I had verified my email address before I set up the MAIL FROM domain. In this case, if you look at the details for the verified email address, you will see the MAIL FROM domain set to amazonses.com. It appears that SES uses this value when sending from this email regardless of the MAIL FROM domain setting.
Since my domain is verified, my solution was to simply delete the verified email. Now when I send emails, it uses the domain default which is my MAIL FROM domain setting.
If you are using verified email addresses, check that it shows the MAIL FROM domain that you want to use in the details.
Ah, I figured it out. In Step 8 of this document it says "You can now use Amazon SES to send email that is signed using a DKIM signature from any valid address in the verified domain." I didn't realize I had to have a verified email from this domain under the "Email Addresses" section of the SES console. I created an email address in my domain, verified it using SES, and now my application can use SES to send email on behalf of my own domain!
AWS also has a Custom Mail From domain setup option. Here is the doc:
http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from.html
Follow the directions very carefully and don't forget you need an SPF record for the new subdomain you create for the Mail From - otherwise SES won't pass it in the header.

AWS SES handle doesn't exist mailbox with Lambda

I try to use AWS SES for handle some app data on get email.
I've verified mydomain.com with AWS SES. I want handle dynamic email to addresses 1#mydomain.com 2#mydoamin.com, where 1,2 id from database.
I want handle it with AWS lambda, but I can not do it because I get:
550 5.1.1 Requested action not taken: mailbox unavailable
Is there any way to bypass the creation of mailboxes?
How can I change to email address via SES, for send all emails to one pre existed mailbox?
Make sure your MX records are correctly setup and propagated.
To check, navigate to your domain's Hosted zone in Route 53, and you should have the MX records like:
10 inbound-smtp.us-east-1.amazonaws.com
20 inbound-smtp.eu-west-1.amazonaws.com
30 inbound-smtp.us-west-2.amazonaws.com
See also: Amazon WorkMail account failing to receive email
First of all, you need to make sure you have your email domain verified under Identity Management - Domains in AWS Console.
After that, you have to verify your RuleSet is active. This means under Email Receiving - Rule Sets - View Active Rule Set you have to see your rule using the defined domain.
In your particular case:
Verify domain mydoamin.com
Check if the Active Rule Set really contains the SES rules for 1#mydoamin.com and .2#mydoamin.com
The error
550 5.1.1 Requested action not taken: mailbox unavailable
is not an AWS Lambda or AWS SES issue. It is an issue on the receiving end of the email. The problem is that there is no one on the receiving end of 1#mydomain.com to receive the email.
Lambda and SES cannot avoid the issue. To handle the issue, you must resolve it on the receiving end by:
creating an inbox, or
setting up aliases, or
wild-card the emails to a default inbox
The technical steps to accomplish this will depend on your receiving-end mail server.
I ran into this problem while setting up email forwarding from one address to another, and ultimately realised that when the SES rule set instructions asked for a 'recipient' email address, it was not the address I was forwarding emails to, but actually the initial email address that was receiving the email.
I was getting same error.
My problem was RuleSets.
SES>Email receiving>Rules Sets.
There should be rules here that allows your mail ID or any mail to your domain.
Encountered the same problem. While my domain was verified with SES I needed to create an SES identity. After creating the identity everything on https://aws.amazon.com/premiumsupport/knowledge-center/ses-receive-inbound-emails/ worked as expected.