There are two SMTPs that can be used - Gmail or DynDNS. While Gmail's smtp is free, a copy of the email will be placed under the SENT EMAIL folder once it is processed. This will take up the 2Gb space soon if you have a lot of emails to process. Also, there is no one-click solution to purge emails under SENT EMAIL folder.
So I decided to use DynDNS.com's MailHop Outbound service. It is sold at the block of 150 relays per day @ $15/year. Meaning, you can process 150 mails each day. If you have more, then you have to purchase more blocks. To find out how many emails you have processed under DynDNS, log into your account and view the statistics.
# Select the SMTP to use:
For Gmail:
First, enable POP for your gmail account. You do that in the “Forwarding and POP” section of the settings.
For DynDNS:
Subscribe to the MailHop Outbound service.
# Next, create a domain list. This domain list will hold the list of domains to send via gmail or DynDNS, one domain per line. Save your domain list as /etc/exim/gmail.domains or /etc/exim/dyndns.domains .
# Then, add a domain list to your exim configuration. For WHM/cPanel, go to Exim Configuration Editor >> Advanced Editor and enter this line below the very top box of Exim Configuration Editor:
QUOTE
domainlist use_gmail_domains = /etc/exim/gmail.domains
QUOTE
domainlist use_dyndns_domains = /etc/exim/dyndns.domains
# Seach for the string "begin authenticators". In the box after this string, create an authenticator.
QUOTE
gmail_login:
driver = plaintext
public_name = LOGIN
client_send = : YourGmailUsername@gmail.com : YourGmailPassword
driver = plaintext
public_name = LOGIN
client_send = : YourGmailUsername@gmail.com : YourGmailPassword
QUOTE
dyndns_login:
driver = plaintext
public_name = LOGIN
client_send = : YourDyndnsUsername : YourDyndnsPassword
driver = plaintext
public_name = LOGIN
client_send = : YourDyndnsUsername : YourDyndnsPassword
Note that in a default exim configuration there are usually no authenticators, so don’t forget the begin authenticators statement if this is your first one.
# Under the ROUTER CONFIGURATION box, add a router:
QUOTE
send_via_gmail:
driver = manualroute
domains = +use_gmail_domains
transport = gmail_smtp
route_list = "* smtp.gmail.com byname"
driver = manualroute
domains = +use_gmail_domains
transport = gmail_smtp
route_list = "* smtp.gmail.com byname"
QUOTE
send_via_dyndns:
driver = manualroute
domains = +use_dyndns_domains
transport = dyndns_smtp
route_list = "* outbound.mailhop.org byname"
driver = manualroute
domains = +use_dyndns_domains
transport = dyndns_smtp
route_list = "* outbound.mailhop.org byname"
# Under the TRANSPORTATION CONFIGURATION box, forcing it to use AUTH and TLS (TLS is not required for DynDNS):
QUOTE
gmail_smtp:
driver = smtp
hosts = smtp.gmail.com
hosts_require_auth = smtp.gmail.com
hosts_require_tls = smtp.gmail.com
driver = smtp
hosts = smtp.gmail.com
hosts_require_auth = smtp.gmail.com
hosts_require_tls = smtp.gmail.com
QUOTE
dyndns_smtp:
driver = smtp
hosts = outbound.mailhop.org
hosts_require_auth = outbound.mailhop.org
driver = smtp
hosts = outbound.mailhop.org
hosts_require_auth = outbound.mailhop.org
# Save Exim config and restart Exim.