[lug] Splitting mail file

Sean Reifschneider jafo at tummy.com
Sat Aug 25 22:07:51 MDT 2001


On Fri, Aug 24, 2001 at 11:12:49AM -0600, Ken Weinert wrote:
>Any know of any utilities off hand that will take a mail spool and split
>it so that each message gets put into its own file?

The "formail" program will take an mbox on input and run a program or
command for every message, redirecting the message to stdin of that
program.  Works delightfully.  Then you just have to create a script that
increments a number and cats stdin to that file.  I've done that in the
past.

Formail has some other very delightful things in it too...

Sean
-- 
 Follow your dreams.  Unless it's the one where you're at work in your
 underwear during a fire drill.
Sean Reifschneider, Inimitably Superfluous <jafo at tummy.com>
tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python



More information about the LUG mailing list