Friday, November 30, 2007

Spamassassin backport

I only seem to blog about spam!

Task: Plesk 8.0 - improve spam filtering

Plesk 8.0 on a Debian Sarge box comes with Spamassassin 3.0.3
I wanted to installed a more recent version along with Pyzor, Razor etc.

So, I needed to install spamassassin from the backports repro:
Alter sources.list...
deb http://ftp.uk.debian.org/debian sarge main
deb http://security.debian.org/ sarge/updates main contrib
deb http://www.backports.org/debian/ sarge-backports main
Then update the repros and install the later version of spamassassin
sudo apt-get update
sudo apt-get -t sarge-backports install spamassassin
Once this is done, follow the on-screen instructions and then the previous blogged installation of Pyzor and Razor.

Sounds simple... took ages to find out how to do it!

Saturday, November 24, 2007

Spamguardian failure

I migrated accounts from one Plesk server to another using their cool migration feature. Everything worked swimingly apart from the fact that no mail was being delivered.

A quick look through the logs revealed this in /var/log/messages:
Nov ** **:**:** servername livesguardian(7032): Failed running maildir
I had a look on Google and found no help. Trying to run the command "maildir" on the server resulted in a "no such file" error. Comparing directory listings of other servers, I noticed that /usr/bin/maildir didn't exist! I have no idea why, so decided to copy the maildir binary from the other server.

All is working swimingly now.

Wednesday, November 21, 2007

Synchronising Plesk with unison

I wanted to synchronise my local files and server with one hosted on a Plesk server.

REMOTE
First, we need to make sure that the server has unison installed.
unison -version
If unison isn't installed, install it
If the version doesn't match the version on the local machine, download the binary from the unison site, move it to /usr/bin and create "ln -s" it to "unison"
Try unison -version again.
Make sure that you can run unison remotely - the first time it is run, it tried to create a .unison directory, so if the environment doesn't allow unison to write to the users home directory, it needs to be created first.

LOCAL
Now locally, create the directory we are going to sync with.
Create the unison config file.
It lives in .unison in your home directory and will look something like:
root = /var/www/vhosts/**site_name**/httpdocs/
root = ssh://**username**@**remote_host**/httpdocs/
Using either unison or unison-gtk, run the first sync