大雀软件园

首页 软件下载 安卓市场 苹果市场 电脑游戏 安卓游戏 文章资讯 驱动下载
技术开发 网页设计 图形图象 数据库 网络媒体 网络安全 站长CLUB 操作系统 媒体动画 安卓相关
当前位置: 首页 -> 网络安全 -> 服务器 -> 在Fedora上建立自己的邮件服务器(3)

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

时间: 2021-07-31 作者:daque

四、窜改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]#

  

热门阅览

最新排行

Copyright © 2019-2021 大雀软件园(www.daque.cn) All Rights Reserved.