站长学院通行证

 

返回“站长学院”网站首页

 当前位置 → 中国站长学院服务器Mail服务器 → 浏览正文


TAG:  Fedora 邮件 服务器 教程

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


作者:中国站长学院(整理)     来源:互联网转载     点击数:     更新时间:2008年01月22日

【字体: 】           【背景色 杏仁黄 秋叶褐 胭脂红 芥末绿 天蓝 雪青 灰 银河白(默认色) 】    【收藏本文】   【打印


四、修改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 -g 12346 postdrop
[root@localhost ruanjian]# useradd -u 12345 -g 12345 -c postfix -d /dev/null -s /nologin postfix

  C.编译postfix

[root@mail ruanjian]# cd postfix-2.0.16
[root@mail postfix-2.0.16]# make -f Makefile.init makefiles \
> 'CCARGS=-DUSE_SASL_AUTH -DHAS_MYSQL -I/usr/include/mysql -I/usr/include/sasl' \
> 'AUXLIBS=-L/usr/lib/mysql -L/usr/local/lib/sasl2 -lmysqlclient -lsasl2 -lz -lm'
[root@mail postfix-2.0.16]# make install
[root@localhost postfix-2.0.16]# cd /etc
[root@localhost etc]# mv aliases aliases.orig
[root@localhost etc]# ln -s postfix/aliases aliases
[root@localhost etc]# cd postfix
[root@localhost postfix]# echo 'root: tester' >> /etc/postfix/aliases
[root@localhost postfix]# postalias /etc/postfix/aliases
[root@localhost postfix]#

责任编辑:忧郁的秋天

注册投稿

收藏本文到  >>>

相关文章

IT头条:MySpace获垃圾邮件制05/15 
百度内部邮件暴光 为汶川地震灾区发起05/13 
社交网站逐渐流行 邮件营销末日到来?04/15 
模板教程【Pagetitle 标记】04/11 
模板教程【Prenext 标记】(十04/11 
模板教程【Pagebreak 标记】04/11 
模板教程【Pagelist 标记】(04/11 
模板教程【List 标记】(十一)04/11 
模板教程【Channelartlis04/11 
模板教程【Mynews 标记】(九)04/11 
模板教程【Flink 标记】(八)04/11 
模板教程【Vote 标记】(七)04/11 
模板教程【Mytag 标记】(六)04/11 
模板教程【Type 标记】(四)04/11 
模板教程【Channel 标记】(三04/11 
模板教程【Field 标记】(二)04/11 

推荐导读

热门资讯

资讯快报

论坛新贴

返回首页

关于我们 - 帮助(?) - 广告服务 - 诚征英才 - 友情链接 - 网站地图 - 站长BLOG

返回网站顶部

Copyright © 2007 中国站长学院(CNZZXY.COM). All Rights Reserved
站长学院服务资咨热线:0755-84289786    业务合作:(0)13554938953  (0)13423986856    网络宽带及主机提供:深圳傲网科技
粤ICP备08006968号   站长:忧郁的秋天(向管理员发邮件)   站长交流QQ群①:1815595   站长交流QQ群②:32960074