procmail
[Top] [All Lists]

Re: Cannot Find sed in Recipe

1997-07-17 18:13:00
    With the gracious assistance of one of the heavies on this list, I
am getting closer to getting this mail reflector recipe working.  Here
are the applicable parts of it so far:

    # Is this an eligible sender?
    # (Have sed temporarily reformat the user file for egrep)
    # (Note that placing "" across lines is deliberate)
    NL="
"
    :0 wc

----> *NOTE* that I added the c flag here (new)

    | egrep -is $WHOFROM $USERLIST
#   | sed "s/, /\\$NL/g" $USERLIST | egrep -is $WHOFROM

----> NOTE that for testing I took sed out altogether
----> and went with just one entry in $USERLIST

    # ===== begin eligible submitter block =====

    # Eligible submission: now reflect the mail
    # to all members of the group
    :0 a
    {

        # First append a copy of the message to the backup file
        :0 c:
        | gzip -9fc >> $MAILFILE

----> This got executed correctly, and the
----> message was stored in the archive

        # Get the incoming message-id
----> Some code skipped here which just picks off some header fields

        # Have formail format the message for recipients
        # (We call it  Precedence: list  merely as a convenience)
        :0 fw
        | formail -rz -I "Cc:"                       \
          -I "Reply-To: $FULLNAME"                   \
          -I "Subject: $THESUBJ"                     \
          -I "X-List: $GROUPNAME"                    \
          -I "X-Loop: $MY_ADDR"                      \
          -I "X-Info: Private Discussion Group Only" \
          -I "Precedence: list"                      \
          -I "Message-ID: $MID"                      \
          -I "Mime-Version: $MIMEVER"                \
          -I "Content-Type: $MIMETYPE"               \
          -I "Content-Transfer-Encoding: $MIMEXFER"  \
          -I "Errors-To: $MY_ADDR"                   \
          -I "Return-Receipt-To:"                    \
          -I "Resent-From: $FULLNAME"                \
          -I "Resent-Sender: $FULLNAME"              \
          -I "Organization: $GROUPORG"

        # Send the mail out to all
        :0 a
        ! `cat $USERLIST`

----> Message was sent out, but see below

        VERBOSE=$VERBOSITY
        LOGABSTRACT=$LOGGING

    }
    #   ===== end eligible submitter block =====


    # If not eligible, send back a nastygram and store a copy
    # for examination, thus terminating the outer recipe
----> This code block omitted in this post

So far things are starting to get peachy keen, except that the
transmitted (to myself) message had all the headers correct but 
no body!!!!!  I did not see anything distinctive in the log, but
here is the entire message as recieved:

From pobart(_at_)access(_dot_)digex(_dot_)net Thu Jul 17 20:20:09 1997
Received: (from pobart(_at_)localhost)
          by access5.digex.net (8.8.4/8.8.4)
          id UAA22150 for pobart(_at_)access(_dot_)digex(_dot_)net; Thu, 17 Jul 
1997 20:19:20 -0400 (EDT)
Resent-Date: Thu, 17 Jul 1997 20:19:20 -0400 (EDT)
Date: Thu, 17 Jul 1997 20:19:20 -0400 (EDT)
From: "Paul O. Bartlett" <pobart>
Resent-Message-Id: 
<199707180019(_dot_)UAA22150(_at_)access5(_dot_)digex(_dot_)net>
To: pobart(_at_)access(_dot_)digex(_dot_)net
References: 
<Pine(_dot_)SUN(_dot_)3(_dot_)96(_dot_)970717201855(_dot_)22125A-100000(_at_)access5(_dot_)digex(_dot_)net>
In-Reply-To: 
<Pine(_dot_)SUN(_dot_)3(_dot_)96(_dot_)970717201855(_dot_)22125A-100000(_at_)access5(_dot_)digex(_dot_)net>
Reply-To: glosa <pobart(_at_)access(_dot_)digex(_dot_)net>
Subject: Glosa List Test 28
X-List: glosa
X-Loop: pobart(_at_)access(_dot_)digex(_dot_)net
X-Info: Private Discussion Group Only
Precedence: list
Message-ID: 
<Pine(_dot_)SUN(_dot_)3(_dot_)96(_dot_)970717201855(_dot_)22125A-100000(_at_)access5(_dot_)digex(_dot_)net>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Transfer-Encoding: 
Errors-To: pobart(_at_)access(_dot_)digex(_dot_)net
Resent-From: glosa <pobart(_at_)access(_dot_)digex(_dot_)net>
Resent-Sender: glosa <pobart(_at_)access(_dot_)digex(_dot_)net>
Organization: GREGA_DICE_DE_GLOSA


Thanks again.
Paul                             <pobart(_at_)access(_dot_)digex(_dot_)net>
----------------------------------------------------------
Paul O. Bartlett, P.O. Box 857, Vienna, VA 22183-0857, USA
Finger, keyserver, or WWW for PGP 2.6.2 public key
Home Page:  http://www.access.digex.net/~pobart

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