Diasparsoft Logo Let's write software that people understand.

Home | Contact

Training

JUnit support

Outsourcing

The work that Diasparsoft did for us was outstanding. We are now using the software on a daily basis and their work could well have a dramatic impact on the Reds' organization in the near future.Cincinnati Reds Baseball Club.


Publications

Tips & Tricks

Diasparsoft Toolkit

What is Diaspar?

Interesting Bits RSS

Home » Archives » September 2004 » Revenge of popfile: Dude, where's my buckets?!

[Previous entry: "Names are important"] [Next entry: "File permissions and HTTPD"]

09/27/2004: "Revenge of popfile: Dude, where's my buckets?!"


I was a little hasty in announcing my triumphant installation of popfile on my laptop.

Symptom. Every so often, popfile stops running. It seems to happen when I reclassify e-mail to my spam bucket. When I restart popfile, all my configuration is gone!

Solution. Switch from SQLite 3 to SQLite 2. As this article clearly indicates, popfile 0.22 does not work with SQLite 3. For step-by-step instructions, read on.

When I installed all the perl modules upon which popfile depends, I upgraded SQLite to version 3, which was apparently an error in judgment. (How did I know?) Here is how I fixed the problem.

  1. Launch the perl CPAN shell. (perl -MCPAN -e shell)
  2. Install SQLite 2. (install DBD::SQLite2)
  3. Launch popfile so I could change its configuration. (perl popfile.pl)
  4. Navigate to the Advanced configuration screen in the popfile UI.
  5. Set bayes_connect to dbi:SQLite2:dbname=$dbname, which specifies SQLite 2 explicitly.
  6. Shut down popfile.
  7. Remove the popfile database. (rm popfile.db)
  8. Restart popfile.

Now for the test...

  1. Create a bucket named "spam".
  2. Check for mail. There's likely to be some spam in there.
  3. Reclassify a message as "spam".
  4. ASSERT that popfile is still running.

That's a good enough smoke test for now. Let's hope the thing actually works now! (You'll find out if it doesn't.)