On Tue, Sep 28, 2010 at 10:13:52PM +0000, Jonathan Thorpe wrote:

> On my current minimal Postfix configuration, I seem to be having
> trouble getting this working. I'd like to be able to do the following:
>
> 1. Postfix first to look at the MX priority - if this server is the
> primary, then handle the virtual aliases accordingly.

Not possible. Virtual alias rewriting applies to all recipients on input,
when mail is stored in the Postfix queue.

Routing, MX lookups etc. happen on output.

Of course, local(8) aliases(5) happen on output and *are* specifically
Sendmail compatible. If a domain is listed in mydestination, it will be
subject to aliases(5) expansion locally, otherwise it is forwarded to
the right server.

If the aliases just replace one mailbox address with another, it should
not matter which host does the rewrite... Why is this important?

Virtual aliases does not support scripts, and so on, and if the tables
are the same on both hosts, why do you care where the expansion is done?

> 2. If the Postfix server is NOT the primary, then relay it to the most
> appropriate destination.

This is normal routing.

> 3. To prevent abuse of the permit_mx_backup, I'd like to consider
> the domains/aliases in the database with permit_mx_backup_networks to
> validate if this is a domain we should be relaying for.

I don't understand this.

Generally, permit_mx_backup is a very bad idea, transition away from
this will all possible haste.

> What seems to happen at the moment is:
> 1. Postfix looks at the virtual_alias_maps and attempts to handle the
> alias mapping rather than first looking at the MX priority.

As documented.

-- 
        Viktor.

Reply via email to