procmail
[Top] [All Lists]

RE: procmail-formail-sendmail not spoofing From addr

2007-05-25 03:44:51
Bart Schaefer wrote on Sunday, May 20, 2007 6:26 PM:

On 5/19/07, matt(_at_)c3p0(_dot_)reverse(_dot_)net 
<matt(_at_)c3p0(_dot_)reverse(_dot_)net> wrote:

I wrote the following code for my .procmailrc file.  It mainly works 
fine, fowarding the body of the received "test(_at_)mydomain" msg to the 
new address after replacing the subject, but it will not spoof the 
"From:" or "Reply-To:" address.  Instead, it always shows as being 
from my main account.

My guess is that your $SENDMAIL is inserting a Sender: header 
and that the handheld device is choosing to show that address 
preferentially. If you can examine the full message header 
after the message has been re-sent, you should do so.

If that's the case, then Dallman is correct (except that I 
believe he has his sendmail option syntax wrong):  You're 
going to need

$SENDMAIL -oi -f test(_at_)resendingdomain mydevice(_at_)receivingdomain

Bart: what was wrong with my syntax?  I'm curious about what
you mean.  I had written

  | "$SENDMAIL" $SENDMAILFLAGS -f

The procmail default compile value for SENDMAILFLAGS is "-oi".
I've never found them to be otherwise on any of a dozen platforms
where I've looked, although obviously someone could make them
whatever he wanted them to be.

 12:33pm [~/Mail] 521[0]> vsnag.point-n-shoot.sh | grep FLAGS
 * SENDMAILFLAGS: -oi
 * SHELLFLAGS:   -c

The quotes are theoretically desirable around "$SENDMAIL" after
the pipe in case it contains whitespace, since it's being shunted
to the shell.  On the other hand, none are need around $SENDMAILFLAGS,
by my thinking, since if there were whitespace in that var,
it ouught still to be formatted correctly.  E.g.,

  SENDMAILFLAGS = "-o -i"

Indeed, if the flag were set that way and the quotes were used in
the arg to sendmail in the shell pipe, I think it would *fail*
to work right.  The space would be seen as an argument instead
of a space.

(I have not tested this now.  I may have tried testing it in the 
distant past.)

Dallman


____________________________________________________________
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