era eriksson <era(_at_)iki(_dot_)fi> writes:
On 14 May 1999 16:21:30 -0700, Harry Putnam <reader(_at_)newsguy(_dot_)com>
wrote:
> And Eric's pages at:
> http://www.ling.helsinki.fi/users/reriksso/mail/procmail-debug.html
(Just a reminder to please use the "official" base URL -- this becomes
<http://www.iki.fi/era/mail/procmail-debug.html> -- since the above
Point taken
OOOPS.... overzealous ... newbie blundering .. no harm intended.
<For punishment...write Era's name correctly ten times>:
Era Era Era Era Era Era Era Era Era Era
Now, if apologies are accepted heres more questions: : )
Using a tmp setup I'm attempting to split messages from an archive
server (not the one for procmail list). Undigest them and sort by
date to mh style directories.
The messages have this format:
headers/body (2 lines) added by archive server
original message (missing ^From and ^Return-Path lines
final ^END----cut here ---- line
o From: apollo-list-request(_at_)redhat(_dot_)com
o Date: 15 May 1999 06:50:16 -0000
o To: reader(_at_)newsguy(_dot_)com
o In-Reply-To: <m3vhduubsi(_dot_)fsf(_at_)satellite(_dot_)local(_dot_)lan>
o X-Loop: apollo-list(_at_)redhat(_dot_)com
o Reply-To:
Please(_dot_)write(_dot_)a(_dot_)new(_dot_)mail(_dot_)instead(_dot_)of(_dot_)replying(_at_)FIRST(_dot_)WORD(_dot_)archive
o Subject: archive retrieval: latest/3598
o Precedence: bulk
o X-UIDL: e1fb4f9c70cb521fd22ba62a60ba0db5
o File: latest/3598
o BEGIN------------cut here-------------
Original headers start immediately below the ^BEGIN line but are not
in unix format. The "From " line and "Return-Path" lines are missing.
o Received: (qmail 11369 invoked from network); 19 Nov 1998 02:00:34 -0000
o Received: from mail.redhat.com (199.183.24.239)
o by lists.redhat.com with SMTP; 19 Nov 1998 02:00:34 -0000
o Received: from ds9.clubnet.net
(root(_at_)ont2-ppp122(_dot_)dial(_dot_)clubnet(_dot_)net
o +[206.126.141.122])
o by mail.redhat.com (8.8.7/8.8.7) with ESMTP id VAA13545
o for <apollo-list(_at_)redhat(_dot_)com>; Wed, 18 Nov 1998 21:00:32
-0500
*******8<snip rest of headers (more Received lines Date Subject etc)
******8< snip blank space and original body
o END--------------cut here-------------
I've been able to successfully undigest these messages and split to
month name folders with numbered files using this .procmailrc:
^^^^^^^^^^^^^^^^^^^^
##Remove stuff added by archive server
:0fhbwc
* Subject: archive retrieval: latest/[0-9]+
| sed -e '1,/BEGIN------------cut here-------------/d' \
-e '/END--------------cut here-------------/,$d' \
##Replace unix message format ('^From ' and '^Return-Path: ') lines
|awk 'BEGIN {"date"|getline;print "From
apollo-list-request(_at_)redhat(_dot_)com", $0 "\nReturn-Path:
<apollo-list-request(_at_)redhat(_dot_)com"};{print}'
##Split to mnth directories
:0a
* ^Date:.*Nov
mh/Nov/.
:0a
* ^Date:.*Dec
mh/Dec/.
***** 8<snip more mnths
^^^^^^^^^^^^^^^^^^^^^^^
This is working like I wanted but seems slow. I suspect I'm
making procmail do more work than is really needed. The incoming
messages total about 7MB and takes a couple of minutes to process.
(Pentium II 233---96MB RAM --OS=Redhat Linux 5.2)
Is that about normal? Or is there a better way to do this?