iT邦幫忙

0

centos5.4+sendmail,dovecot ,使用imap 收不到信

匿名 2013-12-20 09:46:207693 瀏覽
  • 分享至 

  • xImage

dovecot,裡頭有開imap,imaps,pop3,pop3s

公司有設定一個公用的帳號,用imap收信

其它帳號用pop3沒問題,都收的下來信

就是這個公用的帳號收不到信,測試設定也都正常,

用webmail查看寄到此公用帳號的信都有進來,但是imap卻都收不下來

我有試著用pop3來收,此公用帳號就能收到信了,不知道是否哪裡有設定錯誤,請前輩指點

wiseguy iT邦超人 1 級 ‧ 2013-12-25 22:47:55 檢舉
很好!自己可以找到問題所在,就是最佳的經驗!讚
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

2 個回答

6
wiseguy
iT邦超人 1 級 ‧ 2013-12-20 15:01:57
最佳解答

imap卻都收不下來,有試著用pop3來收,此公用帳號就能收到信了,不知道是否哪裡有設定錯誤

很明顯的,就是 pop3 設定正確,imap 設定錯誤。你自己回答了不是嗎?

PS. 沒有把設定檔內容放上來,別說前輩,神仙也不知道哪裡設定錯誤。

看更多先前的回應...收起先前的回應...
匿名 檢舉

請問是需要dovecot的設定嗎,或者還需要看看其它的部份

hon2006 iT邦大師 1 級 ‧ 2013-12-20 17:10:07 檢舉

先確認 imap 連線能力
可以參考 http://support.microsoft.com/kb/189326
再去看 maillog .
grep '公用的帳號' /var/log/maillog (不一定在這個路徑)
看有什麼錯誤

匿名 檢舉

你好,我telnet是可以連,有出現ok的訊息,只是第三步之後我就不知道怎麼做了

/var/log/maillog 我查了沒有任何錯誤(連線)的訊息

請問若連線成功是不是應該會有imap的字樣等的訊息?

hon2006 iT邦大師 1 級 ‧ 2013-12-21 09:19:12 檢舉

To quickly test an imap server using telnet use:
telnet server 143
01 LOGIN username password
02 LIST "" *
03 SELECT mailbox

Line 02 shows you all available mailboxes.

To show the information about a mailbox:
04 STATUS mailbox (MESSAGES)
Between () you can place one or more of the following: MESSAGES, UNSEEN, RECENT UIDNEXT UIDVALIDITY

And one of the following commands to view the a message 1 is the first message * is wildcard for all:
05 FETCH 1 ALL # All IMAP headers
05 FETCH 1 FULL # Full headers and body info
05 FETCH 1 BODY # Body
05 FETCH 1 ENVELOPE # Envelope
05 FETCH * FULL # All email

To fully retrieve a message use:
06 UID fetch 1:1 (UID RFC822.SIZE FLAGS BODY.PEEK[])

hon2006 iT邦大師 1 級 ‧ 2013-12-21 09:21:32 檢舉

要打01 LOGIN 帳號 密碼

匿名 檢舉

你好,請問這是測試方法嗎我看不懂,我到ok那裡就不知道要怎麼做了,沒有叫你輸入帳密的地方

<pre class="c" name="code"> telnet 192.168.6.25 143
Trying 192.168.6.25...
Connected to Mail.test.com.tw (192.168.6.25).
Escape character is '^]'.
* OK Dovecot ready.
hon2006 iT邦大師 1 級 ‧ 2013-12-23 17:53:28 檢舉

ok 之後打
01 LOGIN 帳號 密碼

匿名 檢舉

你好出現了
01 OK Logged in.
就停住不動了

匿名 檢舉

SORRY

我繼續打 02 LIST "" *
* LIST (\NoInferiors \UnMarked) "/" "&W8RO9lCZTv0-"
* LIST (\NoInferiors \UnMarked) "/" "&g0l6Pw-"
* LIST (\NoInferiors \UnMarked) "/" "&UiqWZHaEkPVO9g-"
* LIST (\NoInferiors \UnMarked) "/" "Infected Items"
* LIST (\NoInferiors \UnMarked) "/" "&V4NXPpD1TvY-"
* LIST (\NoInferiors \UnMarked) "/" "INBOX"

