Re: How to remove messages from mbox based on relative date?
On Mon, Apr 23, 2001 at 06:05:07PM -0700, Mike Fedyk wrote:
> Hi,
>
> I have a .procmailrc and am filtering, but now I don't want to have to
> delete my messages when they get old in certain mbox files.
>
> Can I run procmail with another conf file and have it send messages with a
> "delivered" date older than N days? Is procmail even the right tool, I'm
> not so sure...
You can run procmail on existing mailbox if you use formail to split
the box into messages, for example,
mv mbox mbox.safe && cat mbox.safe | formail -ds procmail
You probably don't want to filter into and out of the same mailbox,
though; might produce an infinite loop or erase all your mails. I'm
not sure how you do 'older than' in procmail.
You can also use mutt's folder hooks. For example, I have
#
# Tag "old" messages in mailinglists for "expiring" them.
# Simply press "d", after entering one of the folders, iff mutt asks
# "tag-"
#
folder-hook =debian-user$ 'push T~r>2w\n\;' # 2 weeks
in my .muttrc, so when I switch to =debian-user and there are old
messages I see 'tag-' at the bottom of the screen and hit 'd' to
delete everything that's old. Note that with 'push' mutt can do just
about whatever you want.
Hope that helps.
Rob
--
You are here:
***
***
*********
*******
*****
***
*
But you're not all there.
Reply to: