I use XFMail as my main mail client, and like (I suspect) many other I used the
XFMail rules to sort incoming mail into different folders.

I recently started having to access my mail offsite via IMAP (a thousand
blessings on whoever included the setup instructions for imapd in the XFMail
IMAP help). I don't want to leave XFMail running permanantly on the main
machine just to sort the mail into folders, so I've knocked up a small Perl
script to convert XFMail rules into Procmail rules, as far as possible. In case
anybody else finds it useful, here it is.

Since it's only a quick hack to meet my needs, it isn't quite as complete as it
could be. Also, as it only converts the rules, incoming mail not handled by a
procmail rule is left in the system inbox (e.g./var/spool/main/user) instead of
going into the XFMail inbox. A rule to do that couldbe hardwired in if
necessary.

Notes:
- Only handles Incoming rules.
- Only handles 'case sensitive', 'modify message' and 'keep message' flags.
- Does not handle 'Respond'. It could be done. Tricky to do exactly as
  archimedes does it. More work than I feel like right now.
- 'Forward' just does a  'Resend'. It could be done as archimedes, but it's
  again more effort than I feel like right now.
- A running archimedes won't notice delivery into a folder. You need to
  switch to the folder or do a "Rescan all'.
- archimedes headers (e.g. X-Face) don't appear on forwarded or resent
  messages.

Suggestions/fixes/etc. welcome.
-- 
Jim Hague - jim.hague@insignia.com (Work), jim.hague@acm.org (Play)
Never trust a computer you can't lift.
