postfix安裝Q&A(新手用的,老鳥別砸我啊)

火星人 @ 2014-03-04 , reply:0
←手機掃碼閱讀

postfix安裝Q&A(新手用的,老鳥別砸我啊)

postfix安裝Q&A(新手用的,老鳥別砸我啊)


執照wangmingda老大的資料安裝成功postfix(地址在這裡http://www.extmail.org/forum/archive/2/0510/563.html)。現在把我安裝過程中遇到的問題及解決方法提供給大家,以方便新手。高手就不要看了

說明一下:Q代表安裝過程中遇到的問題,或者是日誌中出現的現象。A:代表解決方法。
在這裡要感謝:hzqbbc,≠&鍵盤人生$,606,鳥無生計等其他幫助過我兄弟們。
Q:
Jan 13 11:26:29 mail authdaemond: failed to connect to mysql server (server=localhost , userid=postfix ): Unknown MySQL server host 'localhost ' (2)
Jan 13 11:26:29 mail postfix/smtpd: warning: SASL authentication failure: could not verify password
Jan 13 12:11:19 mail authdaemond: failed to connect to mysql server (server=localhost, userid=postfix ): Can't connect to local MySQL server through socket '/tmp/mysql.sock ' (2)
Jan 13 12:11:19 mail postfix/smtpd: warning: SASL authentication failure: could not verify password
A:
將vi /usr/local/courier-authlib/etc/authmysqlrc中參數后的空格刪除即可
Q:
編譯pam_mysql:
# tar -zxf pam_mysql-0.5.tar.gz
# cd pam_mysql
修改pam_mysql.c的源代碼,去掉調試消息:
# vi +54 pam_mysql.c
將如下一行:
#define DEBUG
修改為:
/* #define DEBUG */
然後編譯:
# make
然後報錯「make: *** Error 1」無法盡心,沒有生成pam_mysql.so模塊。
A:
裝mysql的devel和shared包吧,對應版本的,用mysql.com上面的就行
Q:
安裝POSTFIX2.2.7出錯
# make
make -f Makefile.in MAKELEVEL= Makefiles
(echo "# Do not edit -- this file documents how Postfix was built for your machine."; /bin/sh makedefs) >makedefs.tmp
No <db.h> include file found.
Install the appropriate db*-devel package first.
See the RELEASE_NOTES file for more information.
make: *** Error 1
make: *** Error 2
A:
沒裝berkeleyDB的開發庫,或者是指定路徑沒有找到,所以報這個錯了。如果是linux, 注意看有沒有db*-devel的rpm,或者libdb*-dev的deb(debian)如果是bsd,則看看有沒有裝db3/db4等包
Q:
按照Postfix+Cyrus-IMAP+Cyrus-SASL+MySQL+IMP(王興宇的)完全指南進行到了步驟8.5 ,用cyradm創建郵箱,可是卻出現了如下錯誤:
# cyradm --user cyrus localhost
Can't load '/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/Cyrus/IMAP/IMAP.so' for module Cyrus::IMAP: /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/Cyrus/IMAP/IMAP.so: undefined symbol: db_version at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230.
at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Cyrus/IMAP/Admin.pm line 44
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Cyrus/IMAP/Admin.pm line 44.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Cyrus/IMAP/Admin.pm line 44.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Cyrus/IMAP/Shell.pm line 60.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Cyrus/IMAP/Shell.pm line 60.
Compilation failed in require.
BEGIN failed--compilation aborted.請問是什麼原因?應該怎麼解決?
A:
安裝了perl-Cyrus包后就好了。
Q:
# /usr/sbin/postfix start
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/hold
postsuper: fatal: scan_dir_push: open directory hold: Permission denied
postfix/postfix-script: fatal: Postfix integrity check failed!
呵呵許可權問題,看你的postfix的用戶和用戶組是什麼。是/usr/sbin/postfix的許可權嗎?我改為1777還是不行
A:
chown postfix:postfix /var/spool/postfix/hold
Q:
Oct 24 11:38:24 qmail postfix/smtpd: warning: SASL authentication failure: Password verification failed
Oct 24 11:38:24 qmail postfix/smtpd: warning: unknown: SASL plain authentication failed無法通過認證,請問高手這是什麼原因?
A:
將main.cf中的smtpd_sasl_local_domain設為空即可。
Q:
Oct 24 11:38:24 qmail postfix/smtpd: warning: SASL authentication failure: Password verification failed
Oct 24 11:38:24 qmail postfix/smtpd: warning: unknown: SASL plain authentication failed無法通過認證,請問高手這是什麼原因?
A:
將main.cf中的smtpd_sasl_local_domain設為空即可。
Q:
# /usr/sbin/postfix start
postfix/postfix-script: warning: not owned by group postdrop: /var/spool/postfix/public
postfix/postfix-script: warning: not owned by group postdrop: /var/spool/postfix/maildrop
postfix/postfix-script: warning: not owned by root: /var/spool/postfix/etc
postfix/postfix-script: starting the Postfix mail system
A:
chgrp postdrop /var/spool/postfix/maildrop
chgrp postdrop /var/spool/postfix/public

Q:
# /usr/sbin/postfix start
postfix/postfix-script: warning: not owned by root: /var/spool/postfix/etc
postfix/postfix-script: starting the Postfix mail system
A:
chown root /var/spool/postfix/etc

Q:
postalias: warning: /usr/local/etc/postfix/aliases.db: duplicate entry: "root"
A:
這個已經很清楚告訴您,您的aliases檔案內有重複的root別名設定。修正一下該問題吧.. :-)


[ 本帖最後由 qqmc 於 2006-6-8 16:47 編輯 ]
《解決方案》

Q:
postfix/master : fatal: bind INADDR_ANY port 25: address already in use
A:
可能是其他的郵件服務還在運行,停掉就好了

Q:
Jan 2 12:36:31 mail saslauthd: do_auth: auth failure:
A:
MECH=pam那個改為shadow 再relstart

Q:
fatal: unsupported dictionary type: mysql
A:
沒增加mysql的支持:)

Q:
temporarily suspended: connect to 127.0.0.1: Connection refused)
A:
沒打開amavisd吧。。內容過濾器那裡沒打開。
Q:
# echo pwcheck_method: saslauthd > /usr/lib/sasl2/smtpd.conf
# echo mech_list: plain login >> /usr/lib/sasl2/smtpd.conf
# vi /etc/sysconfig/saslauthd
MECH=shadow我想問一下我現在到底用的是shadow還是saslauthd?
A:
shadow是saslauthd認的,而pwcheck_method是postfix + sasl庫認的。2個不是一個東西
Q:
# mysql -u root password
ERROR 2002 (HY000): Can't connect to local MySQL server through socket /var/lib/mysql/mysql.sock' (2)
A:
在/etc/rc.conf中增加mysql_enable="YES"

