Activities

November 2015
M T W T F S S
« Sep   Jan »
 1
2345678
9101112131415
16171819202122
23242526272829
30  

WHM/Cpanel : Configure SMTP relay server on EXIM

Yesterday one of my friend was called me and asked for a support to fix email sending issue from Godaddy VPS server. As I know Godaddy put very great efforts to keep their ip reputation over the web. So they used to block sending out emails from their network even it for dedicated hosting or shared hosting.

I’m okay if the rescriction put only for shared hosting. But they do even purposefully blocked emails in network level in dedicated hosting network. This was the core issue which my friend is facing. I had tried,

1. To send emails from different users in the same cpanel accounts. But email did not go. –> failed
2. sending email from mail function –> failed
3. Using 3rd party smtp program (sendEmail) to send email — > failed.

Then I login to customer Godaddy account and finding an entry of relay smtp within the VPS account. But I did not see it and so I has to call them. They provided the smtp relay server name (dedrelay.where.secureserver.net –> 208.109.80.210) and I could send emails from command line now. God bless :-) But neither of EXIM mails were not going yet … Sucks!!! :-(

Then I’m concentrate on EXIM config. to set smarthost(relay) server setup. Godaddy Provided a link which is absolutely a nonsense after following it. Nothing works.

Godady_advise

So usual.. Googling . it is come to find a nice tutorial link which I found works pretty well.

Solution

Edit the file (/etc/exim.conf) and modify the mode of localhost router section line number 1295. It will look like this

exim_config

Now you need to change the “driver” to manualroute and append the 3 lines under “localhost” route section area. Also You may need to find the smtp relay server IP. Here Godaddy given dedrelay.where.secureserver.net which resolves to 208.109.80.210 IP. So entry will look like below,

transport = remote_smtp
route_list = * 208.109.80.210
host_find_failed = defer
no_more

exim_config2

Then you need to restart exim service

root@s192-sd [~]# /etc/init.d/exim restart
Shutting down exim:                                        [  OK  ]
Shutting down spamd:                                       [  OK  ]
Starting exim:                                             [  OK  ]
0 processes (antirelayd) sent signal 9
Starting spamd:                                            [  OK  ]
root@s19s [~]#

You may see the mail delivery statistics by opening “/var/log/exim_mainlog” file. You could see the relay smtp IP (208.109.80.210) listed in log files.

#tail -f /var/log/exim_mainlog
2015-11-12 23:57:18 1Zx8IQ-0006Qg-CL SMTP connection outbound 1447397838 1Zx8IQ-0006Qg-CL inesdsd.info liju@serveridol.com
2015-11-12 23:57:18 1Zx8IQ-0006Qg-CL => liju@serveridol.com R=lookuphost T=remote_smtp H=208.109.80.210 [208.109.80.210] C="250 2.0.0 guxJ1r02h3mL6bk01 mail accepted for delivery"
2015-11-12 23:57:18 1Zx8IQ-0006Qg-CL Completed

Note: Don’t forget to add your smtp relay server IP in your domain SPF record. Otherwise those email will be treated as spam

The easiest way is to edit the configuration changes over the WHM exim editor.

The above custom edit would be over written when WHM/Cpanel updates happen.

1. Log into WHM
2. Click on Exim Configuration Editor > Advanced Editor
3. Find this section:

######################################################################
# ROUTERS CONFIGURATION #
# Specifies how remote addresses are handled #
######################################################################
# ORDER DOES MATTER #
# A remote address is passed to each in turn until it is accepted. #
######################################################################

# Remote addresses are those with a domain that does not match any item
# in the "local_domains" setting above.

#
# Demo Safety Router
#

Eximi_SMTP_rely

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>