- To: James Gray <james@xxxxxxxxxxxxxxxx>
- Subject: Re: [SLUG] Paging IMAP gurus
- From: Steve Kowalik <steven@xxxxxxxxxxxxxxx>
- Date: Sat, 05 Aug 2006 18:41:01 +1000
- Cc: SLUG List <slug@xxxxxxxxxxx>
- User-agent: Wanderlust/2.14.0 (Africa) XEmacs/21.4 (Social Property)
On Sat, 5 Aug 2006 10:44:45 +1000, James Gray uttered
> I'm running a Courier IMAP server with Postfix MTA for my own
> personal network (with a handful of POP3 users). The problem is that
> I often use different mail clients. Some support automatic archiving
> (deleting), others don't. So it got me thinking about server-side
> solutions.
>
We do this at $WORK, where we run a Perl script every 3 months that
kills mail that is older than 100 days. If you're familar with Perl,
just use Mail::IMAPClient, login, search for mail and then delete
it. It still uses a client, but it's a local client.
> Basically I'd like to run a script once a day that churns through my
> personal IMAP folders and removes messages older than X days. Some
> folders I want to expire after 7 days, others 3 weeks, others 3
> months. I've already written the script to identify the messages but
> currently just lists them. Given that my IMAP store is maildir, is
> there any problem with simply deleting the messages straight from the
> maildir? Or is there some sort of referential integrity checking
> that I need to maintain within maildir?
>
I'd suggest that you don't delete stuff from the Maildir directly, not
because of Maildir referential integrity, but because Courier might
well store stuff in the Maildir.
--
Steve
If it (dieting) was like a real time strategy game, I'd have loaded a save
game from ten years ago.
- Greg, Columbia Internet