The last configuration we’ll consider is hosting virtual domains with a system using a proprietary message store. To work with these systems, Postfix hands off messages using a protocol like LMTP, letting the proprietary system handle delivery to the correct mail box.
Since Postfix must receive messages before handing them off to the
LMTP server, it has to know that it should accept mail for each of the
virtual domains. List them in
virtual_mailbox_domains = ora.com, oreilly.com
You also have to list each email address, so Postfix can accept
messages for valid addresses and reject unknown users. Use the
virtual_mailbox_maps parameter to point to a lookup file with valid
virtual_mailbox_maps = hash:/etc/postfix/virtual
In the /etc/postfix/virtual file, the righthand value isn’t used because all messages are passed along to the POP/IMAP server. You must still include a righthand value because lookup tables must have a key and a value, but the value you use doesn’t matter:
email@example.com General Information Address firstname.lastname@example.org General Information Address
In order to have Postfix pass mail for virtual domains through to
your POP/IMAP server, specify the correct transport in the
virtual_transport parameter in main.cf. You have to know how your LMTP
server socket is set up. Assuming it’s on the same host as
Postfix and uses a socket file located at /var/imap/socket/lmtp, the transport lookup table for the example domains looks ...