ExtMail服务器社区's Archiver

xiexiela 发表于 2010-7-27 21:21

postfix 编译加了对cyrus-sasl2的支持,但用postconf -a 看却不支持

我用postfix-2.7.0  源码编译后不支持cyrus-sasl2

编译步骤:
      1,patch -p1 < ../postfix-vda-2.7.0.patch
            2,make -f Makefile.init makefiles  'CCARGS=-DUSE_SASL_AUTH -DHAS_MYSQL -I/usr/local/mysql/include/mysql -I/usr/local/cyrus-sasl2/include/sasl' 'AUXLIBS=-L/usr/local/mysql/lib/mysql -L/usr/local/cyrus-sasl2/lib/sasl2 -lmysqlclient -lsasl2 -lz -lm'
            3,make && make install
都通过了,[color=Red]但就是用postconf -a 还只显示dovecot,没有cyrus[/color],这是为什么呢?

用telnet localhost 25  也出现如下:
[root@mail postfix-2.7.0]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 damo.com ESMTP Mail System
ehlo mail
250-mail.damo.com
250-PIPELINING
250-SIZE 40000000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
auth login
503 5.5.1 Error: authentication not enabled

xiexiela 发表于 2010-7-28 16:23

问题解决了,加上-DUSE_CYRUS_SASL就好了,看来还得细心细心再细心了

xiexiela 发表于 2010-7-29 15:32

现在新的问题了出来了   extmail前端可以发信,用outlook的就是通不过,请大家帮忙看看,是哪里错了
1,telnet部分
[root@mail ~]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 mail.damo.com ESMTP Postfix - by damo.com
ehlo mail
250-mail.damo.com
250-PIPELINING
250-SIZE 40000000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
auth login
334 VXNlcm5hbWU6
dGVzdEBseWNlZW0uY29t
334 UGFzc3dvcmQ6
dGVzdA==
535 5.7.8 Error: authentication failed: generic failure
quit
221 2.0.0 Bye
Connection closed by foreign host.

2,authtest 部分
/usr/local/courier-authlib/sbin/authtest -s login [email=test@damo.com]test@damo.com[/email] test
Authentication succeeded.

     Authenticated: [email=test@damo.com]test@damo.com[/email]  (uid 1001, gid 1001)
    Home Directory: /usr/local/maildata/damo.com/test
           Maildir: /usr/local/maildata/damo.com/test/Maildir/
             Quota: 5242880
Encrypted Password: $1$3mnFSZTu$Qz/5402Se9b3w4FSP6FGn.
Cleartext Password: test
           Options: (none)
3.maillog部分
Jul 29 17:34:02 mail extmail[24411]: user=<[email=test@damo.com]test@damo.com[/email]>, client=61.170.205.95, module=login, status=loginok
Jul 29 17:34:27 mail authdaemond: received auth request, service=login, authtype=login
Jul 29 17:34:27 mail authdaemond: authmysql: trying this module
Jul 29 17:34:27 mail authdaemond: authmysqllib: connected. Versions: header 50144, client 50144, server 50144
Jul 29 17:34:27 mail authdaemond: SQL query: SELECT username,password,"",uidnumber,gidnumber,  ...CONCAT('/usr/local/maildata/',homedir), .  ...CONCAT('/usr/local/maildata/',maildir),..  ...quota,......  ...name......  ...FROM mailbox.....  ...WHERE username = 'test@damo.com'
Jul 29 17:34:27 mail authdaemond: password matches successfully
Jul 29 17:34:27 mail authdaemond: authmysql: sysusername=<null>, sysuserid=1001, sysgroupid=1001, homedir=/usr/local/maildata/damo.com/test, address=test@damo.com, fullname=<null>, maildir=/usr/local/maildata/damo.com/test/Maildir/, quota=5242880S, options=<null>
Jul 29 17:34:27 mail authdaemond: authmysql: clearpasswd=<null>, passwd=$1$9fwcuXWL$f2nQXkaBLxFnkp0tnF2fk0
Jul 29 17:34:27 mail authdaemond: Authenticated: sysusername=<null>, sysuserid=1001, sysgroupid=1001, homedir=/usr/local/maildata/damo.com/test, address=test@damo.com, fullname=<null>, maildir=/usr/local/maildata/damo.com/test/Maildir/, quota=5242880S, options=<null>
Jul 29 17:34:27 mail authdaemond: Authenticated: clearpasswd=test, passwd=$1$9fwcuXWL$f2nQXkaBLxFnkp0tnF2fk0
Jul 29 17:35:42 mail postfix/smtpd[24488]: connect from localhost.localdomain[127.0.0.1]
Jul 29 17:36:28 mail postfix/smtpd[24488]: warning: SASL authentication failure: cannot connect to Courier authdaemond: Connection refused
Jul 29 17:36:28 mail postfix/smtpd[24488]: warning: localhost.localdomain[127.0.0.1]: SASL login authentication failed: generic failure
Jul 29 17:36:31 mail postfix/smtpd[24488]: disconnect from localhost.localdomain[127.0.0.1]

4,smtpd部分
[root@mail ~]# cat /usr/lib/sasl2/smtpd.conf
pwcheck_method:authdaemond
log_level:3
mech_list:plain login
authdamenod_path:/usr/local/courier-authlib/var/spool/authdaemon/socket
allow_plaintext:true
auxprop_plugin:mysql
sql_hostnames:localhost
sql_user:extmail
sql_passwd:extmail
sql_database:extmail
sql_select:select password from mailbox where username='%u'


[root@mail ~]# ps -aux | grep authdaemond
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
root      3208  0.0  0.0   1740   424 ?        S    13:15   0:00 /usr/local/courier-authlib/sbin/courierlogger -pid=/usr/local/courier-authlib/var/spool/authdaemon/pid -start /usr/local/courier-authlib/libexec/courier-authlib/authdaemond
root      3209  0.0  0.0   4500  1116 ?        S    13:15   0:00 /usr/local/courier-authlib/libexec/courier-authlib/authdaemond
root     22573  0.0  0.0   4548  1304 ?        S    14:38   0:00 /usr/local/courier-authlib/libexec/courier-authlib/authdaemond
root     22574  0.0  0.0   4500   384 ?        S    14:38   0:00 /usr/local/courier-authlib/libexec/courier-authlib/authdaemond
root     22575  0.0  0.0   4548  1304 ?        S    14:38   0:00 /usr/local/courier-authlib/libexec/courier-authlib/authdaemond
root     22576  0.0  0.0   4548  1300 ?        S    14:38   0:00 /usr/local/courier-authlib/libexec/courier-authlib/authdaemond
root     22577  0.0  0.0   4548  1300 ?        S    14:38   0:00 /usr/local/courier-authlib/libexec/courier-authlib/authdaemond
root     24537  0.0  0.0   4272   728 pts/0    S+   17:42   0:00 grep authdaemond

[[i] 本帖最后由 xiexiela 于 2010-7-29 15:36 编辑 [/i]]

julyclyde 发表于 2010-9-7 15:59

smtpd是不是chroot了?看看master.cf

页: [1]

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