Archive for March, 2013

Use the following simple steps to resolve the issue. SSH to server a in clients accounts cd mail cd domainname here you will get the list of the email accounts directory you created for a domain name cd emailaccount (username) check for the  maildirsize file rename it and create a new file try to change […]

Solution for ongoing spamd load issue

Posted: 31st March 2013 by kunwardharmesh in Email, WHM/cPanel

We can use the following steps to resolve the load issue on a cPanel box due to the spamd processes. 1. Edit the /etc/mail/spamassassin/ file vi /etc/mail/spamassassin/ then add the following lines to it a) use_bayes 0 (this will disable some spamassassin functionalities) b) lock_method flock (Uncomment these options, if they are commented) 2) run […]

Clean up comet directory in cPanel if /root 100% full

Posted: 31st March 2013 by kunwardharmesh in WHM/cPanel

Removing these files did recover the lost space. After a spam attack, all files inside /root/.cpanel/comet are files from queue. root 100% full Strange directory inside /root : Solution: You can safely clean up the comet directory by running the following command that will remove all files in this directory that have not been accessed […]

Handy Command Line Tricks for Linux

Posted: 31st March 2013 by kunwardharmesh in Linux, Monitoring

Linux comes in several flavors. Some command line tricks for linux are as follows; 1. The following commands will help you determine which Linux distro is installed on your host, what’s the version of your Linux kernel, the CPU model, processor speed, etc. $ cat /etc/issue $ cat /proc/version $ cat /proc/cpuinfo 2. Find the total […]

Linux audit files to see who made changes to a file

Posted: 31st March 2013 by kunwardharmesh in Linux, Monitoring

Use audit to see who changed a file in Linux. In order to use audit facility you need to use following utilities => auditctl – a command to assist controlling the kernel’s audit system. You can get status, and add or delete rules into kernel audit system. Setting a watch on a file is accomplished using this […]

Disable Email Service Only For a Domain

Posted: 31st March 2013 by kunwardharmesh in Email

Disable email only without suspending the account/site or for some purpose you want to let the site running and just to disable emails. The trick is that change the mail directory permissions for the domain (withdraw the read & execute permissions). Login to SSH and navigate to user’s home directory (mostly cPanel servers are configured to store […]

Optimize Your MySQL Server With the MySQL Tuner Script

Posted: 31st March 2013 by kunwardharmesh in Linux, Monitoring, Mysql

MySQL Tuner Script The MySQL Tuner Script is a Perl script that analyses your running MySQL server and makes configuration recommendations based on past performance of the server.  Making the changes suggested by the MySQL Tuner Script can help improve the performance and stability of your MySQL server along with any applications that are using […]

CSF Installation

Posted: 31st March 2013 by kunwardharmesh in Linux, Security

  To install csf simply do the following from the root shell via SSH: cd /usr/local/src wget tar -xzf csf.tgz cd csf sh You will have to edit csf.conf file. It’s located here: /etc/csf/csf.conf You need to change the Testing mode. Testing = “0″ And you need to configure open ports in csf.conf or […]

Install ChkRootKit

Posted: 31st March 2013 by kunwardharmesh in Security

Follow these steps to install ChkRootKit cd /usr/local/src/ – Down load the chkrootkit. wget – Unpack the chkrootkit you just downloaded. tar -xvzf chkrootkit.tar.gz – Change to new directory cd chkrootkit-* ————– (select the version ) – Compile chkrootkit make sense – Run chkrootkit ./chkrootkit How to setup a daily scan report? – Load crontab […]

Exim Useful Commands

Posted: 31st March 2013 by kunwardharmesh in Email, WHM/cPanel

Basic information Print a count of the messages in the queue: root@localhost# exim -bpc Print a listing of the messages in the queue (time queued, size, message-id, sender, recipient): root@localhost# exim -bp Print a summary of messages in the queue (count, volume, oldest, newest, domain, and totals): root@localhost# exim -bp | exiqsumm Print what Exim […]