cPanel/WHM

Use Mandrill with Exim on cPanel/WHM to Solve SPAM email Issue

If you are using phpmail or sendmail function in your website, you may notice that, some of the email may end up in SPAM folder of the intended recipients. The situation become worsen if the intended recipients are using hotmail/livemail/outlook, which has stricter filtering. The recipient may not receive the email at all. Not even in Junk folder.

This is a big issue if you are running an e-commerce and even bigger issue for newsletter/mailing list website like Interspire Email Marketer.

To solve this issue, we can use transactional email or bulk email service such as Mandrill with Exim on cPanel/WHM server.

To integrate Mandrill with Exim on cPanel/WHM, we have to add proper settings as below.

 

1. Login to WHM with a root access & browse to

WHM → Service Configuration → Exim Configuration Manager → Basic Editor

 

2. In “Mail → Smarthost support”, add the following

*: smtp.mandrillapp.com

 

3. Browse to

WHM → Service Configuration → Exim Configuration Manager → Advanced Editor

 

4. Search for – “Section: AUTH” & add the following code. Change youremail@yourdomain : api-key with your email & Mandrill API Key

auth_login:
driver = plaintext
public_name = LOGIN
hide client_send = : youremail@yourdomain : api-key

 

5. Search for – “Section: PREROUTERS” & add the following code.

smart_route:
driver = manualroute
domains = ! +local_domains
ignore_target_hosts = 127.0.0.0/8
transport = auth_relay
route_list = * smtp.mandrillapp.com
no_more

 

6. Search for – “Section: TRANSPORTSTART” & add the following code.

auth_relay:
driver = smtp
port = 587
hosts_require_auth = $host_address
hosts_require_tls = $host_address

 

7. Save the new configuration.

8. Send a test email & you should see the email header should have something with *mandrill.com


Install RRDtool Graph to Monitor LiteSpeed Server in cPanel/WHM

For cPanel/WHM user, Munin is great server monitoring tools. It functions as a data logging and graphing system for time-series data. It can save years of real-time stats for data server and dispaly them in RRDtool graph at any time.

However, if you are using LiteSpeed Webserver, some of the data that related to Apache Webserver such as concurrent http connection will become unavailable.

Fortunately, LiteSpeed to provide an alternative monitoring tool but independent of Munin.

Below are the guides on how to install them.

Let assume the following

a. LiteSpeed install at – usr/local/lsws/fcgi-bin/lsphp5

b. cPanel username – cpuser

c. Main domain for cpuserwebsite.com

Make sure you are using your information for all 3 information above.

Below is the step by step guides on how to install it RRDtool Graph for LiteSpeed.

1. SSH as a root user to your server & issue the following command

cd /usr/local/lsws/add-ons/rrdgraph
./rrdgraph_install.sh

 

2. Key in ‘y‘ indicate you have install RRDtool. Normally, RRDtool installed together with cPanel.

 

3. When asked about destination – Destination [/usr/local/lsws/DEFAULT/html]: key-in /home/cpuser/public_html

 

4. When asked about lsphp5 location – lsphp5 location: [/usr/local/lsws/fcgi-bin/lsphp5], if the LiteSpeed installation is correct, press enter or else type in the correct location

 

5. When installation complete, edit config file by issuing the following command

nano /home/cpuser/public_html/ls_stats/config/main.php

 

6. Scroll down until you see

'rrdtool' => '/usr/bin/rrdtool',

 

7. Change it to

'rrdtool' => '/usr/local/cpanel/3rdparty/bin/rrdtool',

 

8. Change user permission setting by typing

chown -R cpuser:cpuser /home/cpuser/public_html/ls_stats

 

9. Login to cpuser cPanel account.

 

10. Click on Cron-job icon.

 

11. In Common Settings:, select Every minute ( * * * * *).

 

12. In Command: area type in

/usr/local/lsws/fcgi-bin/lsphp5 /home/cpuser/public_html/ls_stats/update.php >/dev/null

 

13. Installation completed. You can access the monitoring tools at

http://website.com/ls_stats/

 

14. Alternative, you may want to set-up subdomain such as litespeed.website.com & point this sub-domain to /home/cpuser/public_html/ls_stats