Simpler Navigation coming for Servers and Operating Systems
Coming soon: a much simpler Servers and Operating Systems section of the Community. We will combine many of the older boards, and you won't have to click through so many levels to get at the information you need. If you are looking for an older board and do not find it, check the consolidated boards, as the posts are still there.
Showing results for 
Search instead for 
Did you mean: 

Sendmail and the Virtusertable feature

David Crowe

Sendmail and the Virtusertable feature

Does anyone know how to activate this feature in Sendmail? I uncommented the line "Kvirtuser dbm -o /etc/mail/virtusertable" in the file along with the only other section that I could find "# handle virtual users". I created the virtusertable using vi and then ran "makemap dbm virtusertable < virtusertable" to complete the process. I can find no documentation on this proceedure so I am basically guessing that this is how it is done. Can anybody help??
Berlene Herren
Honored Contributor

Re: Sendmail and the Virtusertable feature

1. Edit the and uncomment out the following lines

Kvirtuser dbm /etc/mail/virtusertable
All the rules in ruleset SParse1 after comment "# handle virtual users" and before comment "# short Circuit local ..."

2. Create/vi the /etc/mail/virtusertable file and add an address for mapping.

3. Make the map files.

makemap -v dbm virtusertable < virtusertable

This will create the map files for virtusertable.


Create a script to help automate this procedure.

create "makevt" insert the following line in makevt
makemap -v dbm virtusertable < virtusertable
chmod 700 makevt

4. Add the domain "" to the file.

5. Cycle sendmail to make your changes in the file active

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

David Crowe

Re: Sendmail and the Virtusertable feature

Thanks for the speedy reply.

I have done everything that you mentioned other than put the entry into the .cw file.

Maybe I should give you an idea of what I am trying to do. We handle about 30 different domains coming into our gateway. Some of the domains are handle by different out-sourcing centers and need to be sent to different gateways depending on the user id and domain name. Messy I know but this is how it needs to be done. I need to be able to change the user id and/or domain name and then route them to different gateways.

For example is changed to

I have set up a mailertable to route mail going to to go to and goes to The mailertable works but I can't get to convert to

Any ideas if this would work or do I need to setup something different?