歡迎您光臨本站 註冊首頁

postfix+webmail認證問題?

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

postfix+webmail認證問題?

使用postfix+webmail+webman+amavis+spam+cyrus-sasl+maildrop+courier-authlib+clamav+courier-imap+apache源碼編譯安裝.

vi /usr/local/mail/courier-authlib/etc/authlib/authdaemonrc
authmodulelist="authmysql"
authmodulelistorig="authmysql"
daemons=10

vi /usr/local/mail/courier-authlib/etc/authlib/authmysqlrc
MYSQL_SERVER   localhost  
MYSQL_USERNAME  extmail
MYSQL_PASSWORD  extmail
MYSQL_DATABASE  extmail
MYSQL_PORT      3306
MYSQL_OPT       0
MYSQL_SOCKET  /tmp/mysql.sock  
MYSQL_USER_TABLE  mailbox
MYSQL_CLEAR_PWFIELD  password
DEFAULT_DOMAIN  test.com  
MYSQL_UID_FIELD  '1001'
MYSQL_GID_FIELD  '1001'
MYSQL_LOGIN_FIELD  username  
MYSQL_HOME_FIELD   concat('/var/mailbox/',maildir)
MYSQL_NAME_FIELD  name    
MYSQL_MAILDIR_FIELD   concat('/var/mailbox/',maildir)

smtpd.conf內容如下:
vi /usr/local/mail/cyrus-sasl/lib/sasl2/smtpd.conf
pwcheck_method:authdaemonds
mech_list:PLAIN LOGIN
log_level:3
authdaemond_path:/usr/local/mail/courier-authlib/var/spool/authdaemon/socket

執行maildrop -v命令后出現以下信息,證明maildrop成功.       
maildrop -v
maildrop 2.1.0 Copyright 1998-2005 Double Precision, Inc.
GDBM/DB extensions enabled.
Courier Authentication Library extension enabled.
Maildir quota extension enabled.
This program is distributed under the terms of the GNU General Public
License. See COPYING for additional information.

執行以下命令進行認證測試
mail mail # /usr/local/mail/courier-authlib/sbin/authtest -s login jason@test.com 123456
Authentication FAILED: Input/output error
mail mail #
如上報錯信息.
var/log/messages 信息如下:
mail ~ # tail -F /var/log/messages
Sep  4 06:45:56 mail authdaemond: received auth request, service=login, authtype=login
Sep  4 06:45:56 mail authdaemond: authmysql: trying this module
Sep  4 06:45:56 mail authdaemond: authmysql: mysql_select_db(extmail.) error: Incorrect database name 'extmail.'
Sep  4 06:45:56 mail authdaemond: authmysql: TEMPFAIL - no more modules will be tried

紅色字體是什麼原因呢?查看過配置文件與msyql資料庫信息.沒有發現database name 'extmail.'mysql中的是extmail.這個database name 'extmail.'是那來的呢?

[ 本帖最後由 bobobian 於 2009-9-3 22:50 編輯 ]
《解決方案》

extmail.的資料庫是有點怪
authmysqlrc文件沒發現什麼問題
smtpd.conf文件寫錯了
www.extmail.org/doc
你參考下官方的配置

[ 本帖最後由 liu-shaobo 於 2009-9-3 23:03 編輯 ]
《解決方案》

原帖由 bobobian 於 2009-9-3 22:48 發表 http://bbs2.chinaunix.net/images/common/back.gif
使用postfix+webmail+webman+amavis+spam+cyrus-sasl+maildrop+courier-authlib+clamav+courier-imap+apache源碼編譯安裝.

vi /usr/local/mail/courier-authlib/etc/authlib/authdaemonrc
authmodulelist= ...


你檢查一下你的數據方面的設置。另注意
authmysqlrc文件中的間格要用tab來分。要不然會有問題的
《解決方案》

'extmail.'

------是不是多了個「.」
《解決方案》

回復樓上各位,authmysqlrc文件我是使用tab來隔開的.而且mysql資料庫里存在的資料庫為"extmail",而不是"extmail.".
smtpd.conf文件的內容該怎麼寫呢?
《解決方案》

問題解決了.authdaemonrc 文件內容好象被我在windwos下打開過.在linux下使用vi工具從新編輯問題解決.

[火星人 ] postfix+webmail認證問題?已經有607次圍觀

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