sendmail virtual user table

EQ Admin

EQ Forum Admin
Staff member

There is a lot of flexibility available with the sendmail virtusertable.

The file is typically located at /etc/mail/virtusertable

The following are some examples of how to use this feature in sendmail.

A tab should be used to separate the two sides of each line in the virtusertable file. bob

E-mail for will deliver to the local account bob. error:nouser No such user here

E-mail to will be permanently rejected with the error "No such user here"

E-mail for will be forwarded to

This creates a domain alias resulting in mail from forwarding to bob

All remaining e-mail to will be delivered to the local account bob. This is also known as a catchall account. These are generally a bad idea since they can be abused and flooded with e-mail if the domain is subjected to a dictionary attack. I do not recommend using a catchall unless absolutely necessary. error:5.1.1:550 No such user.

E-mail to usernames at your company that do not exist will be permanently rejected.

This is much better than creating a catchall account like in the above example.

When you make changes to your virtusertable file you need to rebuild the table from the source file.

# cd /etc/mail
# makemap hash virtusertable < virtusertable

You do -not- need to restart sending after making changes to the virtusertable.