Archive for January, 2013

更改 Exim 的发送IP

Thursday, January 31st, 2013

Anyone running a shared hosting server is probably now accustomed to dealing with constant complaints about blacklisting. It’s exim’s default setup on a cPanel server to use the shared IP of the server to send email, which means that all your clients on one server are sending out email on the same IP.  All it takes is for one spammer to send out a mailing list or one customer to get hacked and run a Darkmailer script, and suddenly everyone on your server seems to be complaining about getting their mail bounced.

You can change the server’s IP address for sending email. Assuming you already have an IP set up on your server with a valid PTR, you probably already saw on the cPanel forums or some other location that you can simply change the interface lines in your /etc/exim.conf file and restart exim: (more…)


Thursday, January 31st, 2013


tar -xzvf maldetect-current.tar.gz
cd maldetect-*



Thursday, January 24th, 2013

WHM > Cpanel Install Plugin > Enable Clamav Connector
clamscan -r -i /home
clamscan -r -i --remove /home

$ clamscan myfile
$ clamscan -r -i /home
$ clamscan -r -i –exclude-dir=^/sys\|^/proc\|^/dev /

If you would like clamscan to remove the infected file use the –remove option in the command.

centos 5.9及基于xen pv-grub内核

Saturday, January 19th, 2013

Xen VPS目前在用这个Linux 内核版本: 2.6.18-348.el5xen
升级到这个内核之后,cpanel的quotas,disk used显示正常了


Friday, January 18th, 2013
CIDR Netmask IP Addresses
/13         524288
/14         262144
/15         131072
/16         65536
/17     32768
/18       16384
/19       8192
/20     4096
/21         2048
/22       1024
/23     512
/24       256
/25                128
/26                64
/27                32
/28                16
/29                8
/30                4
/31                2
/32                1

可用ip数,为(IP Addresses-3)


Wednesday, January 9th, 2013

Software » Install an RPM

whm里面的Disk Used不能更新数据

Tuesday, January 8th, 2013

vi /etc/fstab   修改成下面的
LABEL=/ /       ext3    usrjquota=quota.user,jqfmt=vfsv0                0 0
LABEL=/boot             /boot                   ext3    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-hda2         swap                    swap    defaults        0 0
/usr/tmpDSK             /tmp                    ext3    defaults,usrquota,noauto        0 0



Sunday, January 6th, 2013

Using one many automation scripts available in the /scripts folder, allows you to quickly configure, troubleshoot and execute powerful commands on your cPanel & WHM server by using one of the many automation scripts available in the scripts folder. Here are some of the more popular command line scripts available via cPanel & WHM:

This powerful script allows you to compile, upgrade, and re-install Apache, PHP, and various modules. EasyApache makes it simple to run multiple PHP versions on your server and compile Apache and PHP modules.
The phpextensionmgr script allows you to control your server’s PHP extensions. You can install, uninstall, view the status of, and list the available extensions.
The *up script is used to manually update the various services on your cPanel & WHM server using various forms such as mysqlup, phpup and eximup. Although you can configure your services to update with cPanel, *up can be used for finer control. (more…)


Sunday, January 6th, 2013

/scripts/restorepkg –force username

SSH Tricks In Exim To Remove Email Queue

Saturday, January 5th, 2013

SSH Tricks In Exim To Remove Email Queue
[1] Removing Bad Mail

for i in `exiqgrep -i -f nobody`; do exim -Mrm $i; done >> Removes Nobody Mail

for i in `exiqgrep -i -o 259200`; do exim -Mrm $i; done >> Removes Mail Older than 3 Days

for i in `exiqgrep -i -f “^<>$”`; do exim -Mrm $i; done >> Removes Mail with Weird Characters (Spam)

[2] Delete Mail by a Domain

for i in `exiqgrep -i -f`; do exim -Mrm $i; done

[3] Delete Mail for a Domain

for i in `exiqgrep -i -r`; do exim -Mrm $i; done

[4] Remove Whole Mail Queue

for i in `exiqgrep -i -f `; do exim -Mrm $i; done

[5] Run Mail Queue

runq -qqff&