Ramblings from MostlyChris

Tech stuff and a bit more

Browsing Posts published on April 19, 2009

NOTE: Most of this is now deprecated. You can use the autoupdater included in the ~[plesk]/bin directory to do the updates. Just make sure you back things up first! Back everything up! ifconfig eth0; hostname cat /etc/hosts ## Verify that the primary IP matches hostname and hosts file     Backups mkdir plesk_upgrade cp -a [...]

When having to migrate hugh numbers of IP addresses on Plesk, here is a way to manipulate the database to do it without having to use the panel to do them one at a time. mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa mysql> SELECT * FROM IP_Addresses; mysql> UPDATE Repository SET component_id = [new ip id] WHERE [...]

Changing the timezone on a server (replace Europe/Amsterdam with your faviorite zone file) mv /etc/localtime  /etc/localtime-old cp /usr/share/zoneinfo/Europe/Amsterdam  /etc/localtime /usr/bin/rdate -s (tick|tock).greyware.com —or— /etc/init.d/ntpd stop; ntpdate tick.greyware.com; /etc/init.d/ntpd start Set the ZONE entry in the file /etc/sysconfig/clock file vi /etc/sysconfig/clock Sync the hardware clock /sbin/hwclock –systohc

Postfix has some spam fighting abilities built in. However, you will need to enable them for them to work. Just throw the code below into your main.cf file and restart Postfix. Voila. smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_pipelining, reject_non_fqdn_recipient, reject_non_fqdn_sender, reject_unknown_recipient_domain, reject_unauth_destination, reject_invalid_hostname, reject_rbl_client sbl.spamhaus.org, reject_rbl_client xbl.spamhaus.org, permit

qmHandle is a handy tool to aid in administering the queue on qmail enabled servers. Get and install qmHandle wget http://ns.nywtc.co.uk/qmHandle && chmod +x qmHandle && cp -a qmHandle /usr/local/bin/ Get and replace existing qmHandle wget http://ns.nywtc.co.uk/qmHandle && chmod +x qmHandle && cp qmHandle `which qmHandle` Usage is simple. After installing, just issue qmHandle without [...]