cPanel

How to configure Exim on a cPanel server to use a smart host

A Smart Host is a SMTP server that will accept mail from another server and then deliver the mail for that server.  For example, server1 is setup to use server2 as a smart host. Anytime someone sends e-mail on server1 it is automatically relayed to server2 regardless of the MX entrys for the domain. Server2 then accepts this message, looks up the proper delivery host/IP and attempts to deliver the message to that host. To configure a smart...

Read More

upgrade clamav on cpanel

First, download the latest version from Sourceforge:   wget http://sourceforge.net/projects/clamav/files/clamav/0.97.5/clamav-0.97.5.tar.gz Extract it and move into that directory: tar -xzf clamav-* cd clamav* Compile: ./configure --prefix=/usr make make install Comment out examples in the config files: replace "Example" "#Example" -- /usr/etc/freshclam.conf replace "Example" "#Example" -- /usr/etc/clamd.conf Get the new virus...

Read More

cPanel reset permissions Script

!/bin/bash # Script to fix permissions of accounts if [ “$#” -lt “1” ];then echo “Must specify user” exit; fi USER=$@ for user in $USER do HOMEDIR=$(egrep ^${user} /etc/passwd | cut -d: -f6) if [ ! -f /var/cpanel/users/$user ]; then echo “$user user file missing, likely an invalid user” elif [ “$HOMEDIR” == “” ];then echo “Couldn’t determine home directory for...

Read More

nginx installation on cPanel

cd /usr/local/src/ wget http://nginxcp.com/latest/nginxadmin.tar tar xf nginxadmin.tar cd publicnginx ./nginxinstaller install   if python crashes follow the steps below:   cd /usr/local/src/ wget http://www.python.org/ftp/python/2.5.2/Python-2.5.2.tgz tar fxz Python-2.5.2.tgz cd Python-2.5.2 ./configure make make install fresh install killall -9 nginx cd /usr/local/src/publicnginx ./nginxinstaller uninstall ./nginxinstaller...

Read More

find exim spam

[root]#exim -bpr | grep “<*@*>” | awk ‘{print $4}’|grep -v “<>” | sort | uniq -c | sort -n the below script will show you the maximum no of email currently in the mail queue have from or to the email address in the mail queue with exact figure. [root]#exim -bpr | grep “<*@*>” | awk ‘{print $4}’|grep -v “<>” |awk -f “@” ‘{ print...

Read More