ExtMail服务器社区's Archiver

yardian 发表于 2006-1-13 14:19

postfix安装Q&A(新手用的,老鸟别砸我啊)

执照wangmingda老大的资料安装成功postfix(地址在这里[url]http://www.extmail.org/forum/viewthread.php?tid=563[/url])。现在把我安装过程中遇到的问题及解决方法提供给大家,以方便新手。高手就不要看了

说明一下:Q代表安装过程中遇到的问题,或者是日志中出现的现象。A:代表解决方法。
在这里要感谢:hzqbbc,≠&键盘人生$,606,鸟无生计等其他帮助过我兄弟们。

[quote]
[color=red]Q:[/color]
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
[color=red]A: [/color]
将vi /usr/local/courier-authlib/etc/authmysqlrc中参数后的空格删除即可
[/quote]

[quote]
[color=red]Q:[/color]
编译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模块。
[color=red]A: [/color]
装mysql的devel和shared包吧,对应版本的,用mysql.com上面的就行
[/quote]

[quote]
[color=red]Q:[/color]
安装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
[color=red]A: [/color]
没装berkeleyDB的开发库,或者是指定路径没有找到,所以报这个错了。如果是linux, 注意看有没有db*-devel的rpm,或者libdb*-dev的deb(debian)如果是bsd,则看看有没有装db3/db4等包
[/quote]

[quote]
[color=red]Q:[/color]
按照Postfix+Cyrus-IMAP+Cyrus-SASL+MySQL+IMP(王兴宇的)完全指南进行到了步骤8.5 ,用cyradm创建邮箱,可是却出现了如下错误:
[root@localhost bin]# cyradm --user cyrus localhost
Can&#39;t load &#39;/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/Cyrus/IMAP/IMAP.so&#39; 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.请问是什么原因?应该怎么解决?
[color=red]A: [/color]
安装了perl-Cyrus包后就好了。
[/quote]

[quote]
[color=red]Q:[/color]
[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还是不行
[color=red]A: [/color]
chown postfix:postfix /var/spool/postfix/hold
[/quote]

[quote]
[color=red]Q:[/color]
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无法通过认证,请问高手这是什么原因?
[color=red]A: [/color]
将main.cf中的smtpd_sasl_local_domain设为空即可。
[/quote]

[quote]
[color=red]Q:[/color]
[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
[color=red]A: [/color]
chgrp postdrop /var/spool/postfix/maildrop
chgrp postdrop /var/spool/postfix/public
[/quote]

[quote]
[color=red]Q:[/color]
[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
[color=red]A: [/color]
chown root /var/spool/postfix/etc
[/quote]

[quote]
[color=red]Q:[/color]
postalias: warning: /usr/local/etc/postfix/aliases.db: duplicate entry: "root"
[color=red]A: [/color]
这个已经很清楚告诉您,您的aliases档案内有重复的root别名设定。修正一下该问题吧.. :-)
[/quote]

[quote]
[color=red]Q:[/color]
postfix/master [200]: fatal: bind INADDR_ANY port 25: address already in use
[color=red]A: [/color]
可能是其他的邮件服务还在运行,停掉就好了
[/quote]

[quote]
[color=red]Q:[/color]
Jan 2 12:36:31 mail saslauthd[29494]: do_auth: auth failure: [user=yardian] [service=smtp] [realm=] [mech=pam] [reason=PAM auth error]
[color=red]A: [/color]  
MECH=pam那个改为shadow 再relstart
[/quote]

[quote]
[color=red]Q:[/color]
fatal: unsupported dictionary type: mysql
[color=red]A: [/color]
没增加mysql的支持:)
[/quote]

[quote]
[color=red]Q:[/color]
temporarily suspended: connect to 127.0.0.1[127.0.0.1]: Connection refused)
[color=red]A: [/color]
没打开amavisd吧。。内容过滤器那里没打开。
[/quote]

[quote]
[color=red]Q:[/color]
[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?
[color=red]A: [/color]
shadow是saslauthd认的,而pwcheck_method是postfix + sasl库认的。2个不是一个东西
[/quote]

[quote]
[color=red]Q:[/color]
[root@localhost mysql]# mysql -u root password
ERROR 2002 (HY000): Can&#39;t connect to local MySQL server through socket /var/lib/mysql/mysql.sock&#39; (2)
[color=red]A: [/color]
在/etc/rc.conf中增加mysql_enable="YES"
[/quote]

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

[quote]
[color=red]Q:[/color]
Can&#39;t call method "prepare" on an undefined value at /usr/local/httpd/htdocs/extman/libs/Ext/Mgr/MySQL.pm line 59.
[color=red]A: [/color]
在mysql.pm里将RaiseError => 0 改为1 这个是打开mysql更多的出错提示。
[/quote]

[quote]
[color=red]Q:[/color]
smtpd认证失败:无权限连接authdaemond
Nov 20 15:58:54 bsd6 postfix/smtpd[900]: warning: SASL authentication failure: cannot connect to Courier authdaemond: Permission denied
[color=red]A: [/color]
检查 authdaemond的socket所在目录及其父目录的属性是否对smtpd可读。如果不可读则出现这个问题(permission的问题)。chmod +x /var/spool/authdaemon
[/quote]

[quote]
[color=red]Q:[/color]
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
[color=red]A: [/color]
更改main.cf中
virtual_uid_maps = static:502
virtual_gid_maps = static:502组ID
[/quote]

[quote]
2006-01-13 15:22加入
[color=red]Q:[/color]
在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
[color=red]A: [/color]
ln -s /usr/local/postfix-2.2.8/src/sendmail/sendmail /usr/sbin/sendmail
[/quote]

有点乱,大家将就着看

yardian 发表于 2006-1-13 14:21

晕,那个地址怎么编辑啊?搞不好。算了就这样吧

extmail 发表于 2006-1-13 14:38

[quote][b]下面是引用yardian于2006-01-13 14:21发表的:[/b]
晕,那个地址怎么编辑啊?搞不好。算了就这样吧[/quote]

已经帮楼主做了美化,并且将地址问题搞定了。

其实很简单。只是做好[url]和[/url],中间塞地址即可。

yardian 发表于 2006-1-13 15:27

谢谢extmail做的美化!

extmail 发表于 2006-1-17 09:36

[quote][b]下面是引用yardian于2006-01-13 15:27发表的:[/b]
谢谢extmail做的美化![/quote]

加油哦!如果做出修改的话记得回一个帖,这样帖子就会跑到顶部:)

chengxx 发表于 2006-4-28 11:00

好东西,支持.
顺便提个问题,当出现下面这个错误后
localhost authdaemond: failed to connect to mysql server (server=localhost, userid=postfix):Can&#39;t connect to local MySQL server through socket &#39;/var/mysql/mysql.sock&#39; (2)
为什么有这么多要解决的东西,我看了一下,好象有三种,我们是应该全都改还是针对不同的问题用不同的方法改?

robert 发表于 2006-7-9 10:37

大家好!我是第一次来邮件开发网,希望大家多多关照.
我装CentOS 4.3 +mysql 5.0.15+postfix-2.3-RC6+courier-authlib-0.55+courier-imap-4.0.2+maildrop-1.8.0 完后.
1. telnet myip 110 ok.
2. telnet myip 25 failure!错误信息如下:
Jul  9 05:08:03 mail postfix/smtpd[9078]: warning: unsupported SASL server implementation: cyrus
Jul  9 05:08:03 mail postfix/smtpd[9078]: fatal: SASL per-process initialization failed
Jul  9 05:08:04 mail postfix/master[9058]: warning: process /usr/libexec/postfix/smtpd pid 9078 exit status 1
Jul  9 05:08:04 mail postfix/master[9058]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
请高手指点.我的EMAIL:bh_luo@163.com
谢谢!

extmail 发表于 2006-7-9 13:37

[quote][b]下面是引用robert于2006-07-09 10:37发表的smtp验证通不过:[/b]
大家好!我是第一次来邮件开发网,希望大家多多关照.
我装CentOS 4.3 +mysql 5.0.15+postfix-2.3-RC6+courier-authlib-0.55+courier-imap-4.0.2+maildrop-1.8.0 完后.
1. telnet myip 110 ok.
2. telnet myip 25 failure!错误信息如下:
Jul  9 05:08:03 mail postfix/smtpd[9078]: warning: unsupported SASL server implementation: cyrus
.......[/quote]

这个问题应该是您的sasl2没有打开authdaemon的支持。请重新编译sasl2并打开authdaemon的

支持,然后再测试。

robert 发表于 2006-7-10 19:48

TO extmail:
能否详细一点说明!

yesun 发表于 2006-7-17 21:06

我在安裝時也出現問題3 , 不知在哪有db*-devel 的rpm 文件啊?

betis 发表于 2006-12-25 11:33

大家好,我在安装邮件系统是参照冯勇的“在DEBIAN 下安装POSTFIX 邮件系统 ver:0.1” [url]http://www.sharesky.cn/docs/doc2/[/url] 安装的邮件系统,在调试过程中进行smtp验证时tail -f mail.log提示报错信息:
Dec 25 10:37:30 localhost postfix/smtpd[15338]: warning: SASL authentication failure: could not verify password
Dec 25 10:37:30 localhost postfix/smtpd[15338]: warning: unknown[127.0.0.1]: SASL login authentication failed
Dec 25 10:37:30 localhost authdaemond.mysql: received auth request, service=smtp, authtype=login
Dec 25 10:37:30 localhost authdaemond.mysql: authmysql: trying this module
Dec 25 10:37:30 localhost authdaemond.mysql: failed to connect to mysql server (server=localhost, userid=extmail)
Dec 25 10:37:30 localhost authdaemond.mysql: authmysql: TEMPFAIL - no more modules will be tried
我已经将这些信息都一一在google中查询过,但是按照我找到的信息进行修改以后,重新进行验证时仍然在日志中仍然有报错信息,请各位高手帮忙分析一下,另外我的主机名没有按照文档中所说的主机名进行修改,我不知道会不会 有影响。

booker2688 发表于 2007-1-18 13:18

写的很好了!基本可以得明白!

szrenhua 发表于 2007-2-14 03:30

[quote][b]下面是引用robert于2006-07-10 19:48发表的:[/b]
TO extmail:
能否详细一点说明![/quote]

wxy1681 发表于 2007-5-31 20:27

不错挺有用的!

churchmouse 发表于 2007-7-26 09:35

第一次来这个论坛看东西.感觉这里的版主和同志们讨论好激烈啊.支持一下.这篇文章我现在就去试试去.

zw2002 发表于 2007-9-26 09:10

不知道怎么解决!

Sep 24 18:44:08 localhost postfix/smtpd[4578]: warning: SASL authentication problem: unknown password verifier
Sep 24 18:44:08 localhost postfix/smtpd[4578]: warning: unknown[10.24.0.11]: SASL LOGIN authentication failed
Sep 24 18:44:08 localhost postfix/smtpd[4578]: lost connection after AUTH from unknown[10.24.0.11]
Sep 24 18:44:08 localhost postfix/smtpd[4578]: disconnect from unknown[10.24.0.11]

lionelguan 发表于 2008-9-25 14:00

怎么也不能进行认证,用saslfinger测试的结论如下
-- smtp is linked to --
        libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x280e5000)

-- active SMTP AUTH and TLS parameters for smtp --
No active SMTP AUTH and TLS parameters for smtp in main.cf!
SMTP AUTH can't work!
我main.cf里面的东西都是按照教程写的啊?没发现错误。不知道怎么解决了

flank 发表于 2009-2-23 09:22

不错 支持
又很多我也遇到过得问题

kinghy 发表于 2010-4-3 11:26

:handshake

ding!好文。

页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2009 Comsenz Inc.