Operating System - HP-UX
1752565 Members
5373 Online
108788 Solutions
New Discussion юеВ

Sendmail and the Virtusertable feature

 
David Crowe
Advisor

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 sendmail.cf 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??
2 REPLIES 2
Berlene Herren
Honored Contributor

Re: Sendmail and the Virtusertable feature

1. Edit the sendmail.cf 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.

user@hp.com user@atl.hp.com
@fictional.com %1@xyz.com

3. Make the map files.

makemap -v dbm virtusertable < virtusertable


This will create the map files for virtusertable.

virtusertable.dir
virtusertable.pag

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 "fictional.com" to the sendmail.cw file.

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

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

Berlene
http://www.mindspring.com/~bkherren/dobes/index.htm
David Crowe
Advisor

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 user1@domain.com is changed to user100@other.com.

I have set up a mailertable to route mail going to other.com to go to 192.168.0.50 and domain.com goes to 192.168.100.20. The mailertable works but I can't get user1@domain.com to convert to user100@other.com.

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