ruperty
(Ruperty)
1
我正在关注 Gerhard 关于导入 mbox 帖子的精彩主题 https://meta.discourse.org/t/importing-mailing-lists-mbox-listserv-google-groups-emails/79773。
不过,该主题并未提及附件。Discourse 导入如何处理附件?
我正在从 Eudora 导入 mbox 文件。在这些文件中,附件通过类似“附件已转换:"C:\Data\Email\Attachments\Imagination Mode 3.gif"”的文本进行引用。
即使附件位于不同配置的文件夹中,Eudora 也能识别这些附件。
我该如何在导入中包含附件?
gerhard
(Gerhard Schlager)
2
The import script assumes that attachments are stored within the mbox file. You’ll need to modify the script in order to import converted attachments.
ruperty
(Ruperty)
3
Thanks.
Do you mean the file, /var/www/discourse/script/import_scripts/mbox/importer.rb?
I am not familiar with ruby or the libraries/classes being called here, could you give me a clue on what needs to be modified please?
ruperty
(Ruperty)
4
对于我在此处需要做什么,有什么建议吗?
或者,我可以将附件放在服务器的某个位置,然后从消息中链接到它们?如有必要,我可以将引用路径更改为 URL。
如果我是你,我会尝试将您的 Eudora mbx 文件迁移到 Thunderbird mbox 文件。Thunderbird 将附件保留在 mbox 中,这正是导入器所查找的内容。
ruperty
(Ruperty)
6
谢谢。按照您的建议,我正在使用 Aid4Mail 将 Eudora 的 mbx 文件转换为标准的 mbox 文件。该工具会将附件内嵌其中。它们可以成功导入到 Thunderbird 中,不过我并不需要为此功能而导入。
在导入到 Discourse 时,我使用正则表达式 ^From .*@.* [0-9]{4} 来匹配此类格式的邮件分隔符:From xxx@yyy.EDU Mon Oct 18 14:49:04 1999。
现在附件已显示在 Discourse 的帖子中。