I'm using Postfix 2.5.1 on Ubuntu Server x64 8.04 LTS. I am attempting
to use Postfix to relay non-local mail from my home network to ATT
U-verse's SMTP server at smtp.att.yahoo.com:465.

As recommended at the Postfix website (and elsewhere), I set up an
stunnel client connection from my server (on localhost:2525) to the
ATT server. Since ATT requires per-user authentication for outgoing
mail, I turned on sender-dependent authentication and created a
password map containing the authentication information for each user.
The map looks like this:

a...@att.net   a...@att.net:abcpassword
x...@att.net   x...@att.net:xyzpassword

I also have generic mapping turned on, with a generic map that looks like this:

a...@local.net   a...@att.net
b...@local.net   x...@att.net

Finally, I set Postfix's relayhost to [localhost]:2525.

So far, so good. Here's the problem: everything works fine when I
configure the From address in the user's e-mail client to the user's
ATT address, e.g., a...@att.net. When, however, I configure the From
address to the user's local address, e.g., a...@local.net, that address
doesn't get rewritten by the generic map. This causes authentication
to fail because the password map lookup, which uses the ATT address as
a key, fails. Whatever data Postfix returns for a failed password
lookup is sent to the ATT server, and it, of course, rejects the
authentication attempt.

I'm curious as to why the generic map isn't working for mail sent to
the relayhost. I suspect it has something to do with the fact that the
stunnel connection (on localhost) is within $mydestination, and,
hence, considered to be a local destination by the generic mapper
(even though its designated as the relayhost).

Also, I'm unclear about the order in which rewriting and password
lookup take place. My gut feeling is that rewriting occurs before the
lookup, so that the password lookup needs the ATT address as the key.

Any insight on these issues would be greatly appreciated.

TIA,
Jack Browning

Reply via email to