last journal entries (total: 92)
making outlook's task view more useful
Outlook's Task view is handy for keeping track of day-to-day work tasks. I keep it open in a separate window and use various formatting and filters to show the data I want. In particular there's a "DASL" filter to show a combination of all open tasks, and those completed within the last two weeks:
To set the DASL filter:
- Click View->Arrange By->Current View->Customize Current View
- Click Filter
- Click the SQL tab
- Click "Edit these criteria directly"
- Enter the following:
("http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/811c000b" = 0 OR
"http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/810f0040" >= today(-1209600))
16/11/07 04:26pm
(8 months, 1 week ago)
setting up an ethernet modem with a wireless router
I was suckered in by the new Belkin N1 Vision (with its lovely built-in screen), only to find out it's only a wireless router and doesn't include an ADSL modem. What an arse!
The real pain came trying to set the thing up. I tried getting my old Netgear ADSL router to work in modem-only mode. This was fruitless, so I ordered a dedicated ethernet modem (A Linksys AM200). When this came along I spent a LOT of time fiddling with various settings (DHCP, DMZ etc). This is the combination that works for me, on Virgin broadband:
Modem (Linksys AM200)
- Mode: Bridge Only (note: this turns the modem into a simple non-routing device and the web interface will no longer function
- VCI: 38
- VPI: 0
- IP: 192.168.2.1
- DHCP: disabled
Router (Belkin N1 Vision)
- Connection Type: PPPoE
- Username: my.name@adsl.virgin.net
- Password: As selected when registering with Virgin
- Service Name: [blank]
- MTU: 1452 (default)
..and finally it works!
16/11/07 12:34am
(8 months, 1 week ago)
captioncompetition.co.uk - a zero-maintenance website
The idea behind my new site captioncompetition.co.uk is simple - pull an interesting photo from Flickr every day and let people add captions which can be voted on. Photos can be browsed with their best captions, and there is a "top captioneers" list, showing the users who've added the best captions.
I already have some scripts for handling photo uploads but I have deliberately avoided using them. Using Flickr gives two important advantages:
- I don't have to concern myself with accepting uploaded photos, which would require some form of manual moderation. Instead I've set up a group on Flickr which is moderated by Flickr users (and Flickr's own system which blocks porn, politically incorrect images etc). An automated job on my webserver loads the most interesting new photo from the group every day. To do this, it sorts the photos using Flickr's "interestingness" algorithm, which works surprisingly well.
- The Flickr API allows me to serve the images on captioncompetition.co.uk from Flickr's own webservers. All I'm serving is the HTML and CSS, which are negligible in size. If my server was serving images, the bandwidth usage would be orders of magnitude greater, and very costly as the site grows.
I have also written a script that posts a comment back on the photo within Flickr to say the photo has been featured on captioncompetition.co.uk, with a link to the relevant captioncompetition page (a shameless advert for the site!). The script waits until several good captions have been added to the photo before posting. To work this out, it takes an aggregate of the vote score, and posts a comment when this score exceeds a set threshold. Without this check, a Flickr comment could be posted and bring visitors to captioncompetition.co.uk to see a page of bad captions.
As of today, there are 128 photos, 548 captions and 50 signed-up "captioneers" (users). The site is growing, and is now the number one result in Google for a search on "caption competition." It's satisfying to reach a conclusion on a website project, such that the site can now run itself.... though I will undoubtedly be tinkering with it for some time 
16/09/07 01:56pm
(10 months, 1 week ago)
interhost technical support seems to have gone on holiday
Update [27/09/07]: Today Interhost have moved me onto a new host and my quota is now a healthy 50GB.
Update [10/09/07]: Interhost have responded to my ticket suggesting a move to a new VPS. I have asked them to confirm that I'll be getting the quota and bandwidth allowance that corresponds to what I'm paying.
I just posted my eighth ticket (see below) on a single request for support from my hosting company, Interhost UK. They have a problem with my (and probably other customers') filesystem quota.
Twice so far this year my webserver, a virtual private server (virtualised Linux host) has crashed because available space has mysteriously reduced to zero, despite me being well under-quota. Twice I have had lengthy, frustrating exchanges with Interhost technical support. They've run "fixquotas" but not explained what exactly why this is necessary. They've not proposed any long-term solution. They've not offered any promise that they'll pick up on this problem when it next occurs to save me the hassle of chasing them to fix it. And worst of all, they are now being evasive about contacting me at all. I have called three times in the last couple of weeks after my tickets went unanswered for a couple of days or more. On the other end of the phone - a non-technical person who attempts to call the technical support department but this goes straight to voicemail. I'm promised a call-back. It doesn't come.
I once recommended Interhost, but not any more.
Further to my unanswered post on Monday:
Over the last two days my filesystem availability has dropped from 2.1GB (on Monday) to 1.7GB today, despite no increase in usage from my VPS. If the mysterious drain on space continues at this rate my VPS and websites will be crashing by the weekend.
My total available space is now apparently a measly 6.7GB, and I have had to cancel backups and delete data to fit within this. I'm paying for a 50GB allowance. I'm being charged double the cost of a 10GB allowance, but getting less than 10GB!
Where is the explanation of the problem? Where is the proposed long-term solution? Where is Mark? Where is Interhost technical support?
I used to be really impressed with Interhost, but recently it seems all I get on the phone is blank, un-technical people that promise callbacks that never materialise, and several tickets I have raised have sat unacknowledged for days or even weeks (as is the case with my ticket regarding domain registration).
Update [27/09/07]: Interhost have moved me onto a new host and my quota is now a healthy 50GB.
05/09/07 03:17pm
(10 months, 3 weeks ago)
fixing phlickr's internal php references so it can be used from scripts throughout a filesystem
Phlickr is the PHP5 API for the excellent photo-sharing website Flickr. It works well from what I've seen so far.
One problem though - the various PHP files within the Phlickr API reference each other using relative links i.e. require_once 'Phlickr/API.php', which means that all scripts that use the Phlickr API must be in the directory that contains the Phlickr directory. For me this proved inflexible as I nest my PHP scripts within various directories.
Therefore, I needed to run a substitution on the Phlickr API files in order to make the referenced paths absolute. Here we can use PHP's global $_SERVER['DOCUMENT_ROOT'] variable, which provides the physical filesystem path to the root directory serving up the PHP files. Here's a substitution command I came up with, which should be run within the Phlickr API directory:
find . -name "*.php" | xargs sed -i "s/'Phlickr\\//$_SERVER['DOCUMENT_ROOT'] . '\\/Phlickr\\//g"
Note: this command works for me in bash - I haven't tried it in other shells.
After the substitution, the Phlickr API should be placed in this root directory, but other scripts that need to access it can be placed in subdirectories
04/09/07 11:31pm
(10 months, 3 weeks ago)
auctioning judgetheweb.com and judgetheweb.co.uk
I've decided to auction off a couple of domain names that I'm not using at the moment:
judgetheweb.com [visit auction]
judgetheweb.co.uk [visit auction]
They're both starting at £0.99 and have no reserve. If you know anyone who might be interested, please let them know!
I also have a few more "spare" domains but I'm curious to see the response to these auctions before I give the others a shot.
Does anyone know of any good places to promote these sales? I will be hitting facebook.com as soon as I get home, of course!
20/06/07 11:44am
(1 year, 1 month ago)
automating spam assassin's learning process on plesk
Update [22/11/07]: I have updated the script to make it more generic
Amongst other techniques, Spam Assassin uses a bayesian filter to judge the probability that a mail is spam. The bayesian filter works on the probability that certain words in the mail identify it as spam or non spam. In order for this to be effective, the filter needs to be taught - and this can be automated to a degree.
It took a fair amount of Googling to work out this solution, so hopefully it will save you some time if you have a similar setup to mine (Linux, Plesk, Qmail, Spam Assassin). You may need to substitute your Spam, Learn and Trash folder names if they differ from mine:
1. Inside your Spam mail folder, create a folder named Learn.
2. If a spam mail is not caught by Spam Assassin, get in the habit of moving it manually to your Spam/Learn folder (do this in your mail client).
3. Create a script /var/scripts/dailyMailJobs as follows:
#!/bin/bash
MAILNAMES_PATH="/var/qmail/mailnames"
SPAM_LIFETIME_DAYS=2
TRASH_LIFETIME_DAYS=4
# learnAndFlush args are the following directories: MAIL SPAM SPAM.LEARN TRASH
function learnAndFlush {
echo -e "\n\nLearning new Bayesian data from spam for $1 on" `date`
sa-learn --dbpath ${MAILNAMES_PATH}/$1/.spamassassin --spam ${MAILNAMES_PATH}/$1/Maildir/$3/cur/
# Flush Spam.Learn
flush $1 $3
# Flush Spam
flush $1 $2 ${SPAM_LIFETIME_DAYS}
# Flush Trash
flush $1 $4 ${TRASH_LIFETIME_DAYS}
echo -e "\nLearning new Bayesian data from the last 24hrs of non-spam for $1"
find ${MAILNAMES_PATH}/$1/Maildir -mtime -1 -type d -name cur -not -path "*$2*" -not -path "*$4*" -not -path "*/Maildir/cur" -print -exec sa-learn --dbpath ${MAILNAMES_PATH}/$1/.spamassassin --ham {} \;
}
function flush {
echo -e "\nCleaning $2 from ${MAILNAMES_PATH}/$1"
mtimeArg=""
if [ "$3" ]
then
echo "Only deleting mail older than $3 days"
mtimeArg="-mtime +$3"
fi
find ${MAILNAMES_PATH}/$1/Maildir/$2/cur $mtimeArg -type f -exec rm {} \;
}
su popuser
# Substitute your mail directory here:
learnAndFlush chrisbeach.co.uk/chris .Spam .Spam.Learn .Trash
4. Place this in your crontab so it runs every day (e.g. at 00:15):
15 0 * * * /var/scripts/dailyMailJobs >> /var/cronjobs/logs/dailyMailJobs.log
This script will teach Spam Assassin that the mails in the Spam/Learn folder are spam, and the mails elsewhere are non-spam. It will also perform some housekeeping, deleting the Spam/Learn mails that have been learnt, and deleting old mails from Trash (5 days or older) and Spam (3 days or older).
01/02/07 08:12pm
(1 year, 5 months ago)
server-side mail filtering using qmail/procmail/safecat under plesk
After enabling Spam Assassin on my Plesk-managed domain I had been relying on email clients to move spam-tagged emails into a "Spam" folder. This was impractical as it only worked when a client was open, and rules had to be set up on each client.
After a lot of digging on Google I worked out a server-side solution. The key app here is procmail, which runs rules on incoming mails and can file them into folders. Procmail should already be present on your Plesk installation. Another app called safecat is required to place filtered mail into a maildir within the file system. The following steps apply to my mailbox "chris" on domain "chrisbeach.co.uk" You will obviously need to substitute your own mailbox and domain.
1. Create a folder called "Spam" in your mailbox.
2. Install safecat (see http://jeenyus.net/~budney/linux/software/safecat.html)
cd /tmp/
wget http://jeenyus.net/~budney/linux/software/safecat/safecat-1.13.tar.gz
tar xvzf safecat-1.13.tar.gz
cd safecat-1.13
make
make setup check
3. Create /var/qmail/mailnames/chrisbeach.co.uk/chris/.procmailrc
MAILDIR=/var/qmail/mailnames/chrisbeach.co.uk/chris/Maildir
SPAMDIR=${MAILDIR}/.Spam
DEFAULT=${MAILDIR}/
LOGFILE=${MAILDIR}/procmail.log
LOG="--- Logging ${LOGFILE} for ${LOGNAME} "
# All mail tagged as spam (eg. with a score higher than the set threshold)
# is moved to the designated spam folder
:0
* ^X-Spam-Status: Yes.*
| /usr/local/bin/safecat "${MAILDIR}/tmp" "${SPAMDIR}/new"
4. Edit /var/qmail/mailnames/chrisbeach.co.uk/chris/.qmail so that it contains only the following two lines:
| /usr/local/psa/bin/psa-spamc accept
|preline /usr/bin/procmail -m -o .procmailrc
Let me know how you get on, and also if you know of any enhancements I could make to these instructions
01/02/07 02:46pm
(1 year, 5 months ago)
avoid 1&1 internet
I've just moved web hosts - which, for 20 domains and 13 websites, is a complicated and expensive process. Let me explain what made me want to move...
I'd been with my old host, 1&1 Internet for over three years and had become more and more frustrated with them. They couldn't solve, or even explain, regular outages in service and serious problems with their managed server configuration. It all came to a head in June, after two months of wasted time chasing their support team. I wanted to speak to a manager but was denied by their outsourced phone crew. I was told I should complain to complaints@1&1.co.uk, so I wrote the following email on 21/06/06. It was only acknowledged (see below) after I emailed again on 27/08/06, two months later.
Good afternoon,
I'd like to raise a complaint about 1&1 support, who have made no positive progress correcting issues with the configuration of a managed server for the last two months. I have sent thirteen emails this month alone, supplying information about the issues and helping where possible.. and chasing where necessary. On occasion, my requests have been unanswered by 1&1 for a week or more.
My "professional" package hosts thirteen websites, two of which are commercially important to me. One of them (brittenhouse.com) is the front-end for an information and messaging system running live on LCD screens throughout a block of flats in Chelsea. Outages on this site (now a regular occurrence) are extremely visible and problematic. Another of my sites is a nightlife community website which I am currently expanding to include a payment system. However, outages are affecting the functionality, and, most importantly, the credibility of this system.
I have been a customer of 1&1 for the last three years, and begun suffering serious problems this year. The database has been regularly refusing connections from the application server; the database server has been repeatedly and inexplicably shutting down (sometimes at peak traffic time, and sometimes in the early hours of the morning, under negligible load); simple queries on small tables (in the order of hundreds of rows) were taking more than a second to execute, slowing page loads to a crawl.
These issues were visibly disrupting my sites so I contacted 1&1, who unfortunately made no progress with the case until the end of May when they took "steps to speed up the queries and lessen the load on the server."
This had no positive effect whatsoever, so I emailed again, and received a reply on Friday 2nd June to say my database would be moved. Such a move would require configuration changes on my side in order to keep the sites operational. I emailed back to say that I would be free to make the configuration change that day but did not receive a reply by the end of the day. Therefore I called up oneandone phone support in the evening, who hadn't a clue about what was going on, but said they would attach a note on my account and that the move would occur over the weekend. I stayed in that weekend, in readiness to make the configuration change. I heard nothing back, and the database was not moved. I emailed again on Monday, and there was no reply until Tuesday afternoon, when I was finally told the new configuration details.
Had the move fixed the issues? No. Not even slightly (the shutdowns, connection issues and appalling query performance remained). Worst of all, a new intermittent problem had been introduced. The sites now frequently suffered errors: "Host '212.227.127.135' is not allowed to connect to this MySQL server." Clearly, there was a MySQL, IP or DNS configuration issue on 1&1's side. In all this time no one has explained why the database servers are being shut down.
After repeated email exchanges which have continued since the database move, 1&1 technicians have made absolutely no progress solving ANY of these issues (I have also had to explain to the latest support technician that he is looking at the wrong database, and I've still not heard back from him after a week). Instead of explaining the technical issues or resolving them, 1&1 support have recommended that I upgrade to a dedicated server to host my sites.
The reason given is that my sites have "outgrown" my current package. I'm not convinced. My database is just a few megabytes in size, and there is no reason why queries should be taking up to a second to run. More tellingly, errors such as the one described above is clearly caused by configuration and NOT by load.
Despite my doubts about 1&1's technical support, I am tempted to move to a dedicated server because it will give me more control over my configuration and hopefully the move to a fresh server will negate the issues, or allow me to solve them myself. The leap in cost is from £18.79/month to £69/month, which is a lot of money for me to have to pay, but my domain/subdomain/email configuration is comprehensive and it would be time-consuming to transfer them to another hosting company. I have already wasted enough of my time trying to help 1&1 resolve these issues and now I'm fed up and I want results.
I'm emailing to express my despair at the FUTILITY in contacting 1&1 about the configuration of their managed servers. I hope that you will take my concerns on board and that the situation will improve in the future. I would like this email to be acknowledged, at the very least.
Sincerely,
Chris Beach
My experience with 1&1 has been incredibly frustrating, and I can see from a brief Google search that I'm not the only unsatisfied customer (see [1], [2], [3], [4], [5], [6], [7], [8], [9], [10]).
During my two-month wait for a reply from 1&1, I decided to move over to a new hosting company. I chose Interhost's Linux VPS (virtual private server) 50 package, which offered a very comprehensive set of features and root access to a Linux host. I called the support number before I signed up, and got straight through to a knowledgeable guy who was clearly in direct contact with the system. No more clueless outsourcers, thank god. My subsequent email queries to Interhost were answered within a few hours. It was great to finally have a robust application server and database. Note (updated 04/01/2008) that Interhost has sadly declined somewhat.
Updated 01/08/2006: this just in from 1&1:
Thank you for contacting us. First let me offer my apologies for you not receiving a response to your complaint, unfortunately this was a result of a break down in communication on our part. The service you received was below any acceptable level and the time taken for a resolution for your database issues was well over our desired time frame. Unfortunately the cause of the issue was hard to locate due to its intermittent nature and the time needed to find a solution exceeded our usual resolution time
We apologise for any inconvenience that this may have caused you and that as a result of this issue you moved you're hosting to a new provider. You first reported an the issue you were experiencing on 20th Feb 2006, so as a gesture of goodwill we will be refunding your card with all fees paid after the first time you reported this issue (20th Feb 2006). This means you will receive the following refund...Invoice no. Refund
------------- ---------
71422019 £91.36
71592669 £75.14
71697903 £52.23
71749795 £70.46
-----------------------------
Total = £289.19
-----------------------------
Updated 04/08/2006: 1&1 has just DEBITED my account £70.46. Unbelievable! This is over a month after I cancelled my contract with them. Needless to say I called up to tell them what I thought about this in no uncertain terms. They claim that their system "always does this" and there is "nothing they can do about it" except subsequently refund the money. They claim a refund had been made that day but this has not yet appeared on my bank statement. I'll wait and see. No sign of the compensation yet.
Updated 08/08/2006: After phoning them twice, and sending my bank statement to them, 1&1 has refunded £69.71. It's just short of the £70.46 they took, but I'm too weary to bother chasing small fry when I'm still owed almost £300 in compensation from them
Updated 10/08/2006 In an email from their billing department, 1&1 reveals that the compensation offer partly comprised a refund for the [illegal] invoice of £70.26, so now I am only due to receive £219.48. I respond with the following:
Daniel
Thanks for getting back to me.
I was unaware that the compensation partly comprised a refund for an invoice that was to be illegally debited from me after the compensation offer itself! The invoice in question, 71749795 was debited after my cancellation, and after the £289 compensation was offered. Since the actual invoice document never reached me by email I was unaware that this actually formed part of the amount offered in compensation.
Losing an anticipated £70.46 is regrettable but to be honest I will be happy for this long, drawn-out saga to be over when I finally receive the remaining compensation.
Back in July when I cancelled my contract, I phoned to confirm I wouldn't be charged any further amounts by 1&1. Whilst I was told that I wouldn't be charged, in August my account was debited. This is disconcerting.
This time, can you please put it to me in writing that 1&1 will never debit my account again.
Thanks in advance
Chris Beach
Updated 15/08/2006 The reduced amount of compensation (£219.48) finally hits my account. All in all, the experience with 1&1 has been fraught with broken promises and wasted effort. When you're choosing your host, think very carefully before choosing 1&1.
27/07/06 10:16am
(1 year, 12 months ago)



Hi chris,
I too share some of your issues with Interhost, we have 1 VPS and have been with Interhost for over a year. Things have slowely been going downhill. Recently we have had problems anfter problems with our VPS and yes your right a phone call is usually picked up by someone who doesnt knowe a VPS from a cabbage. They offer to take your details down and promise a call back but the call never comes.
Mark it seems runs everything and when Mark isnt there everything falls apart. If your reading this and thinking of moving over to a VPS with Interhost then think again....this used to be a little gem of a company but its going sownhill FAST...if your value your support and reliability then think again....
09:29pm
Interesting posts. I am a new customer and had some very basic questions (not even technical) about billing etc., and posted them by ticket system on Monday. Also rang. It is Friday and silence. Rang just now and tried to speak to somebody... anybody. And NOBODY could take my call. I asked the person who answered the phone whether they were an outsource phone answering company but she said she worked for Interhost. I then asked her if nobody was available because they had not come into work or just busy... and she said it was a bit of both.
Can anyone recommend another VPS hosting company in the UK that actually communicate with their customers?
Thanks, Andrew
09:24am
Hi Chris,
I was flabbergasted to see your post today as we've had exactly the same issue. We moved a site to a VPS with them around 9 months ago after doing some stress testing and finding the server to be very fast and responsive mirroring Interhost's technical staff at the time. Our site sells tickets to an event that happens once a year, and so it was with horror during the busy period of sales we had the zero space based crashes you describe making our sales (front end AND back end) unavailable for long periods of time. After much toing and froing over a period of a few weeks a move was suggested. Unfortunately by this time we only had an hour of selling left, so decided to leave off and do it slowly and methodically. Since then we've written test rigs to specifically test the ordering process and find that it won't even finish running on the Interhost VPS - i.e. we process 100 orders in 700 seconds on our development server, but the Interhost VPS won't get to the end of the 100 orders. Not only that the server was at some stage hacked by the looks of things. Interhost have promised callbacks on both issues but it has remained impossible to get hold of anyone. It's such a shame as they seem to have fallen into the classic hosting trap of:
1) setup hosting company with great prices and watch the customers arriving
2) think - this is a doddle this hosting lark, why didn't we do this before
3) things start getting busier and the wheels start coming off - hosting turns out to be pretty complicated
4) hide under desk hoping it all goes away
Hey ho. I'm going to try and sort this out this week, I wonder if it's worth comparing notes? Gimme a shout or IM me:
alex at (romeo echo echo foxtrot november echo tango) dot co dot uk if you want to
09:20am
I have to VPS' with a2b2.com and although today isn't the best day for me to recommend them since my 2nd one died on me for some reason, possibly my slack security not theirs. However, they got me a new VPS ready within an hour then I just had to restore data from my own backups. If you know your stuff then their dirt cheap, unmanaged packages can't be beat.
10:11pm
I've had the problem with file space on a Windows VPS wee have with Interhost going to zero this was due to a large ammount of .tmp files in "c:\windows\system32\drivers" now they wasn't able to explain why this would happen just told me to delete them, so I now run a bat file everyone hour to check for tmp files and delete them.
In the past when I haven’t noticed them, there would be around 16,000 of them totalling 4.5 GB. SWSoft forum say's the node has likely been compromised in some way.
10:05am