Configure WHM for Postmark SMTP Sending using Exim Configuration Manager
Access Your Exim Configuration Manager in WHM
Log into your WHM account and click Exim Configuration Manager under Service Configuration. You can also search for Exim in the navigation area to pull it up quickly.
Set Your SmartHost to Postmark
You will be placed into the Basic Editor by default. Scroll down until you reach Smarthost Support under the Mail header. Enter smtp.postmarkapp.com:587 like in the screenshot below. Scroll down and click ‘Save’. This will regenerate your Exim configuration file.
Once completed, navigate to the Advanced Editor tab in your Exim Configuration Manager.
Scroll down in the Advanced Editor until you reach the AUTH section. Enter the following, so that it matches the screenshot below. Note, you will want to use your Server API Token from Postmark where it says ‘YourServerAPITokenHere’.
auth_login: driver = plaintext public_name = LOGIN hide client_send = : YourServerAPITokenHere : YourServerAPITokenHere
Scroll further down until you see the PREROUTERS section. Enter the following, so that it matches the screenshot below.
smart_route: driver = manualroute domains = ! +local_domains ignore_target_hosts = 127.0.0.0/8 transport = auth_relay route_list = * smtp.postmarkapp.com no_more
Scroll down to the TRANSPORTSTART section and enter this:
auth_relay: driver = smtp port = 587 hosts_require_auth = $host_address hosts_require_tls = $host_address
$ mail -s "Postmark Test" email@example.com < /dev/null