Hi,

I have inherited an older postfix and sendmail system with a cyrus imapd. My plan now is to migrate that to a postfix 3.x MTA with a dovecot imap backend.
Pretty standard so far.

When trying to migrate the existing mail routing logic I did come accross certain rules which are working correctly on the old system but where I am having problems fitting them into the current address classes logic.

Local addresses are handled currently through a mailbox_transport = lmtp:private/dovecot-lmtp entry. This is working fine for addresses directed at hosts listed at mydestination.

I do have a handfull of users received mail via UUCP which I am handling as members relay domain class. These I have configured with a relay_domains lookup table containing full hostnames such as "foo.example.com OK" and a transport_maps entry of "foo.example.com uucp:foo". This too is working well. I also have a few FQDNs where the nexthop is a smtp server, where the setup is handled via relay_domains and transport_maps as well.

Where I am a bit unsure is how I want to handle the virtual addresses.
I do have a bunch of domains for which I want postfix to handle mail and deliver mainly to local users via lmtp to dovecot.

My initial plan was to use the virtual_alias_domains and virtual_alias_maps entries to ensure correct delivery for these addresses.
My routing rules here are as follows:
f...@bar.example.com -> foo
@bar.example.com -> bar
@foobar.example.com -> b...@example.com

99% of these target addresses/values are local accounts with no either no domain or example.com which is part of the mydestinations entry.
For these, traffic is correctly delivered.

My problem is, I do have a handful of domains where routing is very mixed.
I might have a catchall account @baz.example.com -> baz but I have _also_ a need to route the more specific b...@baz.example.com -> uucp:bar.

As far as I understand, the virtual_alias_maps will only do rewriting to local or remote addresses but disregard transport entries.

I would really prefer _not_ to create any workarounds where I redirect b...@baz.example.com to b...@bar.uucp.example.com which then is added to relay_domains and gets a transport entry. The existing setup seemed to be able to cope directly with the redirect to uucp rather than needing any workarounds.

Does anyone have a hint how to get this working correctly? Adding the domain to both virtual_domains and relay_domains seems to work but as far as I understand previous discussions here on the list this is a rather bad idea.

Cheers,
 Andreas

Reply via email to