procmail
[Top] [All Lists]

Re: why dead.letter?

1996-08-15 10:57:17
    > This recipe generates a dead.letter file every time it runs.
    > Is there some way I can stop it from doing that?  

Sure.  Make sure that it gets delivered.

    > It must be connected with the WHOSENT business, which I only added
    > because I didn't know how else to end the recipe (how to make it
    > mail the letter).

The recipe seems conditional on "old-listname".  Does mail get delivered
normally if addressed to other than "old-listname"?

    > What this does is notify the people who are still using an
    > old list name/list address that the address has changed.
    > 
    > 
    > :0
    > * ^TOold-listname
    > * !X-Loop: $LOGNAME(_at_)$HOST
    >   {
    >   WHOSENT=`formail -xFrom:`;

Trying to use "From:" to discover who sent the mail is not very
reliable.  It works, mostly.  Try using this recipe fragment for greater
reliability:

    WHOSENT=`formail -rtzxTo:`

Formail -rt generates a reply header, using all available information in
the original mail message.  The "zx" options extract the value of the
resulting "To:" header, which is the "best" reply address.

    >   # preface the quoted message with the address-change note
    >   
    >   :0fb
    >   |(cat $HOME/address.change; sed -e 's/^/\> /')

It is not necessary to parenthesize the expression; this will work:

    :0fb
    | cat $HOME/address.change; sed -e 's/^/> /'

    >   # add subject line
    >   
    >   :0fh
    >   |formail -r -I"Subject: LISTNAME AUTO-REPLY (address has changed)"
    > \
    >     -I"X-Loop: $LOGNAME(_at_)$HOST"; 

This generates a reply message (-r), and inserts a subject.

    >   # mail the damn thing
    > 
    >   :0
    >   ! $WHOSENT
    >   }

Since the headers are now setup for a reply, why not use them?

    :0
    ! -t

If you still have trouble understanding why the recipes fail, try
setting VERBOSE at the beginning of the recipe file:

    VERBOSE=yes
    LOGABSTRACT=all

G'luck.

Alan

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