Subject: Re: Sorting mail by date

From: Roman Czyborra <[email-masked]>
Date: Fri, 11 Mar 1994 00:23:20 +0100

>   Is there any way, using procmail, to sort a two years of mail in one
> file into individual files, each file containing one month's worth
> of mail?

formail < twoyears -s \
	gawk 'NR==1 {month =$4 $NF} {print >> month}'

Or if you don't have GAWK

formail < twoyears -s procmail /dev/null \
	DEFAULT='`awk "NR==1 {print \\$4 \\$NF}"`' LOGFILE=/dev/tty