postfix ignoring -o myhostname/mydestination for smtpd instance in master.cf?

View: New views
2 Messages — Rating Filter:   Alert me  

postfix ignoring -o myhostname/mydestination for smtpd instance in master.cf?

by Wolfram Schlich :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
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@..., but it doesn't
(relay access denied).

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).

Interestingly, when I try to send mail for unix-user@...
to the smtpd on 2.2.2.2, it gets rejected with the message
"Recipient address rejected: User unknown in local recipient table",
so it *somehow* seems to honor the mydestination parameter...

When I set -o myhostname=main.example.com for the smtpd on 2.2.2.2,
it accepts mail addressed to unix-user@....

I fail to find out why it doesn't accept mail for
unix-user@... :(

Ideas, anyone?

Thanks,
Wolfram

Re: postfix ignoring -o myhostname/mydestination for smtpd instance in master.cf?

by Victor Duchovni :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
> 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@..., 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@...?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.