Virtual Domains
The optional virtual table specifies redirections for local and non-local recipients or domains. The redirections are used by the cleanup(8) daemon. The redirections are recursive.

The virtual redirection is applied only to the recipient envelope address, and does not affect message headers. Think Sendmail rule set S0, if you like. Use canonical mapping to rewrite header and envelope addresses in general.

Typical support for a virtual domain looks like the following:

With this, the SMTP server accepts mail for virtual.domain and rejects mail for unknown@virtual.domain as undeliverable.

The format of the virtual table is as follows, mappings being tried in the order as listed here:

In all the above forms, when address has the form @otherdomain, the result is the same user in otherdomain. This works for the first address in the expansion only.

ADDRESS EXTENSION: When the search fails, and the address localpart contains the optional recipient delimiter (e.g., user+foo@domain), the search is repeated for the unextended address (e.g. user@domain), and the unmatched address extension is propagated to the result of expansion. The matching order is: user+foo@domain, user@domain, user+foo, user, and @domain.