https://fonts.googleapis.com/css?family=Raleway

"Complex Problems, Solved Quickly"

RCH Tech Solutions
  • Home
  • About
    • Services
  • Products
    • Visitor Logic Pro
    • Engage Theme For WordPress
    • WishList Member Upsell WordPress Plugin
  • Portfolio
  • Articles
    • Apache
    • Subversion
    • PHP
    • jQuery
    • WordPress Solutions
    • Exim
  • Members Dashboard
    • License Details
    • Support
Main Menu
  • Home
  • About
    • Services
  • Products
    • Visitor Logic Pro
    • Engage Theme For WordPress
    • WishList Member Upsell WordPress Plugin
  • Portfolio
  • Articles
    • Apache
    • Subversion
    • PHP
    • jQuery
    • WordPress Solutions
    • Exim
  • Members Dashboard
    • License Details
    • Support
  • License Details
  • Support

Post navigation

Exim |

July 24, 2014

| by Rodger Hollingsworth

WHM Exim Configuration send mail with Amazon SES

Problem:   You use the email system on your WHM / CPanel server to send emails,  but you do not have the time or resources to ensure your server is configured properly for all the different email systems out there.  Reverse DNS, SPF, DKIM etc.  so your server winds up on the blacklist for hotmail, live, yahoo maybe even gmail.  

If you have the time to learn and configure all these all the different pieces of the puzzle so that your server can send emails reliably, and to maintain those settings as the different email providers tighten their criteria, then great.  You should offer that as a service.

I personally do not have the extra time to do it.   

So what is your option.

Use a Third party service,  Like Amazon SES to relay the mails for you.

If you use Exim (default mail system on WHM servers) and have root access to the server.  then Amazon has documented how to setup SES as your relay server. http://docs.aws.amazon.com/ses/latest/DeveloperGuide/exim.html

The instructions are straight forward and work except for one piece.  If you setup email forwarders, they will not work.   Exim will use the SES server when forwarding emails, and the original sender of the email is most likely not on the approved senders list.

How I finally figured out how to get forwarders to work (not use SES) but route all other mail through SES.

 From the Amazon documentation:  you need to modify the router section of the instructions slightly.

 

send_via_ses:
driver = manualroute
domains = ! +local_domains
transport = ses_smtp
route_list = * email-smtp.us-east-1.amazonaws.com;

Modify the above section to read like this:

send_via_ses:
driver = manualroute
domains = !+local_domains
condition = ${if !eqi{$local_part@$domain}{EMAIL_ADDRESS1}}
condition = ${if !eqi{$local_part@$domain}{EMAIL_ADDRESS2}}
transport = ses_smtp
route_list = * email-smtp.us-east-1.amazonaws.com

Notice the 2 new lines that start with “condition”.  Just replace the EMAIL_ADDRESS1 and EMAIL_ADDRESS2 with valid email addresses that your system forwards mail to.

I tried other Exim conditions, and I could not get them to work properly.  But this simple approach works like a charm.

It is not dynamic,  so if you add forwarders to new addresses, it will not automatically add them,  you would need to copy one of the condition lines and change the email address.

If I get a chance, I am sure there is a way to make this read the list of forwarders that are setup on the server.  but I just needed a quick fix and did not have time to figure out how.

Comment

Post navigation

Older Newer
Google+ comment widget by skipser

Menu

  • Home
  • About
    • Services
  • Products
    • Visitor Logic Pro
    • Engage Theme For WordPress
    • WishList Member Upsell WordPress Plugin
  • Portfolio
  • Articles
    • Apache
    • Subversion
    • PHP
    • jQuery
    • WordPress Solutions
    • Exim
  • Members Dashboard
    • License Details
    • Support

Recent Posts

  • SVN checkout to an existing live folder
  • jQuery Ajax with .html() does not fire js code
  • Installing and setting up Subversion on a WHM/Cpanel server
  • WHM Exim Configuration send mail with Amazon SES
  • WordPress Engage
  • UNIFFI
  • Gung-Ho
  • AthleanX
  • Collier County Fair
  • Simple PHP script to create a nice listing of directories only

Menu

  • Home
  • About
  • Products
  • Services
  • Portfolio
  • Contact Us

Products

Engage Theme For Wordpress

WLM Upsells Wordpress Plugin

Support

footer-logo

© RCH Tech Solutions 2017

Lost your Password

OR