Drew Derbyshire:
> I've got a postfix server running which accepts several domains on it's
> primary smtpd (kew.com, *.wild.kew.com, thinfilmmfg.com,
> *.wild.thinfilmmfg.com, ...), all protected by the usual (and some
> unusual) SPAM filters. Life is good.
>
> I'd like to set up a secondary smtpd on a second IP address with it's
> own MX record which accepts mail for an additional domain
> (*.bff.kew.com) with fewer checks, but does NOT accept mail for the
> other domains listed above. I did a master.cf like this, but it accepts
> the wrong (original) domains defined in main.cf and the virtual domains
> configuration:
The problem is that the distinction between domain classes
(mydestination, relay_domains, virtual_alias_domains,
virtual_mailbox_domains) is made by the trivial-rewrite daemon.
Now you could in theory do things like
/etc/postfix/main.cf
bff-virtual_alias_maps = whatever
# no .domain.example magic for virtual alias domains!
bff-virtual_alias_domains = bff.kew.com, xxx.bff.com, yyy.bff.com
/etc/postfix/master.cf
1.2.3.4:smtp inet ... ... ... ... smtpd
-o rewrite_service_name=bff-trivial-rewrite
-o mydestination=
-o relay_domains=
-o virtual_alias_maps=$bff-virtual_alias_maps
-o virtual_alias_domains=$bff-virtual_alias_domains
-o virtual_mailbox_domains=
bff-trivial-rewrite unix ... ... ... trivial-rewrite
-o mydestination=
-o relay_domains=
-o virtual_alias_maps=$bff-virtual_alias_maps
-o virtual_alias_domains=$bff-virtual_alias_domains
-o virtual_mailbox_domains=
but things get complicated quickly.
Wietse