On Thu, Apr 30, 2015 at 10:20:08AM +1100, J?r?me Alet wrote:
> In Backend2's main.cf :
>
> --- CUT ---
> fallback_transport = relay:[Server1-IP]
> local_recipient_maps =
> --- CUT ---
>
> In Backend2's virtual-ldap.cf (used in virtual_maps), I've modified the
> LDAP filter to only return migrated users, instead of all users in our
> LDAP tree.
>
> No change on Server1 besides the transport map for each migrated user.
>
> This way mails received on Server1 for non migrated users still go to
> Backend1, but go to Backend2 for migrated users.
This contradicts the requirement you posted in your original message:
But now we want 'newuser' to use Backend2 as his SMTP server to
authenticate and send messages to anywhere.
In particular we want that messages from "newuser <at> example.com"
(migrated to Backend2) to "anyone <at> example.com" (not migrated
yet from Backend1 to Backend2) still pass through Server1. In
fact, even a message from "newuser <at> example.com" to "newuser
<at> example.com" should still pass through Server1.
The configuration you describe DOES NOT send mail from
<[email protected]> to <[email protected]> via Server1, it is
delivered locally on Backend2.
If you change the requirements, you can indeed deploy alternative
solutions.
--
Viktor.