procmail
[Top] [All Lists]

Re: Correcting return-path

2006-06-13 02:02:02
On Mon, Jun 12, 2006 at 05:35:21PM -0700, Mike wrote:

I've been using procmail to forward messages that match certain
criteria to my cell phone.  The only issue I have is that the
From: address that is displayed on the phone is always *my*
address.  I'm trying to find a way to show the *real* sender.

What does the recipe look like that you hav been using?

Typical forwards with

   ! forward(_at_)me

on the action line should retain the original sender.

Okay, the envelope-from shows you, but that's as it should be.
You are the envelope-from.  When you see new messages on your
cell or wherever, they ought to be showing you what's in the
From: line, though.  That's what I see when I run /usr/local/bin/frm
on such a message.

So I'm thinking I need something like this:


    :0
    * ()/\^From: +\/.*
    {
       FROM = $MATCH
    }

    :0 c
    * ^Subject.*Help!!!
      | /usr/bin/sendmail -t -f$FROM

This does not work however.  I'm assuming that the format of FROM
is not correct for the -f flag as it includes the name etc(?).

When you say "does not work," what, exactly, does that mean?
Does the message get forwarded?  Is the From_ line changed at all?

What you probably want to be feeding sendmail is the -f switch.
Oh, okay, I just saw your -f stuck up against $FROM.  Missed that the
first time.  I have a recipe that has this in it:

  | "$SENDMAIL" $SENDMAILFLAGS -f "$SENDER" -t

and that works.  Whether the -f switch works for you is going to depend
on your system and host settings.  Test it on the command line to see!

dman

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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