Tuesday, February 20, 2007

Update on my Nervous Dog

This is a follow-up post to the a previous installment, so read that first if you don't know what I'm talking about...

We talked to our vet (which is located in a large chain of pet stores), and ever since they were bought out a couple of years ago, things have gone down hill. To write a prescription, they want to charge us $13 for each. Ug.

My wife has a friend who is a vet-tech and lives in Colorado. On Friday, she talked with her for the first time in quite a while, and mentioned Ace's problem. She suggested we try giving him one Benedryl tablet, as that will sometimes calm dogs down enough so that they can sleep. Of course, it also might have the opposite reaction, so be ready.

On Sunday evening, the rain started to come down and Ace got real skittish. Figuring that there was no better time than the present, I gave him a generic Benedryl, and he slept like a champ until 6:30 in the morning. No worries, no problems! ;>

Tuesday, February 13, 2007

DSPAM Installed

At work, we have a Debian Linux box that serves as our mail and web server. Recently, I upgraded that box from Debian Woody to Sarge. After that upgrade was complete, I decided to try and improve upon the spam filtering implementation.

The mail server runs qmail as the SMTP server, and I have the mail delivered to local users via procmail. Using procmail allows me to do all kinds of neat filtering on the server side. As an example, I automatically place mailing list traffic into separate IMAP folders. Similarly, mail from customer domains is automatically placed in their own company specific IMAP folders, thereby organizing my incoming emails automatically.

One of the filters that I had incoming mail going through was SpamAssassin. When I first installed SpamAssassin 2+ years ago, it did a very good job of detecting and flagging spam. However, the spammers have gotten rather sophisticated over the last two years, and many of them now actually test their spam against SpamAssassin to try and thwart it. While SpamAssassin was still able to detect and flag an ample amount of spam, more and more seemed to slip through as the months went by.

I decided to try out DSPAM after hearing good reports on its performance from a friend, and reading about it on its website. It wasn't available in the Debian repository, so I downloaded the source tarball and then built and installed it.

DSPAM works best if you have a corpus of spam and non-spam (or ham) to train it. If you do not have a good selection (in the thousands), then I would recommend not using it until you do. Once you train DSPAM with emails that are good and bad, then you can put it to work effectively.

DSPAM is not a fire and forget type of spam fighting solution. It requires a certain amount of vigilance on the part of the user to correct falsely flagged spam or ham. I set up three folders in each user's IMAP folder hierarchy for this purpose:

  1. Spam/ - This is the folder where DSPAM sends all emails it detects as spam.
  2. Spam/Missed/ - This folder is where users place emails which DSPAM did not detect as spam, but should have.
  3. Spam/NotSpam/ - This folder is where emails are placed which were detected as spam, but are not.
Every night, cron executes a bash script I wrote which crawls through the Missed/ and NotSpam/ directories, correcting DSPAM's mistakes.

So, how is it working? After about 3 weeks of use, my accuracy rate is up to over 95%, and that is with out as much initial training as I recommended. I expect that over the course of the next month or two that I will be able to get that accuracy up to the triple 9's range - 99.9%.

Over all, I am extremely happy with DSPAM's performance. It is a bit trickier to install and get going, but once it is humming along nicely, it purrs.

Thursday, February 01, 2007

My Dog + Rain = Sleep Deprivation

Our dog, Ace, is now 11+ years old. My wife and I picked him out of a litter of puppies from the San Diego County Animal Shelter, located in Carlsbad. As it turns out, he was the lucky one of the litter, as the others were put down due to illness the Monday after we adopted him. He had is share of health problems when he was young, but he bounced back nicely and he's been with us ever since.

He is a big dog. At around 115 lbs and tall enough to pick stuff off the dinner table, it is challenging keeping food away from this mutt. We had to put a lock on the pantry because he knows how to open up doors and took to browsing through the pantry and devouring a box of cereal or loaf of bread. To say that our dog is food-motivated would be an understatement.

Ace is part chocolate lab and part great dane. We did not know about the great dane portion of his heritage until it became obvious as he grew. About one year after we adopted Ace, our first child was born. 3 kids later, and Ace has been pretty good with all of them although he is a bit grouchier now than he was when he was a puppy.

I'm not sure how old Ace will get - he's got some serious gray around the muzzle, many fatty tumors on his back, chest, legs, etc., and he's definitely not as nimble or energetic as he used to be. From what I understand, the average great danes life expectancy is under 10 years. Since Ace is a mixed breed, I imagine that he is expected to supersede that number.

So, what has this got to do with the title of the post? Well, the last year or so has seen Ace change his behavior under certain circumstances. Now, whenever it rains, he gets extremely scared. He will come upstairs when the rain starts and start knocking stuff down, making a huge racket. He will go into the bathroom and use his nose to life up the toilet seat and then let it come crashing down. When you try and comfort him, you can feel his whole body shaking. When this occurs at night, well now you know where the sleep deprivation fits in.

We talked to the veterinarian, and he gave us two pills to test out. This medication is called Clomicalm, and cost us $6 a pill! Gah! Doing a little detective work, I have found that a generic is available online, which would be significantly less expensive. Let's hope that our vet is willing to prescribe the generic and fax Ace's prescriptions to the online pharmacist - otherwise we are pretty screwed.

If any of you have any other suggestions, I am willing and ready to listen!