At 20:12 2001-10-31 -0800, Harry Putnam wrote:
I've processed news or other one file per message format stuff with
procmail before by inserting a "From " line at the top and feeding to
procmail like a spool. It works and is handy.
However I've wondered a time or two if there is something internal in
procmail that can be easily hacked to make it accept a regexp for
first line of message identification.
Hmm, perhaps you're confusing procmail and formail. procmail operates on
individual messages, not mail spools. If you have a mailbox with multiple
messages in it, you need to use formail to "burst" these into individual
messages to pass to procmail, one message at a time.
If you are emitting the news messages on a per-message basis (say, by
launching procmail from your newsreader for selected messages), just
passing them through formail should automatically add the From line. If
you wanted to pass them directly to procmail, procmail shouldn't care,
though if your delivery rules are putting them into a mailbox format, the
"From " separator will be necessary.
trn has an option (in fact, it automatically prompts when creating a new
file) to save in either mailbox or a standard news format. Other
newsreaders probably have similar options, and if yours doesn't, perhaps
you should consider switching to one that does... The mailbox format
INCLUDES the necessary "From " header automatically. trn's non-mailbox
format includes an "article " header above the Path: header, and would
probably mess with your day anyway. I suggest you check what save options
are available in your newsreader.
Since formail and procmail are distributed as source, if you really want to
change your copy of formail (perhaps rename it to "fornews" or "newsmail"
?) to burst an alternate format, it's all right there. This is only
necessary if you're going to process a mailbox-like file consisting of
unfixed nntp messages -- if you intend to pipe individual messages through
formail anyway, the fixup it'll perform anyway will resolve your problem...
Maybe something that would include the NNTP header:
"Path: "
A line that occurs at the top of nntp messages.
And even if there is a way for procmail to process the one file per
message format without me having to spoolify it.
I don't follow your "spoolify" bit here. What exactly are you doing to
accomplish this now?
---
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail