- 论坛徽章:
- 0
|
关于SENDMAIL的救求啊,大哥们帮帮忙了
原帖由 "ports" 发表:
Second Plan: 
GENERIC_DOMAIN(`mycompany.com.cn')dnl
FEATURE(genericstable, `hash -o /etc/mail/genericstable')dnl
add these two lines to sendmail.mc, remake sendmail.cf.
then create generic..........
fix for plan 2: oops 
Add this lines to sendmail.mc
- FEATURE(masquerade_envelope)
- GENERICS_DOMAIN_FILE(`/etc/mail/generics_domains')dnl
- FEATURE(genericstable, `hash -o /etc/mail/genericstable')dnl
复制代码
remake sendmail.cf by m4(change the cf path as yours):
- # m4 -D_CF_DIR_=/usr/local/share/sendmail/cf/ /usr/local/share/sendmail/cf/m4/cf.m4 sendmail.mc >; sendmail.cf
复制代码
then create genericstable like this,
- user1 webmaster@mycompany.com.cn
- user2 sales@mycompany.com.cn
- user3 support@mycompany.com.cn
复制代码
make genericstable.db
- #cd /etc/mail
- #makemap hash generisctable < genericstable
- #ls generics*
- genericstable genericstable.db
复制代码
create GENERICS_DOMAIN_FILE
- #echo -e mycompany.com.cn \\n host1.mycompany.com.cn \\n host2 mycompany.com.cn >; generics_domains
复制代码
fainally, #killall sendmail&& sendmail -bd
I just tested these steps, no problem.
the user1@host1 will be exchange to webmaster@yourcompany.com.cn.
Ofcos, reedit the table as your need.
faint~~~~he Plan One is the best. |
|