procmail
[Top] [All Lists]

Re: Setting different FROM when using formail -rt ?

1997-10-10 19:22:41
Jari Aalto <jari(_dot_)aalto(_at_)ntc(_dot_)nokia(_dot_)com> wrote:
        I would like the "From" field say

                From: jari(_dot_)aalto(_at_)poboxes(_dot_)com

        instead of my current email address, where this virtual poboxes.com
        is currently pointing. Eg. Now the -rt says

People have responded with a simple way to do this, for a crude way to
set the reply address to reflect the To: address (useful for procmailrc's
that handle more than one address) look at this, which I created for a ping
toy and use for general blank mail bouncing:

        :0B
        * !...
        | (echo "From: $EnvelopeTo" ; \
          formail -r -A"Precedence: junk" \
          -A"X-Loop: qz.little-neck.ny.us" ; \
          echo "Your blank message was received." ; \
          echo "Did you mean to say something?" ; \
          echo "" ; echo "Elijah" ;  echo "------" ; \
          echo "this has been an automated response") | $SENDMAIL -t

The real trick involved is figuring out the $EnvelopeTo, it is not
shown here because the way I use is *not* portable to other systems.
But if you have procmail invoked as the local mailer by sendmail in
the usual way, you will probably find the envelope recipient in $1.

Elijah
------
I /dev/null dupes, no need to CC list posts.  It is not my responsibility to
prove to you my mail is not spam, if mail to you bounces it will not be resent.

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