Re: Mbox utiities?



On 2005-08-28, Martin Gregorie wrote:
> Are there any command line utilities that would allow the contents of Mbox
> mail boxes to be manipulated? Failing that, are there any C libraries or
> Java classes that would let me build such utilities?
>
> The aim is to periodically move older e-mails from Evolution subject
> folders into a central archive, keeping the subjects separate. This would
> preferably be handled by a cron job, hence my interest in command line
> utilities.

If the messages are already in files by subject, them all you need
is to mv or cp them (or cat them if you want to keep them in the same
file).

If you need to manipulate individual messages, use formail (from the
procmail package) to feed the individual message to your program or
script.

--
Chris F.A. Johnson <http://cfaj.freeshell.org>
==================================================================
Shell Scripting Recipes: A Problem-Solution Approach, 2005, Apress
<http://www.torfree.net/~chris/books/cfaj/ssr.html>
.