Disable IPv6 on CentOS6 OpenVZ


In order to disable ipv6, you will have to disable checkpoint/restore (suspend/resume/migrate functionality) as the modules vzrst and vzcpt have ipv6 as a dependancy.

  1. Edit /etc/init.d/vz, find and comment out this line:

    CPT_MODULES="vzcpt vzrst"

  2. Disable ipv6 module by creating /etc/modprobe.d/ipv6-off.conf

    alias net-pf-10 off
    alias ipv6 off

  3. Reboot.

Dovecot Sieve — Deliver mail based on Spamassassin score

Posted on .

I don’t reject any spam e-mail as I want my system to learn from the contents. It gets delivered to a folder and I check it now and then.

However the spam I receieve is beyond rediculous, approaching 400 messages a day. It isn’t feasable for me to check the spam folder for false positives.

The following sieve rule allows me to split the spam into 2 folders based on there Spamassassin score. >=9 “Spam” .. <9 "SpamLikely"

Zabbix Unsupported Items Status

Posted on .

Following on from the zabbix status script, I have put togethor another script to list any unsupported items on agents.

For an item to go unsupported, it usually means something is wrong with the agent, so I add this script to /etc/cron.hourly.

The SQL query to get the list of unsupported items is,

Download
  zabbix-unsupported-status.sh (1.3 KiB, 2,444 hits)

backuppc: Use of qw(…) as parentheses is deprecated

Posted on .

If you upgrade Perl to 5.13.5 or beyond, backuppc will begin to spew this warning at every oppurtunity. Debian/wheezy currently has these warnings on startup and in backuppc logs.

Debian bug #650522 suggests surrounding each use of qw(…) with rounded parenthesis: (qw(…)). There are a lot these used throughout backuppc, so I took a slightly less ingenious but just as effective route.

By adding: “no warnings 'deprecated';” to the beginning of each file that uses qw(…), the warnings are suppressed. This change can be scripted by using the following one-liner:

The location /usr/share/backuppc/lib/BackupPC/ is used on Debian/wheezy and may need adjusting for other distros.