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

Mail服务器
我的E-Mail服务器为什么变慢了
用mail服务器构架多域名邮件服务系统
Mail 服务器的其它一些功能
Imail常见问题解答
在局域网用IMAIL构建邮件服务器
在Asp.Net中使用SmtpMail发送邮件的方法
MDaemon的安装入门篇
MDaemon Server操作指南
Exchange2007:10大特性扫描
隐藏SMTP旗标(Sendmail/Qmail/Postfix/Exim)
AIX操作系统下如何使用Sendmail
Windows 2003邮件服务器全攻略
用MDaemon架设邮件服务器
Qmail邮件服务器安装过程
个人SMTP服务器的配置
入门认识:典型邮件服务器
Linux下Mail服务器架设攻略
Cyrus IMAP邮件服务器安装与配置(1)
Cyrus IMAP邮件服务器安装与配置(2)
Cyrus IMAP邮件服务器安装与配置(3)

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-18   浏览: 30 ::
收藏到网摘: 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 -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]#