From: Victor Duchovni on
On Tue, Nov 03, 2009 at 11:04:21AM +0100, Wolfram Schlich wrote:

> Hi,
>
> let's assume the following setup:
>
> main.cf:
>
> myhostname = main.example.com
> mydestination = $myhostname
>
> master.cf
>
> ## 1st smtpd instance on 1.1.1.1
> 1.1.1.1:smtp inet n - n - - smtpd
>
> ## 2nd smtpd instance on 2.2.2.2
> 2.2.2.2:smtp inet n - n - - smtpd
> -o myhostname=master.example.com
>
> Nothing special is configured for virtual users,
> just local unix users.
>
> With this setup, I can send mail for unix-user(a)main.example.com
> to the smtpd on 1.1.1.1 without problems.
> I expect the smtpd on 2.2.2.2 to accept mails for
> unix-user(a)master.example.com, but it doesn't
> (relay access denied).

The "address class" of a domain is determined by trivial-rewrite(8)
(which is shared by all processes in a Postfix instance), not smtpd(8).

Changing "myhostname" in smtpd(8), just changes the banner, the default
SASL realm, and other minor settings.

> I also tried adding this to the smtpd on 2.2.2.2:
>
> -o mydestination=master.example.com
> -o relay_domains=
> -o relay_recipient_maps=
> -o virtual_maps=
> -o virtual_alias_domains=
> -o virtual_alias_maps=
> -o show_user_unknown_table_name=yes
> -o local_recipient_maps=proxy:unix:passwd.byname
> -o smtpd_client_restrictions=permit
> -o smtpd_helo_restrictions=permit
> -o smtpd_sender_restrictions=permit
> -o smtpd_recipient_restrictions=reject_unauth_destination
>
> No luck (relay access denied).

See above.

--
Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majordomo(a)postfix.org?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.