Wednesday, 24 December 2014

How to Install LESS CSS Compiler on Ubuntu Using Node NPM Install

LESS is an excellent css compiler that makes life a lot easier. However, installing it on ubuntu means jumping through a few hoops in order to get the most up to date version.

It is straight forward however, so here's the steps..

sudo apt-get update
sudo apt-get install git-core curl build-essential openssl libssl-dev
git clone
cd node
(This will take a while!)
sudo make install
node -v (test it works)

Now Download NPM, which we'll use to install LESS

curl | sudo sh
npm -v
npm install less


echo "PATH=$PATH:$HOME/node/node_modules/less/bin" >> ~/.bashrc 
source ~/.bashrc
You should now be able to invoke LESS from the terminal window like so:

lessc LESSFILE.less > CSSFILE.css

Friday, 11 October 2013

How to Archive and Backup Emails with Postfix and Dovecot Subfolders on Ubuntu Servers

I've been thinking recently that as well as an off-site compressed backup of all of the emails within my system, I would also like a (relatively) easy way to recover an email that one of my users has accidentally deleted from their their trash folder (i.e. it's gone forever).

So how do we archive and backup emails with Dovecot? It's actually quite simple, and if I say so myself.. clever :-)

Step One:

Blind Carbon Copy, always_bcc

Sunday, 15 September 2013

Amavis Mark Email as Spam, Automatically Move Spam to Junk Spam Folder

So I've been doing some experimenting this weekend with the idea of what to do with suspected junk/spam email and whether we should leave it up to the end user to deal with it, or get the server to do something about it. With iRedMail installed, Dovecot, Postfix and Amavis can take care of this for you, to whatever level you wish.

If you want, you could just have suspected email have a special "tag" added to the subject and then your users can use this to create their own rules to do what they want with it. I want to go one step further, I want "tagged" spam mail to automatically get put into the spam folder. This way, users can still check if they want to, but it will keep their main inbox folder clean and tidy.

Tuesday, 28 May 2013

Creating Subdomains with Apache Virtual Hosts | Apache Subdomain Virtual Host Example

Set Up Subdomains with Apache Virtual Hosts

Some people are unaware that the "www" part of the URL is actually a subdomain (, and can (in theory) point to a different location than - it is not advised that you use www as an active sudomain, as most people expect both and to have the same content.

This is actually the basis for canonicalisation, but that's another blog post altogether

So how do we set up subdomains using Apache virtual hosts? It's actually very simple, we just need to configure two things, follow this guide for a very simple apache subdomain virtual host example:

Friday, 25 January 2013

A Free and Easy Way to Host Email on Your VPS - iRedMail

Woops .. I think it's been far too long since I have last updated this blog, so apologies about that.
I thought it would be prudent to provide a simple and brilliant way to host and serve emails on your VPS. The advantage of the procedure i will be covering means it makes it easy to host websites on a VPS as well.
So, it is possible - and advised by many - to manually set up an email server, here's a quick list of one common and possible collections of applications you will need for an Ubuntu email server:

Saturday, 18 February 2012

ipTables Tutorial | ipTables Ubuntu *Updated*

ipTables Tutorial

ipTables is definitely confusing to begin with, but for an unmanaged VPS server it is a completely necessary part. This ipTables tutorial will not necessarily be as in-depth as some which are available, simply as I don't know as much! However, I will link to any ipTables tutorial which I have used or I think is worthy of a read.

UPDATE: Automatically update your iptables with Spamhaus Drop List of Spam IPs

Thursday, 16 February 2012

Ubuntu Change Hostname | Linux Change Hostname | Ubuntu Server Tips

Ubuntu Change Hostname

Not a necessity, but probably worth doing is the Ubuntu change hostname command. By default, an Ubuntu server will have a hostname which has probably been set by your unmanaged server host.