2015-01-08 44 views
-1

我正在嘗試在CentOS 7開發機器上使用localhost作爲電子郵件安裝JavaMail。爲此,我安裝了dovecot,postfixmailx。我剛剛使用the instructions in this tutorial安裝了dovecot但是,當我嘗試閱讀收件箱時,我的JavaMail測試代碼一直給我提供各種身份驗證錯誤。如何解決這些身份驗證錯誤,以便我可以登錄?javax.mail.MessagingException:* BYE發生內部錯誤

起初,我正在與沒有找到一個證書錯誤,但我可以通過改變協議imap而不是imaps解決註釋掉在配置文件ssl任何提及,所有的這些錯誤,並通過將身份驗證更改爲plain而不是login。 (我可以做所有這些事情,因爲它是一個開發機器,我只是想在以後添加安全之前得到JavaMail工作。)但是,所有這些改變之後,我仍然得到:

javax.mail.MessagingException: * BYE Internal error occurred. 
Refer to server log for more information. 

的代碼行拋出的錯誤是:

store.connect("localhost.localdomain", "root", "somepassword"); 

注意,在localhost.localdomain CentOS的終端結果鍵入hostname

/var/log/maillog記錄:

Jan 8 16:08:01 localhost dovecot: imap-login: Login: user=<root>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=7965, secured, session=<yb8l8ywMdwB/AAAB> 
Jan 8 16:08:01 localhost dovecot: imap: Error: user root: Invalid settings in userdb: userdb returned 0 as uid 
Jan 8 16:08:01 localhost dovecot: imap: Error: Invalid user settings. Refer to server log for more information. 
+0

什麼是在鴿舍日誌? – Max

回答

2

達夫科特不會讓你以root身份登錄。使用其他用戶和userid。

+0

感謝您和+1的快速響應。 – CodeMed

相關問題