|Here are the entries I added to /etc/mail/virtusertable. Note that
there is a tab between the address on the left and the text on the right. Do not use
firstname.lastname@example.org error:nouser No such user here
After saving these changes, I issued the following command:
[root@ducky:/etc/mail] # makemap hash virtusertable <
In this case, mail sent to email@example.com will be delivered to the local user
terry. But mail sent to firstname.lastname@example.org will fail. This is good.
However, if I have another domain on my box, say realdomain.com, mail sent to
email@example.com will be delivered to terry's mailbox. This is not good.
Apart from adding an "error:nouser" line for each domain/user combination, I
don't know how to get around this. Check back later.
Well, it's now later. Here's what I'm doing for my incoming mail. I use
/etc/mail/virtusertable and I have a section within that file for each domain. So I
have something like this:
@firstdomain.org error:nouser No such user here
For firstdomain.org, the first three entires are for are majordomo (the names on the
right hand side will in turn be resolved by some other aliases, but that is beyond the
scope of this example). The mail for firstname.lastname@example.org is delivered locally to
marc's mailbox. All other mail for this domain is rejected with an error message.
For fakedomain.com, only these aliases are allowed. I'm not sure what would happen for
other mail for this domain. But if it matched a local user, it would be delivered to
them. It's far better to have a wildcard alias for each domain (such as
For other.org, mail for marc is delivered locally. Mail for se is delivered to
email@example.com. All other mail for this domain is sent to mar.