[TriLUG] procmail again

Jeremy Portzer jeremyp at pobox.com
Thu Mar 27 16:36:54 EST 2003


On Thu, 2003-03-27 at 16:20, Rodent of Unusual Size wrote:
> okey, procmail can slice my bread and toast it too.  presumably
> there's a way to get it to do what i want:
> 
> a bunch of mail has been delivered to an account before i set
> up forwarding.  it is now in an mbox file.  is there a way to
> feed the mbox file to procmail (or something else) so that it
> will get re-processed according to the .procmailrc file?
> 
> mbox format is *not* the same as the format received directly
> from sendmail.  i presume.

Correct, there are slight differences between what's in the mbox format
and the mail as received by procmail from sendmail.

Try the following command:
formail -s procmail < mboxfile

formail -s will split up the mbox format file into individual messages,
and pipe them to the given command, in this case, procmail.

I *think* that will work, though when I tried it, it didn't seem to
process the system-wide /etc/procmailrc so it didn't deliver exactly as
I expected.  But if you don't have anything special in /etc/procmailrc,
and your normal rules are in ~/.procmailrc, that should work fine.  I'd
suggest testing it with a small mbox first (make one with pine or mutt
or something).

Hope this helps,
Jeremy

-- 
/=====================================================================\
| Jeremy Portzer       jeremyp at pobox.com       trilug.org/~jeremy     |
| GPG Fingerprint: 712D 77C7 AB2D 2130 989F  E135 6F9F F7BC CC1A 7B92 |
\=====================================================================/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.trilug.org/pipermail/trilug/attachments/20030327/0a63c661/attachment.pgp>


More information about the TriLUG mailing list