转自白手起家博客
http://bbs.chinaunix.net/forum.php?mod=viewthread&tid=770141
说明一下:Q代表安装过程中遇到的问题,或者是日志中出现的现象。A:代表解决方法。
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[2829]: 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[2870]: warning: SASL authentication failure: could not verify password
A:
将vi /usr/local/courier-authlib/etc/authmysqlrc中参数后的空格删除即可
Q:
编译pam_mysql:
[root@mail src]# tar -zxf pam_mysql-0.5.tar.gz
[root@mail src]# cd pam_mysql
修改pam_mysql.c的源代码,去掉调试消息:
[root@mail pam_mysql]# vi +54 pam_mysql.c
将如下一行:
#define DEBUG
修改为:
/* #define DEBUG */
然后编译:
[root@mail pam_mysql]# make
然后报错“make: *** [dynamic/pam_mysql.o] Error 1”无法尽心,没有生成pam_mysql.so模块。
A:
装mysql的devel和shared包吧,对应版本的,用mysql.com上面的就行
Q:
安装POSTFIX2.2.7出错
[root@mail postfix-2.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: *** [Makefiles] Error 1
make: *** [Makefiles] 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创建邮箱,可是却出现了如下错误:
[root@localhost bin]# 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:
[root@mail postfix]# /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[2004]: warning: SASL authentication failure: Password verification failed
Oct 24 11:38:24 qmail postfix/smtpd[2004]: warning: unknown[221.221.172.11]: SASL plain authentication failed无法通过认证,请问高手这是什么原因?
A:
将main.cf中的smtpd_sasl_local_domain设为空即可。
Q:
Oct 24 11:38:24 qmail postfix/smtpd[2004]: warning: SASL authentication failure: Password verification failed
Oct 24 11:38:24 qmail postfix/smtpd[2004]: warning: unknown[221.221.172.11]: SASL plain authentication failed无法通过认证,请问高手这是什么原因?
A:
将main.cf中的smtpd_sasl_local_domain设为空即可。
Q:
[root@mail postfix]# /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:
[root@mail postfix]# /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别名设定。修正一下该问题吧..
Q:
postfix/master [200]: fatal: bind INADDR_ANY port 25: address already in use
A:
可能是其他的邮件服务还在运行,停掉就好了
Q:
Jan 2 12:36:31 mail saslauthd[29494]: do_auth: auth failure: [user=yardian] [service=smtp] [realm=] [mech=pam] [reason=PAM auth error]
A:
MECH=pam那个改为shadow 再relstart
Q:
fatal: unsupported dictionary type: mysql
A:
没增加mysql的支持:)
Q:
temporarily suspended: connect to 127.0.0.1[127.0.0.1]: Connection refused)
A:
没打开amavisd吧。。内容过滤器那里没打开。
Q:
[root@mail root]# echo pwcheck_method: saslauthd > /usr/lib/sasl2/smtpd.conf
[root@mail root]# echo mech_list: plain login >> /usr/lib/sasl2/smtpd.conf
[root@mail root]# vi /etc/sysconfig/saslauthd
MECH=shadow我想问一下我现在到底用的是shadow还是saslauthd?
A:
shadow是saslauthd认的,而pwcheck_method是postfix + sasl库认的。2个不是一个东西
Q:
[root@localhost mysql]# 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[900]: 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[3787]: 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日志中显示:
[root@mail ~]# 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
[Thu Jan 12 17:11:19 2006] [notice] caught SIGTERM, shutting down
[Fri Jan 13 12:34:46 2006] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri Jan 13 12:34:46 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/local/httpd/bin/suexec)
[Fri Jan 13 12:34:47 2006] [notice] 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
本文转自 wdy198622 51CTO博客,原文链接:
http://blog.51cto.com/weimouren/1826048