On Tue, Dec 23, 2014 at 9:45 AM, Viktor Dukhovni <postfix-us...@dukhovni.org
> wrote:

> On Tue, Dec 23, 2014 at 12:39:52PM -0500, Wietse Venema wrote:
>
> > > I'm using virtual aliases. Wouldn't that cause message to be handed
> off to
> > > virtual_mailbox or mailbox_transport?
> >
> > The routing depends on the recipient address, after optional
> > address rewriting.
> >
> > In your case it would be sufficient to have a transport_maps
> > entry with:
> >
> > final_recipi...@example.com   lmtp:
>
> Perhaps better (includes recipient validation):
>
>     main.cf:
>         mydestination =
>         virtual_mailbox_domains = example.com
>         indexed = ${default_database_type}:${config_directory}/
>         virtual_mailbox_maps = ${indexed}virtual_users
>         # Adjust LMTP nexthop to taste.
>         virtual_transport = lmtp:inet:imap.example.com:24
>
>     virtual_users:
>         # When virtual_transport is not virtual(8),
>         # RHS is ignored, but must be present.
>         #
>         final_recipi...@example.com     virtual


After reading all of this I'm beginning to think I've never had this setup
correctly in the first place, but perhaps taking advantage of some loophole
in the configuration where things just happened to work.

I am only really using virtual_alias_domains and virtual_alias_maps since
I'm passing off to lmtp which goes to cyrus on another machine. I always
thought that to use virtual_mailbox_maps, you had to have a physical user
and mailbox file on the system like dovecot. I'm just taking an email
addresses for our various domains and rewriting the single-domain mailbox
names (e.g. st...@company.com and st...@home.com rewritten to
st...@4test.net which is the only domain on the cyrus box). I always used
mailbox_transport instead of virtual_transport as I thought the latter was
for virtual_mailbox_maps only. From your explanation, it appears as though
virtual_mailbox_maps could be used in my case too.

Steve

Reply via email to