[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Filtering an existing mbox with procmail



On Mon, Apr 23, 2007 at 06:02:45PM +0200, Klaus Wacker wrote:
> > In clear, I want be able to make something like:
> > procmail .procmail/debian-list.rc Mail/inbox
> > 
> > where debian-list;rc is the filter rule and inbox the inbox on which to
> > apply the filter.
> > 
> > Is that even possible using procmail? If yes, what options do I have to use?
> > 
> 
> Thats what formail is for. You probably want something like `formail -s
> procmail <Mail/inbox'. The -s stands for split. Formail calls procmail
> for each individual message.

that'd use ~/.procmailrc if any; if you want procmail to deliver as if msgs 
were from fetchmail, that's fine - though I'd rather set -Y:

% formail -s procmail -Y .procmail/debian-list.rc < Mail/inbox

assuming Mail/inbox is in mbox format, of course; if the *.rc is a generic
filtering recipes set, you may want to use the -m flag instead:

% formail -s procmail -m -Y .procmail/debian-list.rc < Mail/inbox

but me careful that debian-list.rc doesn't have a rule that delivers to
Mail/inbox ;)

--
paolo



Reply to: