On 09/29/2010 12:13 AM, Jonathan Thorpe wrote:
Hi All,
I am looking to migrate from an old Sendmail configuration to Postfix for
secondary mail. The environment services hundreds of domains.
The current configuration on Sendmail works as follows:
1. There are two mail servers - mx1 and mx2.
2. For any service that has mailboxes, mx1 is configured as the primary.
3. For any service that does not contain mailboxes has mx2 defined as the
primary.
4. Alias and Mailbox mappings are stored in a MySQL database.
This approach has served well for the past 6 years, but the current
infrastructure is becoming difficult to maintain and since we have standardised
on Postfix elsewhere, it seems a logical choice to move this environment to
Postfix as well.
Both mx1 and mx2 have a consistent view of the database containing aliases. On
Sendmail, the system considers the MX priority when making a decision of
whether or not to try and process the alias or relay it to the better suited MX.
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.
That's not how postfix works; since it will usually itself be the final
destination for received mail, why would it look up MX records for
domains it handles ?
What happens to any message is dependent on the address class the
message falls into: local, relay, virtual alias, virtual mailbox, or
internet.
Each of these address classes can be specified very narrowly - or as
broad as you like.
Configure mx1 to have those hundreds of domains in virtual_mailbox_maps,
and they will be delivered; postfix will never consider MX records
because the domains fall in the virtual mailbox class.
Configure mx2 to have those domains in relay_domains; this WILL do an MX
lookup and deliver to the highest priority one, because you put the
domains in the relay class.
--
J.