Tuesday, 28 January 2014

Remote SMTP setup


If you are using cPanel with Exim and want to relay your email through SendGrid, go to Main > Service Configuration > Exim Configuration Editor, click on the Advanced Editor button, and enter the following:

   

begin authenticators

sendgrid_login:
  driver = plaintext
  public_name = LOGIN
  client_send = : username : YourSendGridPassword

Only include “begin authenticators” if it’s not already in the configuration.

Add a route in the Router Configuration Box:

 

send_via_sendgrid:
  driver = manualroute
  domains = ! +local_domains
  transport = sendgrid_smtp
  route_list = "* smtp.sendgrid.net::587 byname"
  host_find_failed = defer
  no_more

Add a transport to the Transport Configuration Box:


sendgrid_smtp:
  driver = smtp
  hosts = smtp.sendgrid.net
  hosts_require_auth = smtp.sendgrid.net
  hosts_require_tls = smtp.sendgrid.net

Once you have completed and saved all changes to Exim’s configuration files, you will need to restart it to activate those changes:

$ /etc/init.d/exim4 restart

No comments:

Post a Comment