Emails sent via Amazon SES automatically use a subdomain of amazonses.com as the default MAIL FROM domain. This might not be ideal for branding purposes or if you want more control over email deliverability. Fortunately, SES allows you to configure a custom MAIL FROM domain, also known as the return path. This guide will walk you through the steps of setting up a custom MAIL FROM domain and return path for your Amazon SES.
Configuring your custom MAIL FROM domain:
Amazon SES offers flexibility in configuring a custom MAIL FROM domain. You can choose to set it up for:
- Your entire verified domain or a subdomain: This applies the “custom MAIL FROM address” to all emails sent through SES from that domain or allows you to create a specific subdomain (e.g., “mail”) for your custom MAIL FROM address.
- Individual email addresses/IDs : You can even configure a custom MAIL FROM address for specific verified email addresses within your domain.
The following procedures will give detailed steps on how to use the Amazon SES console to configure a custom MAIL FROM domain based on your chosen approach.
Setting Up a Custom MAIL FROM Domain (Domain or Subdomain):
- Log in to the Amazon SES console (https://console.aws.amazon.com/ses).
- Navigate to the “Email Sending” section and select “Identities.”
- Choose the verified domain you want to use for the custom MAIL FROM address.
- If your domain isn’t verified, follow the steps in the AWS documentation to complete verification.
- Click on “Set MAIL FROM Domain” and enable “Use a custom MAIL FROM domain.”
- Enter your desired subdomain (for subdomain-level configuration) and choose your behaviour on MX failure.
- Use default MAIL FROM domain: If the custom domain’s MX record isn’t set up correctly, Amazon SES will use a subdomain of amazonses.com.
- Reject message: Bounces if the MX record isn’t set up correctly.
- Save changes.
Publishing DNS Records:
The console will display the MX and SPF (TXT) records you need to add to your domain’s DNS configuration. These records are crucial for email authentication and delivery.
- Copy the records and paste them into the corresponding fields in your DNS provider’s control panel.
- Alternatively, download the records as a CSV for future reference.
Important Notes:
- It can take up to 48 hours for DNS changes to propagate globally.
- For successful setup, ensure you publish only one MX record to your custom MAIL FROM domain.
- If you use Amazon Route 53 for DNS management, you can directly publish the records within the SES console.
Setting Up a Custom MAIL FROM Domain for a Verified Email Address
While this approach is less common, you can configure a custom MAIL FROM domain for a specific verified email address within your domain. However, this requires modifying the DNS records associated with the email address’s domain.
Here’s how to configure a custom MAIL FROM domain for a verified email address:
- Access the Amazon SES console: Go to https://console.aws.amazon.com/ses.
- Navigate to Identities: In the left navigation panel, under “Configuration,” select “Identities.”
- Choose the Email Address: From the list, identify the email address you want to configure and ensure its “Identity type” is “Email address” and “Status” is “Verified.”
If not verified, follow the steps in “Verifying an email address identity” within the AWS documentation.
- Enable Custom MAIL FROM Domain:
- Click “Edit” under the “Custom MAIL FROM domain” pane within the “MAIL FROM Domain” tab.
- In the “General details” section, check the box for “Use a custom MAIL FROM domain.”
- Enter your desired subdomain.
- Choose your preferred behavior on MX failure (explained earlier).
- Save changes.
- Publish DNS Records:
- The console will display the MX and SPF (TXT) records you need to add to your domain’s DNS configuration. These are crucial for email authentication.
- You can either:
- Copy and paste these records into the corresponding fields in your DNS provider’s control panel.
- Download the records as a CSV file for future reference.
DNS provider | Procedure |
Route 53 | If same account is used to managed email using Amazon SES and Route 53, then Use Route 53 to automatically update the DNS settings for your domain. Otherwise, we need to complete the procedures shown in Editing Records in the Amazon Route 53 Developer Guide. |
Other DNS providers | Need to check with DNS provider documentation |
Note: To successfully set up a custom MAIL FROM domain with Amazon SES, you must publish exactly one MX record to the DNS server of your MAIL FROM domain. If the MAIL FROM domain has multiple MX records, the custom MAIL FROM setup with Amazon SES will fail.