OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Postfix Archives: Re: some users local, rest of domain rerouted

Re: some users local, rest of domain rerouted via transport, how?


Subject: Re: some users local, rest of domain rerouted via transport, how?
From: Wietse Venema (wietseporcupine.org)
Date: Wed Jan 12 2000 - 19:41:01 CST


Rahul Dhesi:
> I want to have some addresses in a domain delivered locally and all
> other mail for that domain sent elsewhere via a transport table entry.

Specify:

        xxx.yyy.zzz magic
        axxx.yyy.zzz aaalocalhost
        xxx.yyy.zzz some.host

The magic requires that all users in xxx.yyy.zzz be matched by some
virtual domain entry. This strict enforcement did not exist before
19991231, so it is not stressed by older documentation.

But a better solution is possible.

Obviously, the Postfix virtual domain magic does not do what you
want here. It assumes this machine is final destination for the
domain. Perhaps it is cleaner to not pretend the local system is
final destination, and to do instead:

    /etc/postfix/main.cf
        relay_domains = xxx.yyy.zzz ....

    /etc/postfix/virtual
        axxx.yyy.zzz aaa

    /etc/postfix/transport
        xxx.yyy.zzz smtp:[some.host]

I am in thr process of re-vamping and unifying the virtual/transport
maps and this problem will go away. With the revised approach one
would say:

    /etc/postfix/main.cf
        relay_domains = xxx.yyy.zzz ....

    /etc/postfix/routing
        xxx.yyy.zzz smtp:[some.host]
        axxx.yyy.zzz aaa

And I may even be able to get rid of the stupid relay_domains
specification.

But that is future; what is here now will stay around for a while.

        Wietse

> Using postfix-19991231-pl02.
>
> Intent:
> deliver axxx.yyy.zzz to user aaa
> deliver bxxx.yyy.zzz to user bbb
> send anything else xxx.yyy.zzz to some other host
> local_recipient_maps lists aliases, unix:passwd.byname
>
> In transport:
> xxx.yyy.zzz smtp:[some.host]
>
> In virtual:
> xxx.yyy.zzz MAGICAL
> axxx.yyy.zzz aaa
> bxxx.yyy.zzz bbb
>
> The problem: mail arriving via smtp for arbitrary users xxx.yyy.zzz
> is rejected with 'Unknown user'.
>
> Can anybody suggest a good work-around, other than not defining
> local_recipient_maps?
>
> Rahul
>
>
>



This archive was generated by hypermail 2b27 : Wed Jan 12 2000 - 19:42:54 CST