procmail
[Top] [All Lists]

Re: Use procmail to split nntp messages

2001-11-01 12:09:42
Harry asked,

| 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.

Use formail -ds (or -des if not all articles end with blank lines) instead
of just -s.  formail's -d option is for splitting input when there won't
always be a leading From_ line for each component message.

| Maybe something that would include the NNTP header:
| "Path: "

formail -ds recognizes a hardcoded set of headers, and Path: is among them.

| And even if there is a way for procmail to process the one file per
| message format without me having to spoolify it.

List the filenames (or globbing patterns that match them) and cat the listed
names and patterns to a pipe to formail -ds, which is what you later posted
that you are already doing (except that you need to use the -d option).



_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>