spf-discuss
[Top] [All Lists]

Re: SRS and secondary MX

2004-03-18 16:39:29
----- Original Message -----
From: "Stuart D. Gathman" <stuart(_at_)bmsi(_dot_)com>
To: <spf-discuss(_at_)v2(_dot_)listbox(_dot_)com>
Sent: Thursday, March 18, 2004 9:57 PM
Subject: [spf-discuss] SRS and secondary MX

Hello Stuart,

One of the mail servers I have installed SRS on is a secondary MX server
for several domains (using the scripts provided by Mark translated to
Python). It is SRS encoding all mail that passes through
the machine. It should not SRS encode mail that is simply getting
relayed. But the map script doesn't have any way of knowing since it
doesn't know the recipient.

The env2srs script was not designed to work with relay stations in mind.
That is not to say it cannot become aware. :) Parsing the recipent to the
"local info" section, will not work:

    Kmake_srs program /etc/scripts/envfrom2srs.pl $u

As these K maps are created at start-up only. But the recipient ($u) can be
parsed, dynamically, at EnvFromSMTP. Like so:

R$*    $: $(make_srs $&u $1 $)

Since the K map call passes both as a single variable, we need to make a
small adjustment to the env2srs script as well:

    my ($recipient, $old_address) = split (/ /, $ARGV[0], 2);

Now the env2srs script will know the recipient; and, based on that
knowledge, a decision can be made on whether to do SRS envelope
translation, or not.

I hope that helps.

Cheers,

- Mark

        System Administrator Asarian-host.org

---
"If you were supposed to understand it,
we wouldn't call it code." - FedEx


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