Q:
perl Makefile.PL
make installDBI connect('database=extmail;host=localhost;mysql_socket=/var/lib/mysql/mysql.sock','extmail',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /usr/local/httpd/htdocs/extmail/libs/Ext/Auth/MySQL.pm line 44
A:
vi webmail.cf
修改
SYS_MYSQL_SOCKET = /tmp/mysql.sock

Q:
Can't call method "prepare" on an undefined value at /usr/local/httpd/htdocs/extman/libs/Ext/Mgr/MySQL.pm line 59.
A:
在mysql.pm里將RaiseError => 0 改為1 這個是打開mysql更多的出錯提示。
Q:
smtpd認證失敗:無許可權連接authdaemond
Nov 20 15:58:54 bsd6 postfix/smtpd: warning: SASL authentication failure: cannot connect to Courier authdaemond: Permission denied
A:
檢查 authdaemond的socket所在目錄及其父目錄的屬性是否對smtpd可讀。如果不可讀則出現這個問題(permission的問題)。chmod +x /var/spool/authdaemon
Q:
Jan 13 13:18:27 mail postfix/virtual: warning: maildir access problem for UID/GID=502/502: create /home/mail/showdesign.com/demo/Maildir/tmp/1137129507.P3787.mail: Permission denied
A:
更改main.cf中
virtual_uid_maps = static:502
virtual_gid_maps = static:502組ID
2006-01-13 15:22加入
Q:
在extmail中不能發信,提示:Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
在apache日誌中顯示:
# tail -f /usr/local/httpd/logs/error_log
sh: /usr/sbin/sendmail: No such file or directory
sh: /usr/sbin/sendmail: No such file or directory
sh: /usr/sbin/sendmail: No such file or directory
caught SIGTERM, shutting down
Init: Session Cache is not configured
suEXEC mechanism enabled (wrapper: /usr/local/httpd/bin/suexec)
Apache/2.2.0 (Unix) mod_ssl/2.2.0 OpenSSL/0.9.7a PHP/4.4.1 configured -- resuming normal operations
sh: /usr/sbin/sendmail: No such file or directory
sh: /usr/sbin/sendmail: No such file or directory
sh: /usr/sbin/sendmail: No such file or directory
A:
ln -s /usr/local/postfix-2.2.8/src/sendmail/sendmail /usr/sbin/sendmail

《解決方案》

佔一個先
《解決方案》

頂一個
《解決方案》

# telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.


為什麼我這一步總是跳不過去呢?:em14:
《解決方案》

請問這是什麼問題

/root/lcc/postfix-2.3.12/src/tls/tls_verify.c:161: undefined reference to `X509_NAME_oneline'
../../lib/libtls.a(tls_certkey.o): In function `set_cert_stuff':
/root/lcc/postfix-2.3.12/src/tls/tls_certkey.c:111: undefined reference to `SSL_CTX_use_certificate_chain_file'
/root/lcc/postfix-2.3.12/src/tls/tls_certkey.c:116: undefined reference to `SSL_CTX_use_PrivateKey_file'
/root/lcc/postfix-2.3.12/src/tls/tls_certkey.c:125: undefined reference to `SSL_CTX_check_private_key'
../../lib/libtls.a(tls_certkey.o): In function `tls_set_ca_certificate_info':
/root/lcc/postfix-2.3.12/src/tls/tls_certkey.c:85: undefined reference to `SSL_CTX_load_verify_locations'
/root/lcc/postfix-2.3.12/src/tls/tls_certkey.c:90: undefined reference to `SSL_CTX_set_default_verify_paths'
collect2: ld returned 1 exit status
make: *** Error 1
make: *** Error 1
《解決方案》

回復 1# qqmc

這個是我的報錯信息,幫我瞅瞅是哪裡的問題?
《解決方案》

這個是我的錯誤。
# make makefiles 'CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include/mysql -DUSE_CYRUS_SASL -DUSE_SASL_AUTH -I/usr/local/include/sasl -DUSE_TLS' 'AUXLIBS=-L/usr/local/mysql/lib/mysql -lmysqlclient -lm -lz -L/usr/local/lib -lsasl2 -lssl -lcrypto'
(echo "# Do not edit -- this file documents how Postfix was built for your machine."; /bin/sh makedefs) >makedefs.tmp
set +e; if cmp makedefs.tmp conf/makedefs.out; then rm makedefs.tmp; \
        else mv makedefs.tmp conf/makedefs.out; fi >/dev/null 2>/dev/null
set -e; for i in src/util src/global src/dns src/tls src/xsasl src/milter src/master src/postfix src/fsstone src/smtpstone src/sendmail src/error src/pickup src/cleanup src/smtpd src/local src/trivial-rewrite src/qmgr src/oqmgr src/smtp src/bounce src/pipe src/showq src/postalias src/postcat src/postconf src/postdrop src/postkick src/postlock src/postlog src/postmap src/postqueue src/postsuper src/qmqpd src/spawn src/flush src/verify src/virtual src/proxymap src/anvil src/scache src/discard src/tlsmgr src/postmulti; do \
         (set -e; echo "[$i]"; cd $i; rm -f Makefile; \
         make -f Makefile.in Makefile MAKELEVEL=) || exit 1; \
        done;

cat ../../conf/makedefs.out Makefile.in >Makefile

cat ../../conf/makedefs.out Makefile.in >Makefile




[火星人 via ] postfix安裝Q&A(新手用的,老鳥別砸我啊)已經有676次圍觀

http://www.coctec.com/docs/service/show-post-13778.html