On 6/28/2012 10:54 AM, James B. Byrne wrote: > Given that on the final delivery host we treat ALL of our domains, > real and virtual, as virtual for the purposes of email; > > And the final delivery host is NOT listed as MX for any domain; > > And we are using cyrus-imap; > > And we take the virtual_mailbox_domains approach. > > Then the virtual(8) transport should not be used;
well, will not be used. You're defining a different virtual_transport. > And the cyrus transport in master.cf should not be configured; Optional, but probably not. > And the lmtp agent should be used for mailbox_transport; No. mailbox_transport is not used with virtual mailbox domains; only with local domains. > And the lmtp agent should be used for virtual_transport. Yes. virtual_transport = lmtp:unix:/some/path/socket or virtual_transport = lmtp:inet:127.0.0.1:port > > And for each domain that we intend to receive mail we need place > entries for in the virtual_mailbox_domains map that look like this: > > example.com -na- Yes. > .example.com -na- Only needed if you need to accept mail for all subdomains *.example.com. Generally not a good idea. > > And for each address we intend to accept messages we need place > entries in the virtual_mailbox_maps map that look like this: > > someu...@example.com -na- > some.u...@example.com -na- Yes. > And in virtual_aliases_maps those entries in virtual_mailbox_maps need > be mapped to actual delivery points that cyrus-imapd recognizes: Actual user->mailbox mapping is done is cyrus. Postfix neither uses nor needs to know this information, only that the user exists. However, it is possible -- and desirable -- to share the cyrus delivery table between postfix and cyrus if the table happens to be in a format postfix can use. > And nothing should appear in virtual_alias_domains; > And nothing should appear in relay_domains; Yes and yes. > And mydestination should only contain: > > mydestination = $myhostname, localhost.$mydomain, localhost $myhostname doens't belong here if it conflicts with virtual_mailbox_domains. These local domains will be mostly unused except for maybe some system role accounts such as root, cron, etc. Or you might alias those elsewhere and leave mydestination empty. > Q. Which parts do I still have confused? You're making progress. > Q. It is not clear to me from the documentation as to whether or not > virtual_aliases supports the :include:, |, and / constructs of > alias_maps. Does it? No. Includes and pipe-to-command are features of the local(8) delivery agent. > > Q. Given the contents of $mydestination, alias_maps is only used for > locally generated mail correct? Alias_maps is only used by local(8), which implies domains listed in mydestination. > > It seems that virtual_mailbox_maps essentially duplicates the keys of > virtual_alias_maps. Users listed in virtual_mailbox_maps should not be duplicated in virtual_alias_maps. It is not necessary to list recipients in more than one place. > > Q. Is there any case where the keys in the first would not align in > 1:1 correspondence with those in the second? Again, there is no need to duplicate entries. > > Q. Could virtual_alias_maps and virtual_mailbox_maps point to the > same map file? There is no need for that. Typically virtual_alias_maps would be only aliases that cyrus doesn't know about, and all valid cyrus recipients listed in virtual_mailbox_maps. -- Noel Jones