[Dovecot] Looking for IMAP maintenance tools
Hi
I'm currently prowling for some IMAP tools to help me maintain our mailboxes. I'd prefer "pure" IMAP, i.e. no messing with file system directly, but would settle for more crude ways if need be.
Specifically I am looking for:
- Expunge tool: Outlook does not seem to auto-expunge messages in any way shape or form. So I'd like to run a daily cron to expunge all mailboxes.
- Quota helper: Some way to send a warning email once a day or so, saying "you're close to your quota limit, please delete some mail" or somesuch
Granted, I could write these two from scratch - but why reinvent the wheel?
Thanks Jen
--On Tuesday, January 30, 2007 3:47 PM -0700 Jens Knoell jens@surefoot.com wrote:
I'm currently prowling for some IMAP tools to help me maintain our mailboxes. I'd prefer "pure" IMAP, i.e. no messing with file system directly, but would settle for more crude ways if need be.
UW-IMAP came with a utility called mailtool that did that kind of thing. I recall that it could move messages around, but don't recall what, if any, other features it offered. It connected via IMAP to do its work.
Kenneth Porter wrote:
--On Tuesday, January 30, 2007 3:47 PM -0700 Jens Knoell jens@surefoot.com wrote:
I'm currently prowling for some IMAP tools to help me maintain our mailboxes. I'd prefer "pure" IMAP, i.e. no messing with file system directly, but would settle for more crude ways if need be.
UW-IMAP came with a utility called mailtool that did that kind of thing. I recall that it could move messages around, but don't recall what, if any, other features it offered. It connected via IMAP to do its work.
Yes, we use it for pruning trash and spam folders, something like:
#! /bin/sh
LASTWEEK=/usr/bin/perl -e 'use POSIX; print (strftime "%d-%h-%Y", localtime (time - 7*24*60*60));'
for trash in <path to folders>/*/mail/Trash; do mailutil prune $trash "Before $LASTWEEK" done
The only downside is it may well rewrite the UIDVALIDITY which will cause Dovecot to re-index (and the user will fail to open the folder once). You could use an (UW c-client) IMAP path instead of "$trash", I think, especially if you can have a master user (as in Dovecot). This wouldn't have the UIDVALIDITY issue as all the rewriting is done by Dovecot. Something like "{<imap host>/notls/user=<username>*<masteruser>}mail/trash" (but I've not tested it).
We also have a script that e-mails those over quota, using "find" on the imap server itself.
Best Wishes, Chris
-- --+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+- Christopher Wakelin, c.d.wakelin@reading.ac.uk IT Services Centre, The University of Reading, Tel: +44 (0)118 378 8439 Whiteknights, Reading, RG6 2AF, UK Fax: +44 (0)118 975 3094
Jens Knoell wrote:
Hi
Hi Jens,
I'm currently prowling for some IMAP tools to help me maintain our mailboxes. I'd prefer "pure" IMAP, i.e. no messing with file system directly, but would settle for more crude ways if need be.
Specifically I am looking for:
- Expunge tool: Outlook does not seem to auto-expunge messages in any way shape or form. So I'd like to run a daily cron to expunge all mailboxes. - Quota helper: Some way to send a warning email once a day or so, saying "you're close to your quota limit, please delete some mail" or somesuch
If you use Maildirs, you can use maildrop as your delivery agent, and use its '-w' option which will place a warning message into a user's mailbox when they are approaching their quota limit.
The cone mail client (written by the author of Courier-IMAP) comes with a tool called mailtool (I think that's the name, but the name's not important). It's a full-featured IMAP client which you may be able to use against your Dovecot server to do a nightly clean-up of old messages, for example. You'd probably need to use Dovecot's "master user" feature, so that you can log into any user's account using this command-line tool.
You can get both these packages from http://www.courier-mta.org/
-- Anand
I'm currently prowling for some IMAP tools to help me maintain our mailboxes. I'd prefer "pure" IMAP, i.e. no messing with file system directly, but would settle for more crude ways if need be.
the easiest way to do all of these IMHO is using perl modules. look on CPAN.org & search for IMAP or Maildir.
a+ scorch
participants (5)
-
Anand Buddhdev
-
Chris Wakelin
-
Jens Knoell
-
Kenneth Porter
-
scorch