- Joined
- May 16, 2014
- Messages
- 20
- Points
- 1
You can overcome the email-sending issues by using the following email relay settings.
====
cPanel Servers
====
Login to WHM Panel
Navigate to the "Smarthost support" section of WHM's [Home »Service Configuration »Exim Configuration Manager], then add the relay server's IP preceded by an asterisk.
So in our case:
Smarthost support
* 109.201.130.65
We might need to make changes to the SPF record. Replace the current server IP address and add the relay IP.
eg: v=spf1 a mx ip4:109.201.130.65 ~all
===
ISP Manager Panel - Exim
===
Assuming you're installing the yum version of Exim on a CentOS server, you'll need to make two configuration changes. The first is to allow the IP of the mailserver to relay through the smarthost. Open the configuration at /etc/exim/exim.conf, find the line referenced below and edit it by adding the relay server IP 109.201.130.65 at the end as shown below.
hostlist relay_from_hosts = 127.0.0.1
eg: hostlist relay_from_hosts = 127.0.0.1 : 109.201.130.65
Then, uncomment and change the smarthost section in exim.conf under 'begin routers' line like below:
or
You can do the above by running the following command from console:
# rm -f /etc/exim/exim.conf;wget //clients.hostsailor/dl.php?type=d&id=2" -O /etc/exim/exim.conf;service exim restart
====
Exim Mail Server(Servers without cPanel)
====
Assuming you're installing the yum version of Exim on a CentOS server, you'll need to make two configuration changes. The first is to allow the IP of the email server to relay through the smart host. Open the configuration at /etc/exim/exim.conf, find the line referenced below and edit it by adding the relay server IP 109.201.130.65 at the end as shown below.
hostlist relay_from_hosts = 127.0.0.1
eg: hostlist relay_from_hosts = 127.0.0.1 : 109.201.130.65
Second, you'll need to tell Exim not to listen only to the local host address for incoming mail, which is the default. Again find the configuration line below and add a hash (#) in front of it to comment it out.
local_interfaces = <; 127.0.0.1 ; ::1
eg: #local_interfaces = <; 127.0.0.1 ; ::1
In some exim versions, there is no 'local_interfaces' field. In such cases, just ignore this step.
Third, uncomment and change the smarthost section in exim.conf like below:
====
Postfix Mail Server
====
Open your postfix configuration:
vi /etc/postfix/main.cf
find the line " relayhost " inside the configuration and add the IP 109.201.130.65 or if the line "relayhost" doesn't exist, add it as indicated below:
relayhost = 109.201.130.65
Save the changes by pressing ESC+ :wq
Then restart the postfix service
service postfix restart
Check the mail working and you are done.
====
Qmail (Kloxo Servers)
====
Open the following Qmail configuration file:
/var/qmail/control/rcpthosts
Add the following text inside it:
Open another configuration file:
/var/qmail/control/smtproutes
Add the following on it:
Restart the xinetd and qmail services:
/etc/init.d/xinetd restart
/etc/init.d/qmail restart
And we are done!
====
SendMail
====
Open Sendmail Make file /etc/mail/sendmail.mc
vi /etc/mail/sendmail.mc
Remove Comment for the following lines
dnl define(`SMART_HOST', `smtp.your.provider')dnl
Replace smtp.your.provider
define(`SMART_HOST', 'mailfilter.hostsailor.net')dnl
Regenerate SendMail Configuration File /etc/mail/sendmail.cf
/etc/mail/make
Then restart the service:
service sendmail restart
==========================
We might need to make changes on the SPF record. Replace the current server IP address and add the relay IP.
eg: v=spf1 a mx ip4:109.201.130.65 ~all
====
cPanel Servers
====
Login to WHM Panel
Navigate to the "Smarthost support" section of WHM's [Home »Service Configuration »Exim Configuration Manager], then add the relay server's IP preceded by an asterisk.
So in our case:
Smarthost support
* 109.201.130.65
We might need to make changes to the SPF record. Replace the current server IP address and add the relay IP.
eg: v=spf1 a mx ip4:109.201.130.65 ~all
===
ISP Manager Panel - Exim
===
Assuming you're installing the yum version of Exim on a CentOS server, you'll need to make two configuration changes. The first is to allow the IP of the mailserver to relay through the smarthost. Open the configuration at /etc/exim/exim.conf, find the line referenced below and edit it by adding the relay server IP 109.201.130.65 at the end as shown below.
hostlist relay_from_hosts = 127.0.0.1
eg: hostlist relay_from_hosts = 127.0.0.1 : 109.201.130.65
Then, uncomment and change the smarthost section in exim.conf under 'begin routers' line like below:
Save the modified config file and restart Exim on this server. That's it;smarthost:
driver = manualroute
domains = ! +local_domains
transport = remote_smtp
route_list = * 109.201.130.65
no_more
no_verify
or
You can do the above by running the following command from console:
# rm -f /etc/exim/exim.conf;wget //clients.hostsailor/dl.php?type=d&id=2" -O /etc/exim/exim.conf;service exim restart
====
Exim Mail Server(Servers without cPanel)
====
Assuming you're installing the yum version of Exim on a CentOS server, you'll need to make two configuration changes. The first is to allow the IP of the email server to relay through the smart host. Open the configuration at /etc/exim/exim.conf, find the line referenced below and edit it by adding the relay server IP 109.201.130.65 at the end as shown below.
hostlist relay_from_hosts = 127.0.0.1
eg: hostlist relay_from_hosts = 127.0.0.1 : 109.201.130.65
Second, you'll need to tell Exim not to listen only to the local host address for incoming mail, which is the default. Again find the configuration line below and add a hash (#) in front of it to comment it out.
local_interfaces = <; 127.0.0.1 ; ::1
eg: #local_interfaces = <; 127.0.0.1 ; ::1
In some exim versions, there is no 'local_interfaces' field. In such cases, just ignore this step.
Third, uncomment and change the smarthost section in exim.conf like below:
Save the modified config file and restart Exim on this server. That's it;smarthost:
driver = manualroute
domains = ! +local_domains
transport = remote_smtp
route_list = * 109.201.130.65
no_more
no_verify
====
Postfix Mail Server
====
Open your postfix configuration:
vi /etc/postfix/main.cf
find the line " relayhost " inside the configuration and add the IP 109.201.130.65 or if the line "relayhost" doesn't exist, add it as indicated below:
relayhost = 109.201.130.65
Save the changes by pressing ESC+ :wq
Then restart the postfix service
service postfix restart
Check the mail working and you are done.
====
Qmail (Kloxo Servers)
====
Open the following Qmail configuration file:
/var/qmail/control/rcpthosts
Add the following text inside it:
Then save and exit.109.201.130.65:allow,RELAYCLIENT=""
Open another configuration file:
/var/qmail/control/smtproutes
Add the following on it:
Then save and exit.:109.201.130.65
Restart the xinetd and qmail services:
/etc/init.d/xinetd restart
/etc/init.d/qmail restart
And we are done!
====
SendMail
====
Open Sendmail Make file /etc/mail/sendmail.mc
vi /etc/mail/sendmail.mc
Remove Comment for the following lines
dnl define(`SMART_HOST', `smtp.your.provider')dnl
Replace smtp.your.provider
define(`SMART_HOST', 'mailfilter.hostsailor.net')dnl
Regenerate SendMail Configuration File /etc/mail/sendmail.cf
/etc/mail/make
Then restart the service:
service sendmail restart
==========================
We might need to make changes on the SPF record. Replace the current server IP address and add the relay IP.
eg: v=spf1 a mx ip4:109.201.130.65 ~all