03 SELECT mailbox
出現如下
03 NO Mailbox doesn't exist: mailbox

匿名 檢舉

sorry
因為我沒試過用IMAP收信是新公司說要,之前都只用pop3
建好帳號就能用pop3收了
imap是否有少了什麼東西,要另外建收件夾之類的?

hon2006 iT邦大師 1 級 ‧ 2013-12-25 10:25:08 檢舉

不是打 03 SELECT mailbox
是要打 03 SELECT "INBOX"

貼一個 client 不能收 imap 的畫面來看,會不會是你的 client 沒設定好

匿名 檢舉

outlook 用imap測試外送內寄伺服器都ok沒有任何錯誤訊息,但是信收不進來

剛試了第三步出現錯誤

<pre class="c" name="code">01 OK Logged in.
02 LIST "" *
* LIST (\NoInferiors \UnMarked) "/" "&W8RO9lCZTv0-"
* LIST (\NoInferiors \UnMarked) "/" "&g0l6Pw-"
* LIST (\NoInferiors \UnMarked) "/" "&UiqWZHaEkPVO9g-"
* LIST (\NoInferiors \UnMarked) "/" "Infected Items"
* LIST (\NoInferiors \UnMarked) "/" "&V4NXPpD1TvY-"
* LIST (\NoInferiors \Marked) "/" "INBOX"
02 OK List completed.
03 SELECT INBOX
03 NO Internal error occurred. Refer to server log for more information. [2013-1
2-25 11:35:48]
匿名 檢舉

匿名 檢舉

dovecot.log

