For those of you that subscribe to my RSS feed, you may have noticed the annoying Copyright blurb at the bottom of each post. It’s there for a reason. A little while back I had all of my posts mirrored at a splog, which had the intent of driving search engine hits to their website in order to pimp their spammy services.

Several months down the line and I found another splog doing exactly the same thing. This time round I took a more forceful approach as they were mirroring the recent video I uploaded in the post entitled Time Lapse. I spent a lot of time making that video and there’s no way I was going to have it being used to garner extra credit in Google without my permission.
Read the rest of this entry »


One of the websites I host and operate ran into some problems today with the image upload facility. For some reason it wouldn’t resize any images with an error showing that too much memory was being used. Uploading the same image via a different website I host worked fine, which I found a little strange.

To cut a long story short I managed to get things working again by switching from the inbuilt GD library to Imagick, the PHP extension to ImageMagick. Here’s the code I used to make a thumnail based on the image uploaded.

function create_thumbnail($file, $new_name, $max_side) {
 
	$image = new Imagick($file);
	// Providing 0 forces thumbnailImage to
	// maintain aspect ratio
	$image->thumbnailImage($max_side,0);
 
	$thumbnail = $image->writeImage($new_name);
	$image->destroy(); // Free resources
	if($thumbnail == true) {
		return true;
	} else {
		return "Imagick Error!";
	}
}

It went from about 50 lines of code, to just 13. A pretty good improvement considering it does the same thing!


I installed the latest version of Apache last night and enabled a new module that wasn’t previously available under Apache 1.3; mod_deflate. This gives the following speed and size improvements over generally every page hosted here.

Size Improvements

By adding the following code to httpd.conf once mod_deflate is compiled into apache you too can achieve similar results.

SetOutputFilter DEFLATE
DeflateFilterNote ratio
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary

Yesterday a compromised server was used to attempt to get into my box. Thankfully I have an operationally mod_security and a damn fine firewall, that monitors mod_security alerts. This is a vital thing to have, especially if you have any compromisable software running. I do daily and weekly checks of my server to make sure there aren’t any things on here that shouldn’t be.

Read the rest of this entry »


I run MailScanner and SpamAssassin here at SDJL, which does a great job of catching spam and nasty email content.
Recently there’s been quite of spammy email getting through those filters. I made a couple of changes to the default rules in place and I seem to be catching most of the spam now.

Here’s my custom SpamAssassin rule set for those that want to make use of it.

score BAYES_99 5.0
score URIBL_SBL 5.0
score URIBL_AB_SURBL 5.0
score URIBL_OB_SURBL 5.0
score URIBL_PH_SURBL 5.0
score URIBL_SC_SURBL 5.0
score URIBL_WS_SURBL 5.0
score URIBL_JP_SURBL 5.0
score BAYES_00 -2.0
score RCVD_IN_NJABL_DUL 2.5
score FORGED_RCVD_HELO 0.6
score RCVD_IN_SORBS_DUL 3.7
score RCVD_IN_SORBS_WEB 2.0

Original spam rules were from ConfigServer, but I’ve added a few of my own to make it even more aggressive.

To use these rules, create a file called /etc/mail/spamassassin/sdjl.cf and add the above code to it.
If you utilise MailScanner, reload it using the following command.

service MailScanner reload
lotsa emails this way!