Archiving mail after a period of time

Tom 'Needs A Hat' Mitchell mitch48 at sbcglobal.net
Fri Apr 30 20:44:02 UTC 2004


On Wed, Apr 28, 2004 at 09:41:01PM +0100, Ed Jones wrote:

> 
> I'm running procmail to sort my incoming mail into different mailboxes
> (pretty much the standard use for procmail!).
> 
> I'd like to start archiving mail from these mailboxes after a certain period
> (perhaps a month). Obviously, I could simply write a cron script....

Has anyone tried  a procmail rule like this?

 WEEKFILE="/home/person/mail/Archive/`date +%y-%m-%V`-inlog"
 DUMMY=‘test -e ${WEEKFILE} || touch ${WEEKFILE}‘
 :0 c
 ${WEEKFILE}

Hmmm, It needs a directory test too.

I saw something like this in a Google posting and thought that using
"date" to generate useful file names for mail archives would do the
trick.

This does not compress them. But that is easy to do or perhaps
unwanted when burning them on a CDROM.  Uncompressed you should be
able to do simple stuff on the CDROM like grep and:

    mutt -f /mnt/cdrom/person/mail/Archive/04-04-18-inlog


-- 
	T o m  M i t c h e l l 
	/dev/null the ultimate in secure storage.





More information about the fedora-list mailing list