<pre class="c" name="code">ovecot: Dec 25 11:56:58 Info: imap-login: Login: user=<test>, method=PLAIN, rip=192.168.6.107, lip=192.168.6.25
dovecot: Dec 25 11:57:34 Info: IMAP(test): Disconnected: Logged out
dovecot: Dec 25 11:57:34 Info: IMAP(test): Disconnected: Logged out
dovecot: Dec 25 11:57:47 Info: IMAP(test): Connection closed
dovecot: Dec 25 11:57:47 Info: IMAP(test): Connection closed
dovecot: Dec 25 11:57:50 Info: IMAP(test): Disconnected: Logged out
dovecot: Dec 25 11:57:50 Info: IMAP(test): Disconnected: Logged out
dovecot: Dec 25 11:57:52 Info: IMAP(test): Disconnected: Logged out
dovecot: Dec 25 11:58:01 Info: imap-login: Login: user=<test>, method=PLAIN, rip=192.168.6.1, lip=192.168.6.25
匿名 檢舉
<pre class="c" name="code">dovecot: Dec 25 11:58:01 Info: IMAP(test): Disconnected in ItestE
dovecot: Dec 25 11:58:07 Info: imap-login: Login: user=<test>, method=PLAIN, rip=192.168.6.107, lip=192.168.6.25
dovecot: Dec 25 11:58:48 Info: IMAP(test): Connection closed
dovecot: Dec 25 11:58:53 Info: imap-login: Login: user=<test>, method=PLAIN, rip=192.168.6.1, lip=192.168.6.25
dovecot: Dec 25 11:58:53 Info: IMAP(test): Disconnected in ItestE
dovecot: Dec 25 11:59:02 Info: imap-login: Login: user=<test>, method=PLAIN, rip=192.168.6.1, lip=192.168.6.25
dovecot: Dec 25 11:59:02 Info: imap-login: Login: user=<test>, method=PLAIN, rip=192.168.6.1, lip=192.168.6.25
匿名 檢舉
<pre class="c" name="code">dovecot: Dec 25 11:59:08 Info: imap-login: Login: user=<test>, method=PLAIN, rip=192.168.6.107, lip=192.168.6.25
dovecot: Dec 25 11:59:08 Info: imap-login: Login: user=<test>, method=PLAIN, rip=192.168.6.107, lip=192.168.6.25
dovecot: Dec 25 11:59:10 Info: imap-login: Login: user=<test>, method=PLAIN, rip=192.168.6.125, lip=192.168.6.25
dovecot: Dec 25 11:59:10 Info: imap-login: Login: user=<test>, method=PLAIN, rip=192.168.6.125, lip=192.168.6.25
dovecot: Dec 25 11:59:42 Info: imap-login: Login: user=<test>, method=PLAIN, rip=192.168.6.1, lip=192.168.6.25, TLS
dovecot: Dec 25 11:59:43 Info: imap-login: Login: user=<test>, method=PLAIN, rip=192.168.6.1, lip=192.168.6.25, TLS
dovecot: Dec 25 11:59:43 Info: imap-login: Login: user=<test>, method=PLAIN, rip=192.168.6.100, lip=192.168.6.25
dovecot: Dec 25 11:59:43 Info: imap-login: Login: user=<test>, method=PLAIN, rip=192.168.6.100, lip=192.168.6.25
匿名 檢舉
<pre class="c" name="code">dovecot: Dec 25 11:59:47 Info: IMAP(test): Disconnected: Logged out
dovecot: Dec 25 11:59:47 Info: IMAP(test): Disconnected: Logged out
dovecot: Dec 25 11:59:47 Info: IMAP(test): Disconnected: Logged out
dovecot: Dec 25 11:59:51 Info: IMAP(test): Disconnected: Logged out
dovecot: Dec 25 11:59:52 Info: IMAP(test): Disconnected: Logged out
dovecot: Dec 25 11:59:58 Info: imap-login: Login: user=<test>, method=PLAIN, rip=192.168.6.1, lip=192.168.6.25
dovecot: Dec 25 11:59:58 Info: imap-login: Login: user=<test>, method=PLAIN, rip=192.168.6.1, lip=192.168.6.25
dovecot: Dec 25 12:00:03 Info: imap-login: Login: user=<test>, method=PLAIN, rip=192.168.6.118, lip=192.168.6.25
dovecot: Dec 25 12:00:03 Info: imap-login: Login: user=<test>, method=PLAIN, rip=192.168.6.118, lip=192.168.6.25
匿名 檢舉
<pre class="c" name="code">dovecot: Dec 25 12:00:25 Info: IMAP(test): Disconnected: Logged out
dovecot: Dec 25 12:00:25 Info: IMAP(test): Disconnected: Logged out
dovecot: Dec 25 12:00:45 Info: IMAP(test): Disconnected: Logged out
dovecot: Dec 25 12:00:45 Info: IMAP(test): Disconnected: Logged out
dovecot: Dec 25 12:00:47 Info: IMAP(test): Disconnected: Logged out
dovecot: Dec 25 12:00:47 Info: IMAP(test): Disconnected: Logged out
dovecot: Dec 25 12:00:53 Info: IMAP(test): Disconnected: Logged out
dovecot: Dec 25 12:00:53 Info: imap-login: Login: user=<test>, method=PLAIN, rip=192.168.6.100, lip=192.168.6.25
dovecot: Dec 25 12:01:04 Info: IMAP(test): Connection closed
dovecot: Dec 25 12:01:04 Info: IMAP(test): Connection closed
匿名 檢舉

剛又仔細看了dovecot.conf, 發現我好像之前手賤
很久很久以前為了測試imap所以用一個備份的,但是後來不用所以關了,但也忘了改回來,因為一直用pop3所以也忘了=_=

原本

<pre class="c" name="code">protocol imap {
#mail_location = mbox:~/mail/imap:INBOX=/var/spool/mail/%u
mail_location = mbox:~/mail/imap:INBOX=/var/spool/mail_backup/%u

改為之後就正常了...

<pre class="c" name="code">protocol imap {
mail_location = mbox:~/mail/imap:INBOX=/var/spool/mail/%u
#mail_location = mbox:~/mail/imap:INBOX=/var/spool/mail_backup/%u
2
mwu4
iT邦新手 2 級 ‧ 2013-12-23 00:24:11

如果webmail看得到信,因一般webmail係使用imap方式收信,因此或許可再檢查用戶端的imap設定是否和dovecot一致。謝謝。

匿名 檢舉

你好我已試過很多次了outlook imap怎樣都無法收

因為我沒試過用IMAP收信是新公司說要,之前都只用pop3
建好帳號就能用pop3收了
imap是否有少了什麼東西,要另外建收件夾之類的?

我要發表回答

立即登入回答