Virtusertable - How To
Virtusertable is used to do aliases to virtual domains hosted on the same server I'll use freebsd.org and freebsdhelp.org as examples in my article as freebsd.org is the main box and freebsdhelp.org is the virtual domain hosted on
freebsd.org.
*=- The easy way assuming sendmail.cf compiled with the correct features:
Most recent sendmail source are compiled with the needed FEATURES such as "FEATURE(virtusertable, `hash -o
/etc/mail/virtusertable')dnl" and
"FEATURE(access_db, `hash -o /etc/mail/access')dnl" in the sendmail.mc file assuming you installed freebsd normally with sendmail which these features are already included in the freebsd.mc (/usr/src/etc/sendmail/freebsd.mc) 3 steps is needed to do virtual email aliasing for freebsdhelp.org over freebsd.org main box
1. edit your sendmail.cw with any text editor such as vi(1) or ee(1) and place all domains that uses sendmail as their mailer deamon in this file, usually at
/etc/sendmail.cw
or /etc/mail/sendmail.cw list them , save and exit.
* your sendmail.cw will look like this listening:
sendmail.cw>
freebsd.org
freebsdhelp.org
anyotherdomain.org
sendmail.cw<
-
YOU NEED TO RESTART SENDMAIL TO READ THE NEW ENTRIES SEND A SIGNAL HUP TO SENDMAIL
BY 'killall -HUP sendmail'
2. you have to make access for the virtual domain to access your sendmail by adding them
to /etc/mail/access file and making the database file access.db .
* your /etc/mail/access will look something like this here seperating the domainname and
RELAY with <TAB>
access>
freebsd.orgRELAY
freebsdhelp.orgRELAY
anyotherdomain.comRELAY
access<
* save and exit and then you have to create access.db while your at /etc/mail/ do this
- makemap hash access < access
- YOU HAVE
TO UPDATE YOUR 'access.db' EVERYTIME YOU ADD NEW DOMAIN , PLUS YOU DON'T HAVE
TO RESTART SENDMAIL.
3. Finally to the virtusertable file edit the file /etc/mail/virtusertable and start your aliases there i'll mention some
examples of virtusertable entries
A. assume you want to alias admin@freebsdhelp.org to other LOCAL user on the same server
*MAKE SURE ALL ENTRIES ARE SEPERATED WITH <TAB>* :
virtusertable>
admin@freebsdhelp.org john
virtusertable<
B. assume you want to alias dave@freebsdhelp.org to other FOREIGN user on other server:
virtusertable>
dave@freebsdhelp.org dave@yahoo.com
virtusertable<
C. assume you want to alias all emails coming on freebsdhelp.org to one LOCAL user and
still you want your admin@freebsdhelp.org and dave@freebsdhelp.org works:
virtusertable>
admin@freebsdhelp.orgj ohn
dave@freebsdhelp.org dave@yahoo.com
@freebsdhelp.org big
virtusertable<
D. the same of the above but to a FOREIGN user:
admin@freebsdhelp.org john
dave@freebsdhelp.org dave@yahoo.com
@freebsdhelp.org big@kuwaitnet.net
* save and exit and then you have to create virtusertable.db while your at /etc/mail/ do this
- makemap hash virtusertable < virtusertable
- YOU HAVE TO UPDATE
YOUR 'virtusertable.db' EVERYTIME YOU ADD NEW ALIASES , PLUS YOU DON'T
HAVE TO RESTART SENDMAIL.
*=- The hard way if your sendmail.cf is compiled without correct features:
A. First of all you have to creat your sendmail.mc including the following to enable virtual hosting with sendmail:
FEATURE(access_db, `hash -o /etc/mail/access')dnl
FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')dnl
After adding them to your sendmail.mc compile it and install it while this article isn't a sendmail installation guide i wont talk more about it, for more info on SENDMAIL(8) can be found at http://www.sendmail.org
B. Go back to the first section and continue the job.
3.17.2000
Big
www.defcon1.org
|
|
|
|
[Home] [FBSD Articles] [Scripts Corner] [Contribute] [Search] [FBSD Links] [Files]
About Us
FreeBSD Articles
*Hardware
*Networking
*Security
*Software
*X Windows
Forums
Defcon1 Forum
Files / Scripts
Newbies Corner
Tech. Talk
Tips and Tricks
FreeBSD Links
Articles in other
Languages :
*French Articles
*Spanish Articles
Want to Help ?
Click Here
Email Users

This site cannot be duplicated without permission
© 1998 - 2008 Defcon1, www.defcon1.org , Copyrights for all materials on this web site are held by the individual authors, artists, photographers or creators. Materials may not be reproduced or otherwise distributed without permission
of www.defcon1.org and the content's original author.