To make sending messages to the right person easier to understand, you can use virtual domains. These can be considered a subdomain of a real DNS domain. The virtual domain is a domain that doesn't really exist in DNS; it exists only on the MTA. When a mail comes in for a user in the virtual domain, the virtual table makes sure it is delivered to the correct user in the real domain. To activate the virtual domain table, make sure the following is in main.cf:
virtual_maps = hash:/etc/postfix/virtual
In the virtual domain file, first the name of the virtual domain appears. In the second column in these lines, you can put a random description. This first line is like a header for the rest of the file. In the other lines, the first column specifies users in the virtual domain. The second column mentions the name of the real user where the mail has to be forwarded. Listing 16-6 shows an example of the content of a virtual domain table.
Was this article helpful?