Step-by-Step Tutorial: Configuring WHM to Send Emails via AWS SES

You are currently viewing Step-by-Step Tutorial: Configuring WHM to Send Emails via AWS SES

Welcome to our detailed guide on integrating WHM with AWS Simple Email Service (SES)! This post is designed to take you step-by-step through the process of configuring your WebHost Manager (WHM) to send emails using Amazon’s powerful and highly scalable email platform, AWS SES. AWS SES is renowned for its high deliverability and ability to scale with your needs, making it an excellent choice for managing your email communications. By integrating WHM with AWS SES, you can leverage the strengths of both platforms to ensure smooth and effective email communication.

Prerequisites

To make the most of this tutorial, it will be helpful if you have:

  • Basic knowledge of web hosting concepts
  • A working AWS account
  • Administrative access to WHM
  • Familiarity with SMTP (Simple Mail Transfer Protocol) settings
  • Basic understanding of DNS (Domain Name System) records

Don’t worry if you’re not familiar with AWS SES yet. We will go over the basics in the next section. However, we recommend a basic understanding of AWS, WHM, and email protocols to follow the steps more comfortably.

Understanding WHM and AWS SES

Before we delve into the tutorial, it’s important to have a clear understanding of WHM and AWS SES.

WebHost Manager (WHM) is a comprehensive tool used by server administrators and resellers to manage host accounts on a web server. WHM is part of the cPanel product suite and provides the interface that allows administrative access to the back end of cPanel.

On the other hand, Amazon Simple Email Service (AWS SES) is an email platform that provides an easy, cost-effective way for you to send and receive emails using your own email addresses and domains. One of the key strengths of AWS SES is its deliverability – it has mechanisms in place to ensure that your emails reach the recipients’ inboxes and don’t end up in their spam folders.

When you integrate WHM with AWS SES, you’re essentially instructing your WHM to send emails using AWS SES instead of its default mail server. This can improve the deliverability of your emails, plus AWS SES can scale as your needs grow, making it ideal for websites with high email volume.

In the following sections, we will take you through the steps to set up AWS SES, verify your domain, create SMTP credentials, and configure WHM to send emails using AWS SES.

Setting Up an AWS Account and SES

The first step to using AWS SES is setting up an AWS account. Here’s a step-by-step guide to getting you started:

  1. Go to the AWS homepage and click on the “Create an AWS Account” button.
  2. Fill in your email address, password, and AWS account name.
  3. On the next page, provide your contact information.
  4. Next, enter your payment information. AWS requires a credit card for account setup, but many services, including SES, have a free tier.
  5. Verify your identity with a phone number.
  6. Choose a support plan. For most users, the basic (free) plan will suffice.
  7. Once you have created your AWS account, sign in to the AWS Management Console and navigate to the “SES” section.

Verifying Your Domain

In order to send emails from your domain using AWS SES, you’ll need to verify it. Here’s how:

  1. In the AWS SES console, navigate to the “Domains” section and click on “Verify a New Domain”.
  2. Enter the domain you want to send emails from and select the “Generate DKIM Settings” checkbox.
  3. Click “Verify This Domain”. AWS will now provide you with a set of DNS records to add to your domain’s DNS settings. This will include a TXT record for domain verification and CNAME records for DKIM settings.
  4. Add these records to your domain’s DNS settings. Depending on your DNS provider, the process may vary. You may need to wait for DNS propagation, which can take up to 72 hours.
  5. After adding the records, your domain’s status on AWS SES should change to “verified”.

Creating SMTP Credentials

SMTP credentials are necessary for WHM to send emails through AWS SES. To create your SMTP credentials:

  1. In the AWS SES console, navigate to the “SMTP Settings” section and click “Create My SMTP Credentials”.
  2. AWS will suggest an SMTP username, but you can choose your own. Click “Create” to proceed.
  3. AWS will now generate your SMTP credentials. Be sure to save the SMTP username and password, as AWS will not show the password again.
  4. Note down the Server Name and Port numbers listed in the “SMTP Settings”. You’ll need these to configure WHM.

Remember to keep these credentials secure as they provide full access to send emails through your AWS SES account. In the next sections, we’ll discuss how to use these credentials to configure WHM to send emails through AWS SES.

Configuring WHM to Use AWS SES

Now that you have your AWS SES set up and SMTP credentials ready, you can configure your WHM to send emails through AWS SES. Follow these steps:

