我的任务是编写一个小型应用程序,以帮助将 Linux IMAP 服务器上的公用文件夹结构中超过 400GB 的电子邮件迁移到 MS Exchange 2010 公用文件夹。
我看过 Outlook 的拖放功能,但有一个问题。 Outlook 在推送到 Exchange 之前将所有电子邮件本地缓存到 pst 文件中。目前这些文件的限制为 20GB。
现在不是一个强大的 C# 开发人员,有没有办法使用 Outlook 作为 imap 服务器和交换的连接器,然后使用 C# 遍历文件夹结构并复制电子邮件?
重要的是我们不会丢失任何原始电子邮件标头/源数据。
我知道与 Exchange 2010 中的公用文件夹通信的唯一方法是使用 Exchange Web 服务,但是从示例中我看到这可能会更改电子邮件源。我希望 Outlook 能够帮助保存这些数据,并使用 mapi 接口消除执行这些 Web 服务调用的需要。
虽然我说过我正在使用 C#,但我愿意用另一种语言(java、perl、php 等)编写它,我只需要想出一些可以帮助解决我的问题的东西。
SO 社区中的任何人都可以给我任何指示来帮助解决这个问题或为我指出正确的方向吗?
非常感谢,
格兰特
I've been given the task of writing a small application to help migrate over 400GB of emails sitting in a public folder structure on a linux IMAP server, to a MS Exchange 2010 Public folders.
I've looked at drag and drop with outlook, but there is a problem. Outlook caches all the email locally to a pst file before pushing to Exchange. Currently the limit for these files is 20GB.
Now not being a strong developer in C#, is there a way to use outlook as a connector to both the imap server and exchange and then use C# to walk the folder structure and copy the emails??
What is important is that we don't loose any of the original email header/source data.
I know that the only way to talk to public folders in Exchange 2010 is using the Exchange Web services, however from examples I have seen this may change the email source. I am hoping that outlook will help preseve this data and using the mapi interface negate the need to do these web service calls.
Although I have said that I am using C# I am willing to write this in another language (java, perl, php etc), I just need to come up with something that will help with my problem.
Can anyone in the SO community give me any pointers to help with this problem or point me in the right direction??
Many thanks,
Grant
发布评论
评论(1)
恐怕在不更改电子邮件源的情况下无法将数据迁移到 MS Exchange 2010。 Exchange 2007 不再存储实际的 MIME 数据(这是从 IMAP 服务器获取的格式),而仅根据需要重新构建它。他们只存储所谓的“MIME 骨架” - 请参阅此 MS 论坛。我在那个论坛中没有找到,但我自己观察到的是,这个反向过程通常不会产生与原始消息相同的消息 - MIME 实体的内容没有改变,但它的结构经常被改变 - 使用不同的内容传输编码,添加或修改一些标头,等等。
至少用户邮箱中的邮件是这样存储的 - 但我的猜测是公共文件夹也是如此。另外,Exchange 2010 的行为可能与 Excahnge 2007 不同。
虽然我不是 MAPI 专家,但我认为 MIME 格式甚至没有在其中使用(Outlook 甚至无法保存 MIME 格式的消息),这将使 MAPI 不太可能成为保留电子邮件源的解决方案。
因此,我的建议是执行您已经尝试过的操作 - 从 IMAP 服务器获取 MIME 格式的电子邮件数据并使用 Exchange Web 服务存储它。我们这样做是为了将电子邮件消息从 IMAP 服务器移动到 Exchange 2007 用户邮箱中,并且从未遇到过任何损坏电子邮件的问题(但话又说回来,我们没有 400GB 的数据)。
I'm afraid it's not possible to migrate data to MS Exchange 2010 without changing the e-mail source. Exchange 2007 no longer stores the actual MIME data (which is the format you get from the IMAP server) and only re-constructs it on-demand. They only store what they call a "MIME Skeleton" - see this MS forum. What I have not found in that forum but observed myself is the that this reverse process doesn't usually produce a message identical to the original one - the content of MIME entities is unchanged, but its structure is often altered - different content-transfer-encodings are used, some headers or added or modified, and so on.
At least that's how messages in user mailboxes are stored - but my guess is that it's the same for public folders. Also, it is possible (although unlikely) that Exchange 2010 behaves differently than Excahnge 2007.
And while I'm not an expert on MAPI, I think that MIME format is not even used in it (Outlook can't even save a message in MIME format), which would make MAPI an unlikely solution for preserving the email source.
So my advice is to do what you already tried - get the e-mail data from the IMAP server in MIME format and store it using Exchange Web Services. We are doing this to move e-mail messahgs from an IMAP server into Exchange 2007 user mailbox and never had any problems with broken e-mails (but then again we don't have 400GB of data).