David Steven-Jennings
Linux, Coding, Webmastery

Block Attachments in Postfix

July 10th, 2008 by David

One of our clients requested that we block specific email attachments that come in - their large network was starting to suffer under the storm of non-work emails flying around the office - funny video clips, songs, etc, etc. Not only that, several gullible people had infected their PCs with viruses and malware because they ran dodgy .exe files that managed to bypass the anti-virus filters.

Luckily, blocking specific mail attachments in Postfix is pretty straightforward and only takes a minute or two to set up.
Read the rest of this entry »

Posted in How To's - Linux | No Comments »

Set Up Sarg on Ubuntu

June 27th, 2008 by David

The annoying thing about Ubuntu’s version of Sarg (the program that generates the usage reports from the Squid logs) is that the cronjobs used to generate the reports are buggy - the weekly and monthly jobs only show some of the days :( Here is how I set Sarg up on client’s Ubuntu servers. It’s not difficult at all, really, as you’re only modifying the contents of 4 files and removing a redundant one :)
Read the rest of this entry »

Posted in How To's - Linux | No Comments »

Server Header Checker

May 25th, 2008 by David

How it Works

Simply enter the URL of the page you want to check (including the http:// or https://) and you will the raw headers that are returned when the resource is requested.

Why would you want to view the headers? Simple - they can contain a lot of information, two popular sections being what web server the site is using and what scripting/programming language is being used by the page.
Read the rest of this entry »

Posted in Tools | No Comments »

Multiple Redirect Checker

May 20th, 2008 by David

Checking redirecting URLs is important to do - poorly configured redirects can harm user experience (causing a decrease in traffic) and can confuse search engines, causing indexing problems and/or lose in rankings.
Read the rest of this entry »

Posted in Tools | No Comments »

Set up Iptables on Ubuntu

May 7th, 2008 by David

Ubuntu, like any good Linux flavour, comes with Iptables, which is used to filter, route and NAT network traffic. Unfortunately, Ubuntu doesn’t comes with a way to quickly modify the Iptables rules, like you do with other flavours such as Fedora. This how-to will show you how to set up a script to allow you to edit a single file to change your routing/firewall settings. Don’t worry, it’s pretty straight-forward.
Read the rest of this entry »

Posted in How To's - Linux | No Comments »

The Trick to Gaming AI - Faking Intelligence

April 12th, 2008 by David

One of the things I really enjoy reading about is artificial intelligence. Not just the academic version, with it’s pursuit of mimicking real life and creating a true ‘thinking AI’, but the gaming version too. Here, the aim is completely different - simply make the game enjoyable. As this is the ultimate aim, AI programmers will get up to all sorts of tricks to achieve it. And they have to, for the pressure is high - make it too stupid and the game looks shoddy, make it too difficult and it’s no fun to play.
Read the rest of this entry »

Posted in Coding | No Comments »

WWW vs Non-WWW: Why Does Google Even Care?

April 2nd, 2008 by David

A Brief Intro to the Domain Name System

A common bane of those who care about their rankings is duplicate content. The basic idea is that a search engine only has limited space to store pages, and thus doesn’t want to store duplicates if it can help it. Plus, having the same content appearing in the the result pages makes for poor user experience - a big no no in the Search Engine world (you listening, Microsoft?).

Now, I know that I’m preaching to the choir here, but for those who don’t know what I’m talking about, the most common source of duplicate content is from your own site - namely the “www vs non-www” problem. I won’t go into detail about what the problem is, as it’s been done to death before. What I will go into, though, is just why the search engines look at things this way.
Read the rest of this entry »

Posted in Webmaster | No Comments »

Implementing Permalinks - a Basic Overview

March 10th, 2008 by David

Ever wondered how Wordpress and other CMSes manage to take URLs with querystrings and make them readable (for users and search-engines)? Luckily, there’s no mystical Voodoo involved, just some basic commands that’re actually pretty straight-forward. I won’t be going into great depth mind you, as while the server side of things is pretty straight-forward, the programming is pretty open-ended. What I will be doing, however, is giving you the low-down on how the system works, so that if you want you can implement it your own way :) As the standard implementation uses Apache and PHP, I will use them for any example code.
Read the rest of this entry »

Posted in How To's - Coding | No Comments »