国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 服務器 > Mail服務器 > 正文

在Fedora上建立自己的郵件服務器(3)

2024-09-08 23:46:35
字體:
來源:轉載
供稿:網友

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

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 武安市| 潞城市| 四川省| 彭山县| 阿图什市| 星子县| 榕江县| 兴国县| 安达市| 大荔县| 淮阳县| 阜阳市| 丹巴县| 徐州市| 家居| 凉城县| 鄂尔多斯市| 大连市| 新建县| 巧家县| 崇信县| 临泉县| 遂宁市| 小金县| 新源县| 宁强县| 聊城市| 介休市| 弋阳县| 东光县| 永春县| 西乡县| 玉田县| 温宿县| 五常市| 呈贡县| 西华县| 大邑县| 喜德县| 天柱县| 香河县|