Exchange日历文件夹中的幻像消息

时间:2015-03-19 17:33:31

标签: exchange-server imap

我正在开发一个IMAP客户端,并针对Microsoft Exchange服务器进行测试。当我选择Calendar邮箱时,UID SEARCH表示邮箱中有邮件,但UID FETCH无法获取邮件:

S: * OK The Microsoft Exchange IMAP4 service is ready.
...
C: 38 SELECT "Calendar"
S: * 13 EXISTS
S: * 0 RECENT
S: * FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
S: * OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)] Permanent flags
S: * OK [UIDVALIDITY 37122] UIDVALIDITY value
S: * OK [UIDNEXT 190] The next unique identifier value
S: 38 OK [READ-WRITE] SELECT completed.
C: 39 UID SEARCH OR UNSEEN FLAGGED
C: 40 UID SEARCH SEEN UNFLAGGED SINCE 19-Oct-2014
S: * SEARCH
S: 39 OK SEARCH completed.
S: * SEARCH 90 183
S: 40 OK SEARCH completed.
C: 41 UID FETCH 90,183 (ENVELOPE INTERNALDATE FLAGS BODY.PEEK[])
S: 41 OK FETCH completed.

我认为Calendar是某种虚拟邮箱,但这种行为对我没有意义 - 如果不能UID SEARCH,服务器为什么会返回消息uid FETCH 1}}他们?有没有办法获取这些消息,或以某种方式使用IMAP操纵它们?


更新:升级到2010 SP3后,似乎Exchange服务器改变了主意。现在它至少返回一些内容以响应FETCH命令:

C: 120 UID FETCH 773,948 (ENVELOPE INTERNALDATE FLAGS BODY.PEEK[])
S: * 16 FETCH (ENVELOPE (NIL "Retrieval using the IMAP4 protocol failed for the following message: 773" (("Microsoft Exchange Server 2010" NIL NIL ".MISSING-HOST-NAME.")) NIL NIL (("██████████" NIL "██████████" "██████████")) NIL NIL NIL NIL) INTERNALDATE "05-Mar-2015 17:22:02 +0000" FLAGS (\Seen) BODY[] {783}
S: <783 bytes omitted>
S:  UID 773)
S: * 17 FETCH (ENVELOPE (NIL "Retrieval using the IMAP4 protocol failed for the following message: 948" (("Microsoft Exchange Server 2010" NIL NIL ".MISSING-HOST-NAME.")) NIL NIL (("██████████" NIL "██████████" "██████████")) NIL NIL NIL NIL) INTERNALDATE "11-Mar-2015 17:56:04 +0000" FLAGS (\Seen) BODY[] {747}
S: <747 bytes omitted>
S:  UID 948)
S: 120 OK FETCH completed.

消息如下所示:

MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
From: Microsoft Exchange Server 2010
To: ███████████ <████████@██████████.com>
Subject: Retrieval using the IMAP4 protocol failed for the following
 message: 773
Content-Transfer-Encoding: quoted-printable

The server couldn't retrieve the following message:

Subject: "████ █████ ███████ ██ ████ ███ █████ ███████.. ███ ███ ██████ ███=
██!"
From: "███████████  ██████████" ("/O=3D████████/OU=3D████████ █████████████=
█ █████ (███████████████)/CN=3D██████████/CN=3D███████████  █████████████")
Sent date: 3/5/2015 5:22:02 PM

The message hasn't been deleted. You might be able to view it using either =
Outlook or Outlook Web App. You can also contact the sender to find out wha=
t the message says.=

1 个答案:

答案 0 :(得分:2)

听起来像服务器错误。 Exchange&#34; implaments IMAP&#34;并不是秘密。为了能够在评估投标时勾选所需的复选框。你也会看到其他的bug。

获取该邮箱据称包含的所有UID的列表并尝试逐个获取它们以查看它们中是否至少有一些返回某些可用值可能会很有趣。但是,考虑到这是一个名为&#34; Calendar&#34;的邮箱,很可能它只是一些随机的Exchange数据导出,只有通过MAPI才有意义。随机谷歌搜索结果为https://technet.microsoft.com/en-us/library/aa998606%28v=exchg.150%29.aspx,这表明可以将Exchange配置为以各种格式提供这些日历数据。也许你的服务器是&#34;配置错误&#34;。

TL; DR:它的交流。别浪费时间。