Chinaunix首页 | 论坛 | 博客
  • 博客访问: 119708
  • 博文数量: 34
  • 博客积分: 1485
  • 博客等级: 上尉
  • 技术积分: 351
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-10 11:06
文章分类

全部博文(34)

文章存档

2011年(2)

2010年(17)

2009年(4)

2008年(7)

2007年(4)

我的朋友

分类:

2007-05-12 23:59:53

sendmail 安装
sendmail 版本sendmail.8.13.1.tar.gz
tar zvfx sendmail.8.13.1.tar.gz
cd sendmail.8.13.1.tar.gz
echo " APPENDDEF(`confENVDEF',`-DSASL=2') " >> devtools/Site/site.config.m4
echo " APPENDDEF(`conf_sendmail_LIBS',`-lsasl2') " >> /devtools/Site/site.config.m4
编译 sendmail
./Build -c
./Build install
mkdir /usr/share/sendmail
cp -a cf /usr/share/sendmail
cd cf/cf
cp qeneric-linux.mc sendmail.mc
mkdir /etc/mail
make install-cf
cp sendmail.mc /etc/mail/
cd /etc/mail
touch aliases access
echo "zn.cn" > local-host-names
which makemap
makemap hash access < access
makemap hash aliases < aliases
mkdir /var/spool/mqueue

设置 imap
rpm -ivh /mnt/cdrom/redora/rpms/imap-*.rpm
chkconfig ipop3 on
chkconfig imap on
service xinetd restart
echo " include (`/usr/share/sendmail/cf/m4/cf.m4')dnl " >> /etc/mail/sendmail.mc
echo " FEATURE(`access_db')dnl " >> /etc/mail/sendmail.mc
加入用户验证
echo " define(`confAUTE_OPTIONS',`A y')dnl " >> /etc/mail/sendmail.mc
echo " TRUST_AUTH_MECH(`LOGIN PLAIN')dnl " >> /etc/mail/sendmail.mc
echo " define(`confAUTE_MECHANISMS',`LOGIN PLAIN')dnl " >> /etc/mail/sendmail.mc
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf把他翻意成sendmail.cf
echo "192.168.1      RELAY" >> access
makemap hash access < access
 
chkconfig saslauthd on
service saslauthd restart
echo "pwcheck_method:saslauthd" > /usr/lib/sas12/sendmail.conf
chkconfig ipop3s on
chkconfig imaps on
service xinetd restart
netstat -tnl | grep :993
 
/usr/sbin/sendmail -bd -q1h 起动sendmail
netstart -ant | grep sendmail 查看进程
建用户
useradd redhat
passwd redhat
 echo "root: redhat" >> /etc/mail/aliases
newaliases
mail
Subject:dlfja;lkd
asd;lkfja;dfj
.
Cc:
 
tail /var/log/maillog  (stat=Sent)发信成功
阅读(2549) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~