PSE-L(_at_)mail(_dot_)professional(_dot_)org (Professional Software
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.
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
Yes, it is the combination of the two I actually use
My Mail/news reader "gnus" has an array of method to save messages.
No problem saving news as mail in several formats. I'm talking here
on a scale that doens't really fit that kind of technique.
I think I'm playing over my head here a bit..to boot. No doubt revealing the
true depths of my ignorance. Snipping your usefull commentary
Looks like I'm probably going about this all wrong and formail doesn't
need to be involved.
I'll try to describe an actual working example
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?
Here I meant feeding messages to the command below in a stream.
Without really understanding why this works or how it works, I've been
using a technique posted here long ago by Walter Dnes in May of 1999.
I don't still have all the message headers, or I'd cite the
What follows from here might best described as my own uninformed
Walter described a setup he used to test procmail recipes or other
procmail related experiments without messing up real mail. In basic
outline it consists of:
a working directory
a script to be called that deletes the results of experiments
a .procmailtestrc With the appropriate VARIABLES, so mail is `delivered'
to this test area. To give an example, a few of them might look like
(For simplicity, only one)
An example command looks like (wrapped for mail):
cat test_mbox_file| formail -e -s procmail -m \
`test_mbox_file' would be a spool file where I've saved mail in mbox
I wanted to do the same thing with news I have archived on disk.
Like splitting it to smaller directories by date or subject.
Its archived in one message per file, numbered file just as it came of
the nntp server.
So trying to emulate an nntp feed by adding the dot on a line by itself
and a blank line to each message and directing it at procmail/formail.
In my experiments I found that trying to send news thru without adding a
"From " line at the top, doesn't work.
(aside: Maybe my command line including formail is all wrong..)
(From a Newsarchive directory saved on disk)
cat 40 41 42 43|fix.news| formail -e -s procmail -m \
(Where `fix.news' adds only a dot by itself on a line and a blank line,
approximating what an nntp feed looks like)
Fails... It puts everthing into one message. The first one coming
thru. However if `fix.news' also adds a "From " line of the form
`From me(_at_)home Thu Nov 1 06:36:54 2001'
Then it all works. This led me to think procmail/formail depended on
that "From " line.
My posts here were attempting to find out about a better way to do
At some point maybe even to run a real nntp feed into procmail in real time.
procmail mailing list