Test a e-mail by Spamassassin manually and get spam report

If you want to test a e-mail or test whether the spamassassin rule is working or not, you can use the following command spamassassin -t  /the_message.txt Then you will get something like this Received: from localhost by hostname.yourserver.com with SpamAssassin (version 3.3.2); Wed, 22 Aug 2012 21:58:21 +0800 From: =?utf-8?B?5om25reR5rK7?= <webmaster@123.net> …….. Content analysis details: […]

Exim: update the recipient of a e-mail message in the query

1. check the exim mail query by specific the sender or recipient Sender: exiqgrep -f   sender@domain.com Recipient: exiqgrep -r    recipient@domain.com   2. Get the message_id from above and add a new recipient to the message exim -Mar message_id email@domain.dom 3. Exim doesn’t support delete a recipient, however, we can mark the wrong recipient as […]

Notes on resizing file system in LVM (Shrink)

1. Umount the filesystem and check it with e2fsck umount /var/lib/vz e2fsck -f /dev/mapper/pve-data 2. Re-size the file system of /dev/mapper/pve-data (Let said to 500GB) resize2fs /dev/mapper/pve-data 500G 3. Resize the Logical Volume of LVM  lvresize -L 500G /dev/pve/data 4. Check the size of the Logical Volume lvdisplay /dev/pve/data 5. Mount the filesystem and check the size mount /var/lib/vz df […]

No more ‘php_value mbstring.func_overload’ in .htaccess

Since to the patch of php bug #43227 There is no more effect on .htaccess ‘php_value mbstring.func_overload’ setting. The work-around is to set func_overload into Apache virtualhost config file. php_admin_value mbstring.func_overload X X is the value that you want to set.

How to solve “Out of resources when opening file”

When you got “23: Out of resources when opening file” or “1016: Can’t open file” from Directadmin backup output or mysqldump output, it is all about open-file-limit what you need to do is increase the open-file-limit and set it into /etc/my.cnf open_files_limit=14096 then restart the mysql service /etc/init.d/mysqld restart

Directadmin mail forward for 1st (master) account

In directadmin, mail can be forwarded to other mail box / e-mail address by setting forarder. However, the setting for master account and virtual account are different. here is the tips. For master account: iammaster@domains.com  iammaster,somebody@yahoo.com.hk For virtual account: iamvirtual@starfls.com  somebody@yahoo.com.hk The different is that for virtual e-mail forwarder, a copy must be sent to […]

Rootkit Hunter installation

Download From http://sourceforge.net/projects/rkhunter/ Install tar zxvf rkhunter-* cd rkhunter-* ./installer.sh –install cd .. rm -rf rkhunter* Run /usr/local/bin/rkhunter –update to update the database Run /usr/local/bin/rkhunter –propupd to create pre-required MD5 check sum Run /usr/local/bin/rkhunter -c to run rkhunter Review log file less /var/log/rkhunter.log References: http://sourceforge.net/projects/rkhunter/ http://www.howtoforge.com/faq/1_38_en.html