当前位置: 首页 > 图文教程 > 服务器 > Web服务器 > 在Fedora上建立自己的邮件服务器(3)

Web服务器
Web服务器负载均衡方案
发现并防止对WEB应用服务器的三种攻击
如何在Windows Server 2003中配置DNS
谈用Win2003系统配置路由服务
巧妙出招致胜服务器管理
入门教程:IIS 5.0建Web服务器
几秒搭建Web服务器 绿色PHP环境套件e2php
WIN2003组策略详解
IIS 7 Web服务器管理介绍
配置emule的web服务器功能详解
Tomcat与应用、Web服务器关系
加固基于Windows 2003平台的WEB服务器
使用Windows Server 2003搭建安全服务器
Xitami Web服务器,比Apache更快捷
ISAPI Rewrite实现iis防盗链
析Windows2003的两种快速自动登录捷径
站长手册:WIN2003下Web服务器配置
Linux Apache Web服务器基础知识介绍
如何用IIS建立高安全性Web服务器
轻松架设Windows 2003中Web服务器

Web服务器 中的 在Fedora上建立自己的邮件服务器(3)


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-02   浏览: 46 ::
收藏到网摘: n/a

四、修改pam

          
[root@localhost  pam_mysql]#  cd  /etc/pam.d  
  [root@localhost  pam.d]#  cp  /work/postfix  postfix  
  [root@localhost  pam.d]#  
  postfix的内容如下:  
  ##########/etc/pam.d/postfix##################  
  echo  auth  sufficient  pam_mysql.so  user=postfix  passwd=postfix  host=localhost  db=postfix  table=mailbox  usercolumn=username  passwdcolumn=password  crypt=1  
  echo  account  required  pam_mysql.so  user=postfix  passwd=postfix  host=localhost  db=postfix  table=mailbox  usercolumn=username  passwdcolumn=password  crypt=1  
  echo  auth  sufficient  pam_unix_auth.so  
  echo  account  sufficient  pam_unix_acct.so  
  [root@localhost  pam.d]#  [  -f  imap  ]  &&  mv  imap  imap.orig  
  [root@localhost  pam.d]#  [  -f  pop  ]  &&  mv  pop  pop.orig  
  [root@localhost  pam.d]#  [  -f  smtp  ]  &&  mv  smtp  smtp.orig  
  [root@localhost  pam.d]#  n  -s  postfix  imap  
  bash:  n:  command  not  found  
  [root@localhost  pam.d]#  ln  -s  postfix  imap  
  [root@localhost  pam.d]#  ln  -s  postfix  pop  
  [root@localhost  pam.d]#  ln  -s  postfix  smtp  
  [root@localhost  pam.d]#  cp  postfix  sieve  
  [root@localhost  pam.d]#  cd  ..  

  五、cyrus-sasl的安装配置

  我本不想重新编译cyrus-sasl的,可是fedora自带的在我测试的时候出问题,还是重编译吧,虽然fedora带的也是2.1.15版本。

          
[root@localhost etc]# cd /ruanjian
[root@localhost ruanjian]# cd cyrus-sasl-2.1.15
[root@localhost cyrus-sasl-2.1.15]# ./configure --disable-sample \
> --disable-pwcheck --disable-gssapi --disable-cram \
> --disable-digest --disable-krb4 --disable-anon \
> --with-saslauthd=/var/run/saslauthd \
> --enable-plain --enable-login
[root@localhost cyrus-sasl-2.1.15]# [ -d /usr/lib/sasl2 ] && mv /usr/lib/sasl2 /usr/lib/sasl2.orig
[root@localhost cyrus-sasl-2.1.15]# ln -s /usr/local/lib/sasl2 /usr/lib/sasl2
[root@localhost cyrus-sasl-2.1.15]# echo /usr/local/lib >> /etc/ld.so.conf
[root@localhost cyrus-sasl-2.1.15]# echo /usr/local/lib/sasl2 >> /etc/ld.so.conf                                        
[root@localhost cyrus-sasl-2.1.15]# ldconfig
[root@localhost cyrus-sasl-2.1.15]#
[root@localhost cyrus-sasl-2.1.15]# echo pwcheck_method: saslauthd > /usr/lib/sasl2/smtpd.conf
[root@localhost cyrus-sasl-2.1.15]# /usr/local/sbin/saslauthd -a pam
[root@localhost cyrus-sasl-2.1.15]#

   六、postfix的安装和配置

  A.先停止sendmail.fedora已经默认安装了sendmail,去掉它。

          
[root@localhost ruanjian]# /etc/init.d/sendmail stop
关闭 sendmail:                [失败]
[root@localhost ruanjian]# mv /usr/bin/newaliases /usr/bin/newaliases.orig
[root@localhost ruanjian]# mv /usr/bin/mailq /usr/bin/mailq.orig
[root@localhost ruanjian]# mv /usr/sbin/sendmail /usr/sbin/sendmail.orig

  B.添加用户和组  

       
[root@localhost ruanjian]# groupadd -g 12345 postfix
[root@localhost ruanjian]# groupadd