Re: SRS implemenation in sendmail
Mark <[email protected]>
| Newsgroups | gmane.mail.spam.srs.general |
|---|---|
| Organization | Asarian-host |
| Message-ID | <[email protected]> |
Tom Lahti wrote: >>> --------------------------------------------------------- >>> SParseLocal=98 >>> >>> # always call reverse_srs >>> R$* $@ $(reverse_srs $1 $f $) >>> --------------------------------------------------------- >> >> I am pretty sure you did not test your code; $f needs to be >> dereferenced here, and should be written as $&f instead. > > I'm pretty sure I didn't either :) $&f does work quite a bit > better. However, it seems that this gets called twice for each > email; once for the SMTP envelope sender with $f empty, and a second > time with the recipient and envelope sender in the correct place. > Apparently, the envelope sender is passed through ParseLocal with $f > unset. I do not know why, or how to get around this, since having $f > empty is precisely what I'm looking for, so I can't use that as an > indicator that the the $old_address is in fact the sender and not the > recipient. I cannot corroborate this. I had srs2envtol log ptr, client_ip, env-from, and recipient; and, in both instances, $f remains defined. A mail sent over the internal network: SRS2ENVTOL: my-xp-machine.org, 192.168.5.3, [email protected], SRS0=JAJJYUm5=IT=asarian-host.net=admin<@asarian-host.net.> SRS2ENVTOL: my-xp-machine.org, 192.168.5.3, [email protected], SRS0=JAJJYUm5=IT=asarian-host.net=admin<@asarian-host.net.> And one coming from a remote location: SRS2ENVTOL: xs1.xs4all.nl, 194.109.21.2, [email protected], SRS0=JAJJYUm5=IT=asarian-host.net=admin<@asarian-host.net.> No problem with $f at all. I am curious how you tested your setup. - Mark System Administrator Asarian-host.org --- "If you were supposed to understand it, we wouldn't call it code." - FedEx