Log into your WHM account as the root user.

In the left menu, find and click on “Exim Configuration Manager”.

Under the “Basic Editor” tab, navigate to the “Mail” section.

Look for the option called “Smarthost support” and check it.

In the box that appears, enter the following, replacing your-smtp-server-name with the Server Name from your AWS SES SMTP settings and port with the appropriate Port number:

*:your-smtp-server-name:port

Scroll down and click “Save”.

Next, go to the “Advanced Editor” tab. Scroll down to the “AUTH” box in the “Section: AUTH” and add the following line, replacing username and password with your AWS SES SMTP credentials:

your-smtp-server-name:username:password

Scroll down and click “Save”.

Now, your WHM is configured to send emails using AWS SES!

Testing Your Setup

To ensure everything is working correctly, you should test your setup.

  1. From your WHM, create a new email account if you don’t have one already.
  2. Use this account to send an email to another email account to which you have access.
  3. Check the recipient account to see if the email was successfully delivered.

If you see the email in your inbox, congratulations! Your setup is working as expected. If not, check your settings again and make sure you’ve followed all the steps correctly.

Understanding SES Sending Limits and Requesting Limit Increases

By default, AWS SES has a maximum send limit, which is the number of emails you can send in a 24-hour period, and a maximum send rate, which is the number of messages you can send per second. These limits are set to protect AWS from spammers and to help keep the service’s deliverability rates high.

If your usage needs exceed these limits, you can request a sending limit increase. You can do this by opening a new case in the AWS Support Center, explaining your use case and why you need a higher sending limit.

Remember, Amazon is very strict about the use of its SES service for sending spam. Always ensure you’re following best practices for email sending, including getting recipient consent for messages, including a clear unsubscribe link in all emails, and promptly removing addresses that bounce or complain from your mailing list.

Best Practices for Sending Emails via AWS SES

Now that you’ve set up your WHM to send emails through AWS SES, it’s essential to follow a few best practices to ensure your emails are delivered effectively.

  1. Maintain a Good Sender Reputation: Consistently sending high-quality content that your recipients engage with positively will help maintain a good sender reputation.
  2. Handle Bounces and Complaints: Monitor your bounce and complaint rates closely. AWS provides notifications for these events. Make sure to remove any email addresses that generate bounces or complaints promptly.
  3. Monitor Your Sending Activity: Use AWS SES’s deliverability dashboard to monitor your sending activity and to pinpoint any issues that could affect your email sending.
  4. Use a Verified Domain: Always send from a domain that you’ve verified in SES to maintain trust with your recipients.
  5. Implement Email Authentication Protocols: Implement protocols such as DKIM and SPF to help protect your emails from being marked as spam.

Conclusion

In this tutorial, we’ve walked you through the process of configuring WHM to send emails using AWS SES. With this setup, you can leverage AWS SES’s scalability, reliability, and deliverability to handle your email communications effectively. Remember to adhere to best practices and monitor your email-sending activities to ensure the best possible email delivery and to maintain a positive sender reputation.

FAQs

Q: Why is my domain still not verified on AWS SES? A: Domain verification on AWS SES can take up to 72 hours due to DNS propagation. Make sure you have correctly entered the provided DNS records in your domain’s DNS settings. If the issue persists, check with your domain registrar.

Q: I followed all the steps but my emails are still not being sent through AWS SES, What should I do? A: Check your WHM and AWS SES configurations, particularly the SMTP settings. Also, make sure you’re not exceeding your AWS SES sending limits.

Q: What if I exceed my AWS SES sending limits? A: If you anticipate needing to send more emails than allowed by your current AWS SES limits, you can request a limit increase through the AWS Support Center.

Q: Can I use AWS SES to receive emails as well? A: Yes, AWS SES can also receive emails. However, setting it up involves a different process from sending emails.

Remember, if you have any further questions, AWS has an extensive library of documentation and a community of developers who can help you navigate any issues. Happy emailing!

Atiqur Rahman

I am MD. Atiqur Rahman graduated from BUET and is an AWS-certified solutions architect. I have successfully achieved 6 certifications from AWS including Cloud Practitioner, Solutions Architect, SysOps Administrator, and Developer Associate. I have more than 8 years of working experience as a DevOps engineer designing complex SAAS applications.

Leave a Reply