procmail
[Top] [All Lists]

Weird header

1997-06-12 17:31:00


I'm on a mailing list that sends out something once a day.  When it
comes in, it's needs to be reformatted and otherwise cleaned up a
little.  I've been doing it manually in the past, but decided to
automate the process since I send the finished copy to three other
people.

I've gotten everything working except the Subject: line.  I can
extract it without a problem, but when I'm done with the formatting,
the Subject: gets appended to the end of a rather cumbersome and
unwanted block of header, which is below the regular header.  My
question is, what am I doing wrong and what should be changed to allow
the header to be simply From:, Date: and Subject: ?

Below is the way it comes in to me, followed by the procmail script.  

----------------------------------

From batchman(_at_)dsp(_dot_)net  Thu Jun 12 07:09:50 1997
Received: (from batchman(_at_)localhost) by dsp.net (8.6.12/8.6.9) id HAA12734 
for batchman(_at_)dsp(_dot_)net; Thu, 12 Jun 1997 07:09:49 -0700
Date: Thu, 12 Jun 1997 07:09:48 -0700
From: Shoeless in San Jose <batchman(_at_)dsp(_dot_)net>
Message-Id: <199706121409(_dot_)HAA12734(_at_)dsp(_dot_)net>
Apparently-To: batchman(_at_)dsp(_dot_)net
Status: RO
X-Status: 

emout13.mail.aol.com (emout13.mx.aol.com [198.81.11.39]) by dsp.net
(8.6.12/8.6.9) with ESMTP id HAA12723 for <batchman(_at_)dsp(_dot_)net>; Thu, 12
Jun 1997 07:09:48 -0700 From:  Dpneumayer(_at_)aol(_dot_)com Received:  (from
root(_at_)localhost) by emout13.mail.aol.com (8.7.6/8.7.3/AOL-2.0.0) id
LAA10351; Thu, 12 Jun 1997 11:01:49 -0400 (EDT) Date:  Thu, 12 Jun
         1997 11:01:49 -0400 (EDT) Message-ID:
<970612110145_614625339(_at_)emout13(_dot_)mail(_dot_)aol(_dot_)com> 
MIME-Version:  1.0
Content-Type:  text/plain; charsetunknown-8bit
Content-Transfer-Encoding:  quoted-printable Apparently-To:
<batchman(_at_)dsp(_dot_)net> X-Loop:  batchman(_at_)dsp(_dot_)net Subject:  
Duckweed 151

<formatted text is included here as planned>

--------------------------------------

# PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:.
VERBOSE=ON
PATH=$HOME/bin:/usr/bin:/bin:/usr/local/bin:.
MAILDIR=$HOME/Mail/incoming    # You'd better make sure it exists
LOGFILE=$MAILDIR/log
DEFAULT=/var/spool/mail/batchman
LOCKFILE=$HOME/.lockmail
SHELL=/bin/sh

:0
* ^From: (_dot_)*Dpneumayer(_at_)aol\(_dot_)com
{
   SUBJECT=`formail -zx Subject:`
   :0
   |(formail -I"X-Loop: batchman(_at_)dsp(_dot_)net" -I"Subject: $SUBJECT")|\
   /usr/bin/sed -f $HOME/duck.1 |\
   /usr/bin/fmt -120 | /usr/bin/sed -f $HOME/duck.2 |\
   /usr/bin/fmt -70 | $SENDMAIL -oi -t <address1> <address2> <address3>
}

<Prev in Thread] Current Thread [Next in Thread>
  • Weird header, Shoeless in San Jose <=