Subject: Re: Novice procmail question...

From: [email-masked] (David W. Tamkin)
Date: Thu, 14 Jul 1994 21:58:56 -0500 (CDT)

Scott Buckley asked,

| I would like to run procmail manually to extract all
| mail from a large mailbox-format file, which contains mail from
| many different sources.  The files which I want to extract from
| the "inbox" file  originated from the following mailing list:
| 
| [email-masked]
| 
| The file which contains the unwanted mail is called
| 'inbox.mbox'; it is in mailbox format.
| 
| What is the best way to invoke procmail from the user prompt?

formail -s procmail < inbox.mbox

Note that inbox.mbox itself will not be changed by that command.

| What do I put in my .procmailrc?

That depends on how one identifies mail from that list.  By a From_ header,
or From:, or To: or Cc :, or Resent-From:, for examples?

In this special case, since mail remains safe in inbox.mbox, there is no
reason for procmail to keep mail that isn't from that list: the copy already
in inbox.mbox is enough.

Therefore the rcfile for this special use could say something like this:

 ::
 * (^TO|From.*)[email-masked]
 name_of_folder

 HOST=delete # only when reprocessing mail you've already received

That isn't the sort of rcfile you'd want to use when you're invoking procmail
via your .forward, though, because it would lose all mail that ISN'T from
that list.  It would work if you left out the assignment of HOST, though.

David W. Tamkin  P. O. Box 3284  Skokie IL  60076-6284
[email-masked]   MCI Mail: 426-1818   +1 312 714 5610