[Mailman-Users] pruning archives
pmb1 at york.ac.uk
Thu Jun 1 17:34:45 CEST 2006
--On 1 June 2006 09:02:15 -0400 Anne Ramey <anne.ramey at ncmail.net> wrote:
> Is this still the easiest way to prune archives? Seems rather labor
There are probably other utilities to do this task but the one that springs
to my mind is "mailutil" from the University of Washington (UW) IMAP
mailutil was originally designed to create mail folders in particular
storage formats, either locally or on a remote IMAP server.
However feeping creaturism added other facilities such as copying or moving
messages between any combination of local and/or remote folders.
Amongst these is the "prune" option which lets you prune a mail folder
based on a selection string. The selection string itself is given in the
format used by IMAP2's SEARCH command (RFC 117). [I actually suspect it
now supports IMAP4rev1's SEARCH command syntax (RFC 2060, section 6.4.4)
... if this is indeed different.]
The example given in mailutil's man page is:
mailutil prune INBOX "before 1-jan-2004"
Because mailutil is built using the UW C-Client library it understands a
great many different mail folder storage formats, and can certainly be used
on traditional UNIX/Berkeley/mbox formatted folders.
You can see the man page for mailutil (and the other IMAP utilities) at
Source code, and pre-built binaries for a number of platforms, for
C-Client, Pine, the IMAP server and IMAP utilities can be found at:
mailutil is in its imap/src/mail/utils directory.
Alternatively you can just get the IMAP server + C-Client source code at:
If I'm right in thinking this deletes messages from mail folders then you
might find it a very useful tool: its selection criteria are very flexible,
enabling you to select messages by date, sender, recipient, size,
read/unread status, etc
I have used mailutil to create mail folders and copy messages around,
but haven't yet tried its "prune" option. However I'm expecting it
If someone tries it perhaps they could report back to the list?
The Computing Service, University of York, Heslington, York Yo10 5DD, UK
* Unsolicited commercial e-mail is NOT welcome at this e-mail address. *
More information about the Mailman-Users