procmail
[Top] [All Lists]

Re: A rule to copy all message to a maildir, and then keep processing

2009-11-19 17:03:20
* Salvatore Iovene <salvatore(_at_)iovene(_dot_)com> [11-19-09 13:31]:

Thanks, yes, I want copies for archival.


then you might be more interested in:


# -------------------------------------------------------
:0 c
$MAILDIR/backup

:0 ic
| `find ~/mail/backup -maxdepth 1 -type f -name 'msg.*' -mtime +91 -delete`

### original recipe with # msgs adj
### | cd ~/mail/backup && rm -f dummy `ls -t msg.* | sed -e 1,7999d`
#
### alternate method from Dallman Ross <dman(_at_)nomotek(_dot_)com>
# when "Argument list too long" occurred
#
# | cd ~/mail/backup && |\
# rm -f dummy `find ~/mail/backup -maxdepth 1 -type f -name 'msg.*' |\
#             xargs -0 ls -t | tail +6001`
#
### and another
# `find ~/mail/backup -maxdepth 1 -type f -name 'msg.*' -mtime +31 -delete`
# -------------------------------------------------------


I keep three months of mail in a cache.  Note that this could be adjusted
to provide differing lengths of time for particular lists using multiple
caches.

I use mbox and search with mairix, fast and very handy once the syntax
becomes comfortable.

-- 
Patrick Shanahan         Plainfield, Indiana, USA        HOG # US1244711
http://wahoo.no-ip.org     Photo Album:  http://wahoo.no-ip.org/gallery2
Registered Linux User #207535                    @ http://counter.li.org
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail