postfix文档修正
生活随笔
收集整理的這篇文章主要介紹了
postfix文档修正
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
安裝mysql以后需要做兩步處理.第一:設(shè)置環(huán)境變量的路徑 echo "export PATH=$PATH:/usr/local/mysql/bin">>/etc/profile ,;soure /etc/profile 第2步: echo "/usr/local/mysql/lib/mysql ">>/etc/ld.so.conf ; ldconfig? 這兩個(gè)步驟的目的是為了后面安裝courier-authlib做準(zhǔn)備,否則易出現(xiàn)"configure: error: --with-authmysql specified but no mysqlclient.so".設(shè)置mysql路徑的目的是courier-authlib執(zhí)行配置腳本時(shí)需要使用文件mysql-config. 如果沒有設(shè)置好這兩步,就是安裝好了courier-authlib,它的配置目錄里也不會有authmysqlrc文件! 安裝courier-authlib需要先安裝expect,用yum install expect比較省事. 檢查系統(tǒng),看是否存在文件courierauthconfig,一般在/usr/bin目錄。先mv courierauthconfig courierauthconfig.old,不然在編譯courier-authlib 會報(bào)“--with-mailgroup=vmail”之類的錯(cuò)誤。安裝好courier-authlib后需設(shè)定環(huán)境變量 COURIERAUTHCONFIG=/usr/local/authlib/bin/courierauthconfig [root@postfix ~]#? /usr/local/sbin/amavisd debug
Problem in Amavis::DKIM code: Can't locate Crypt/OpenSSL/RSA.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8) at (. 81) line 25.
BEGIN failed--compilation aborted at (. 81) line 2 這一類錯(cuò)誤產(chǎn)生的原因是缺少相應(yīng)的perl模塊,也是postfix安裝最麻煩的成分.它的處理方法是執(zhí)行 cpan? Crypt::OpenSSL::RSA 就可以很方便的安裝好這個(gè)模塊.再次執(zhí)行/usr/local/sbin/amavisd debug? 還會出現(xiàn)類似的問題,依照此法一一解決.記住這個(gè)慣例,在安裝時(shí)把斜線變成雙冒號,同時(shí)省略文件的后綴(Crypt/OpenSSL/RSA.pm---->Crypt::OpenSSL::RSA.pm).實(shí)際上缺省的包大部分是2個(gè)斜杠的,如Archive/Zip.pm,做法也是相同的. 這是因?yàn)槿鄙倌KDBI.pm,執(zhí)行cpan DBI就解決了. postfixadmin配置文件config.inc.php需要特別注意的地方如下: // Mailboxes<?xml:namespace prefix = o />
2、執(zhí)行命令 /usr/local/imap/share/mkpop3dcert ,在同一目錄生成所需的文件pop3d.pem ? 3、啟動pop3-ssl。執(zhí)行命令 /usr/local/imap/libexec/pop3d-ssl.rc start? 就ok。 執(zhí)行后用netstat -anp|grep 995 檢查一下是否監(jiān)聽。 tcp??????? 0????? 0 :::995????????????????????? :::*??????????????????????? LISTEN????? 2412/couriertcpd 4、客戶端更改。把客戶端的pop端口由110改成995。然后收取一下,這樣就能準(zhǔn)確無誤的驗(yàn)證ssl功能是否正常。
Problem in Amavis::DKIM code: Can't locate Crypt/OpenSSL/RSA.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8) at (. 81) line 25.
BEGIN failed--compilation aborted at (. 81) line 2 這一類錯(cuò)誤產(chǎn)生的原因是缺少相應(yīng)的perl模塊,也是postfix安裝最麻煩的成分.它的處理方法是執(zhí)行 cpan? Crypt::OpenSSL::RSA 就可以很方便的安裝好這個(gè)模塊.再次執(zhí)行/usr/local/sbin/amavisd debug? 還會出現(xiàn)類似的問題,依照此法一一解決.記住這個(gè)慣例,在安裝時(shí)把斜線變成雙冒號,同時(shí)省略文件的后綴(Crypt/OpenSSL/RSA.pm---->Crypt::OpenSSL::RSA.pm).實(shí)際上缺省的包大部分是2個(gè)斜杠的,如Archive/Zip.pm,做法也是相同的. 這是因?yàn)槿鄙倌KDBI.pm,執(zhí)行cpan DBI就解決了. postfixadmin配置文件config.inc.php需要特別注意的地方如下: // Mailboxes<?xml:namespace prefix = o />
// If you want to store the mailboxes per domain set this to 'YES'.
// Example: /usr/local/virtual/domain.tld/username@domain.tld
$CONF['domain_path'] = 'YES';
// If you don't want to have the domain in your mailbox set this to 'NO'.
// Example: /usr/local/virtual/domain.tld/username
$CONF['domain_in_mailbox'] = 'NO'; 默認(rèn)的值分別為"$CONF['domain_path'] ='NO'及$CONF['domain_path'] ='YES'.這樣修改后,在瀏覽器用postfixadmin添加郵件用戶時(shí),生成的目錄形式式為/var/mailbox/sery.com/sery. ? Aug 17 11:30:43 postfix authdaemond: supplied password 'hzdgwy' does not match clearpasswd '$1$02d45893$je5tgY.9XFlJzOWiuiN.70'? 輸入的密碼本來是正確的,可是foxmail就是不能正確登陸收信,用web方式輸入用戶名和密碼,確實(shí)是正常的.什么原因?courier-authlib配置文件authmysqlrc加密的條目為"MYSQL_CLEAR_PWFIELD???? password",那么postfixadmin的配置文件config.ini.php相應(yīng)的項(xiàng)目應(yīng)為"$CONF['encrypt'] = 'cleartext';",默認(rèn)為"$CONF['encrypt'] = 'md5crypt';",改成一致后就能驗(yàn)證了.另外webmail(extmail)的文件webmail.cf的條目也得是"SYS_CRYPT_TYPE = cleartext". ? cleartext把密碼也明文方式存儲在數(shù)據(jù)庫中 ? ? 使用pop3 over ssl 一共4步(假定安裝目錄為/usr/local/imap) 1、進(jìn)入目錄 /usr/local/imap/share 修改一下文件mkpop3dcert,這個(gè)把有效期改一下,其結(jié)果如下(默認(rèn)一年--365天,紅色字體為更改值)
| #! /bin/sh # # $Id: mkpop3dcert.in,v 1.2 2005/06/29 18:01:17 mrsam Exp $ # # Copyright 2000-2005 Double Precision, Inc.? See COPYING for # distribution information. # # This is a short . to quickly generate a self-signed X.509 key for # POP3 over SSL.? Normally this . would get called by an automatic # package installation routine. ? test -x /usr/bin/openssl || exit 0? prefix="/usr/local/imap"? if test -f /usr/local/imap/share/pop3d.pem then ??????? echo "/usr/local/imap/share/pop3d.pem already exists." ??????? exit 1 fi? umask 077 cp /dev/null /usr/local/imap/share/pop3d.pem chmod 600 /usr/local/imap/share/pop3d.pem chown root /usr/local/imap/share/pop3d.pem? cleanup() { ??????? rm -f /usr/local/imap/share/pop3d.pem ??????? rm -f /usr/local/imap/share/pop3d.rand ??????? exit 1 }? dd if=/dev/urandom of=/usr/local/imap/share/pop3d.rand count=1 2>/dev/null /usr/bin/openssl req -new -x509 -days 36500 -nodes \ ??????? -config /usr/local/imap/etc/pop3d.cnf -out /usr/local/imap/share/pop3d.pem -keyout /usr/local/imap/share/pop3d.pem || cleanu p /usr/bin/openssl gendh -rand /usr/local/imap/share/pop3d.rand 512 >>/usr/local/imap/share/pop3d.pem || cleanup /usr/bin/openssl x509 -subject -dates -fingerprint -noout -in /usr/local/imap/share/pop3d.pem || cleanup rm -f /usr/local/imap/share/pop3d.rand |
總結(jié)
以上是生活随笔為你收集整理的postfix文档修正的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: .NET网络编程学习(三)
- 下一篇: 安装bashee-1-1.2.1.tar