ubuntu postfix+mysql+courier 虛擬郵箱SMTP驗證問題
ubuntu8.04 postfix+courier+mysql sasl
mail.log
Jul 11 11:43:15 ubuntu postfix/smtpd: connect from unknown
Jul 11 11:43:15 ubuntu postfix/smtpd: warning: unknown: SASL LOGIN authentication failed: authentication failure
Jul 11 11:43:15 ubuntu postfix/smtpd: lost connection after AUTH from unknown
Jul 11 11:43:15 ubuntu postfix/smtpd: disconnect from unknown
atuh.log
Jul 11 11:43:15 ubuntu postfix/smtpd: sql auxprop plugin using mysql engine
Jul 11 11:43:15 ubuntu postfix/smtpd: sql plugin Parse the username test@mydomain2.com
Jul 11 11:43:15 ubuntu postfix/smtpd: sql plugin try and connect to a host
Jul 11 11:43:15 ubuntu postfix/smtpd: sql plugin trying to open db 'postfix' on host '127.0.0.1'
Jul 11 11:43:15 ubuntu postfix/smtpd: sql plugin Parse the username test@mydomain2.com
Jul 11 11:43:15 ubuntu postfix/smtpd: sql plugin try and connect to a host
Jul 11 11:43:15 ubuntu postfix/smtpd: sql plugin trying to open db 'postfix' on host '127.0.0.1'
Jul 11 11:43:15 ubuntu postfix/smtpd: sql plugin Parse the username test@mydomain2.com
Jul 11 11:43:15 ubuntu postfix/smtpd: sql plugin try and connect to a host
Jul 11 11:43:15 ubuntu postfix/smtpd: sql plugin trying to open db 'postfix' on host '127.0.0.1'
Jul 11 11:43:15 ubuntu postfix/smtpd: begin transaction
Jul 11 11:43:15 ubuntu postfix/smtpd: sql plugin create statement from userPassword test mydomain2.com
Jul 11 11:43:15 ubuntu postfix/smtpd: sql plugin doing query select password from mailbox where username='test@mydomain2.com' and active = 1;
Jul 11 11:43:15 ubuntu postfix/smtpd: sql plugin create statement from cmusaslsecretPLAIN test mydomain2.com
Jul 11 11:43:15 ubuntu postfix/smtpd: sql plugin doing query select password from mailbox where username='test@mydomain2.com' and active = 1;
Jul 11 11:43:15 ubuntu postfix/smtpd: commit transaction
mysql日誌顯示已經查詢資料庫。
會是什麼原因呢?
[ 本帖最後由 zhangfengsh 於 2008-7-11 13:57 編輯 ]
《解決方案》
/etc/postfix/sasl/smtpd.conf
pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: plain login cram-md5 digest-md5
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: postfix
sql_passwd: yourpassword
sql_database: postfix
sql_select: select passwd from mailbox where username='%u@%r' and active = 1
main.cf
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_path = smtpd
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
/etc/courier/authmysqlrc
MYSQL_SERVER 127.0.0.1
MYSQL_USERNAME postfix
MYSQL_PASSWORD thepassword
MYSQL_DATABASE postfix
MYSQL_USER_TABLE mailbox
MYSQL_LOGIN_FIELD username
MYSQL_NAME_FIELD name
MYSQL_CRYPT_PWFIELD password
#MYSQL_CLEAR_PWFIELD password
MYSQL_MAILDIR_FIELD maildir
MYSQL_QUOTA_FIELD concat(quota,'S')
MYSQL_HOME_FIELD '/home/vmail'
MYSQL_UID_FIELD '5000'
MYSQL_GID_FIELD '5000'
《解決方案》
原帖由 zhangfengsh 於 2008-7-11 13:59 發表 http://bbs.chinaunix.net/images/common/back.gif
/etc/postfix/sasl/smtpd.conf
pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: plain login cram-md5 digest-md5
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: postfix
sql_pass ...
密碼的加密方式的問題嘛
《解決方案》
密碼的加密方式?
是MySQL里的password的加密方式么?
還是smtpd.conf里設置什麼嗎
可否多說幾句?無從下手...
[ 本帖最後由 zhangfengsh 於 2008-7-11 15:09 編輯 ]
《解決方案》
我把smtpd.conf里的
mech_list: plain login cram-md5 digest-md5
改為
mech_list: plain login
還是不行。。。
《解決方案》
原帖由 zhangfengsh 於 2008-7-11 15:12 發表 http://bbs.chinaunix.net/images/common/back.gif
我把smtpd.conf里的
mech_list: plain login cram-md5 digest-md5
改為
mech_list: plain login
還是不行。。。
password_format看看sasl的這個參數
《解決方案》
依言在smtpd.conf做了改動:
加入
srp_mda:md5
password_format: crypt
依然是不行,outlook仍要求輸入用戶密碼。
mail.log,auh.log顯示內容也與前相同。
《解決方案》
原帖由 zhangfengsh 於 2008-7-11 15:37 發表 http://bbs.chinaunix.net/images/common/back.gif
依言在smtpd.conf做了改動:
加入
srp_mda:md5
password_format: crypt
依然是不行,outlook仍要求輸入用戶密碼。
mail.log,auh.log顯示內容也與前相同。
你確認的密碼加密方式是crypt?
告訴你一個很不好的消息,如果sasl要支持crypt加密,是要打補丁的.
具體方法
http://www.thismail.org/bbs/viewthread.php?tid=2251&extra=page%3D1
《解決方案》
用戶密碼是Postfixadmin產生的。
應該是md5crypt
postfixadmin的配置文件config.inc.php中有:$CONF['encrypt'] = 'md5crypt';
把mysql中password改為明文。可以發信了。但是卻收不了信了。
應該正是你所說的這個問題。
非常感謝!!!
[ 本帖最後由 zhangfengsh 於 2008-7-11 18:56 編輯 ]