On 02/11/2011 09:25 AM, Pieter Steyn wrote:
Hi,

We currently have mail infrastructure setup like:

mail.domain.co.za (primary in our dc)
ptamail.domain.co.za (pta office)
jhbmail.domain.co.za (jhb office)

Currently we use mail.domain.co.za as the outgoing server for all
users, but I want to change that so that user will use
$branchmail.domain.co.za as outgoing per branch to save on bandwidth.

Doing that, and then sending a mail from ptau...@domain.co.za to
jhbu...@domain.co.za results in:

Message sending failed since the following recipients were rejected by
the server: jhbu...@domain.co.za (The server responded: ": Recipient
address rejected: User unknown in local recipient table" This is a
temporary failure. You may try again later.)

Which makes sense as jhbuser only exists on jhbmail.domain.co.za as a
user account.

mail.domain.co.za knows about all accounts via the aliases file.
How can I configure postfix on ptamail.co.za to relay mail through
mail.domain.co.za only when the user is not found locally?

You can clone the alias files from the other branches into a relay_recipient_maps file:

jhbuser1@domain    jhbuser1@jhb.domain
ptauser1@domain    ptauser1@pta.domain

And add the branch domains to relay_domains.

This will cause mail for these aliases to be re-routed to the respective branch office.

Conversely, you can add mappings for aliases in the other branch offices to each branch office's setup, and direct mail to the right mail server.

It would be most flexible to do this in a mesh for all offices IN all offices, but it comes with the most maintenance as well.

If connectivity between the offices is reliable, you can opt instead to use a centralized database of users and destinations.


I've tried simply setting:

fallback_transport = mail.domain.co.za

fallback_transport means "use this route if other routes are not functional". This is unrelated to sepcific recipients; it only deals in mail destinations (i.e. is the server alive or not)

In the absence of alias mapping to distinct destinations, postfix can only assume that ptauser@domain should be handled by the system responsible for "domain", with the above result.

But it doesn't take effect, perhaps something else is taking
precedence and I need to do more configuration?  Perhaps there is
another way to do this instead?


Per-server mapping of recipients to destination, or a centralized database.

--
J.

Reply via email to