HP is robbing me blind

Since when was 25ml of ink worth $30 and why package the print head with the ink? Pretty sad when the price of the replacement ink is more than the price of the latest and greatest printer.

My Epson dot matrix printer that came with my first computer (an apple IIe) still prints fine and it’s 20 years old! Each replacement ribbon is $9 and a ribbon is good for hundreds and hundreds of pages of text.

I guess this is how HP can be a complete failure in the pc/electronics department (hp/compaq pc’s are the Ugo’s of the computer world) and still be a profitable company. It’s the Gillette business model, give them the razor for cheap and make a mint on the blades.

Cleaning your Maildir

If you’re running a mail server like Qmail or my new favorite Postfix chances are you’re using the Maildir mailbox type. I like Maildir because it stores each mail in a separate file, making cleaning and managing mailboxes very easy on the server. Also, Maildir works over network filesystems like NFS much better, meaning you can have several mail servers using the same mailbox store and if messages are received for the same person on multiple servers there is no problem with access to the mailbox because the message will be stored in it’s own unique file.

Recently I was tasked to review a mailbox that was forgotten about on a mail server and had accumulated a lot of spam junk messages. Since there was a chance that there was valid mail in the box it was decided that we should task someone to go through it. The problem was there was 74,000+ messages in the mailbox, over half of which was surely spam and viruses.

With a simple find . -type f -exec grep -l -i "spamword" '{}' ';'|wc -l I was able to find and count the number of messages that contained spamword. Then by changing the command to find . -type f -exec grep -l -i "spamword" '{}' ';'|xargs rm -v I was able to remove all the messages that contained this word. By removing common spam words like “viagra, cialis, poker, pharmacy” I was able to cut down on a lot of messages.

Next was to scan for viruses. Using Clam Antivirus you can scan a maildir for viruses by using the –mbox command line switch. I chose to move all infected mails to a dir so I could later check them out by hand (just to be sure).

mkdir /tmp/clamscan-infected
chmod 777 /tmp/clamscan-infected/
clamscan --mbox -i --move /tmp/clamscan-infected/

I use /tmp because the directory needs to be one that clamscand in unprivileged mode can read/write to.

By scanning and removing commond spam words and viruses I was able to cut the messages down to around 22,000. I’m sure 99% of those are spam too.

Upgraded the site to WordPress 1.5

Ughhh.. forgot how much time I had into customization on my old 1.2 install. The theme and css stylesheet layout for version 1.5 is completely different. So instead of trying to make my old css work I opted for a new theme, equix. Already I don’t like some of it but it’s a good base to work off. That’s the wonderful thing about OSS, I can take his style and modify it to my liking.

PHP Gallery

I know php gallery has been around forever but I just added it to subaruclub.ca this weekend to handle all the media and I’m VERY impressed. I’ve always used IDS and it’s worked well for me but due to the fact that it’s perl/cgi and it resizes on the fly it tends to be quite a resource hog.

Gallery’s upload tools are quite impressive as well. Also the fact that I was able to include the php headers and footers we already had to ‘nest’ gallery was a bonus. The gallery looks almost native to the rest of the site!

One item I noted, ImageMagick lacks support for Jpeg and PNG files by default in FreeBSD. To compile in support for these you need to do the following:

vi /etc/make.conf and add
WITH_JPEG=yes
WITH_TIFF=yes
WITH_PNG=yes
Save and exit
cd /usr/ports/graphics/ImageMagick/
make deinstall clean
make reinstall clean

Once that’s complete Gallery shouldn’t complain.