如何将电子邮件解析到数据库? [英] How to parse e-mail into database?

查看:1253
本文介绍了如何将电子邮件解析到数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时候,我迫切地在寻找一些开发者社区,这些开发者正在处理传入电子邮件的解析并将其结构存储在数据库中。



引用Mail2db开发人员:


与传统邮件
档案不同,Mail2db引擎可以
将电子邮件转换为实际数据库


下面是使用IMAP labrary的一些语言特定实现的列表作为开发此类界面的主要工具






但即使有这些库主要的问题仍然存在!这是
将电子邮件正确解析为
数据库。


一个电子邮件进入数据库,你需要做的比默认类做的更多。在某种意义上,需要验证电子邮件结构,正确区分目的地,附件,内联部分,并处理正确编码的某些部分的正文。



在互联网上,您可能会发现一些商业广告(因此自动不适用于开源)和问题的自制解决方案:





<

一个开源项目:
http://www.manitou-mail.org



数据库引擎是PostgreSQL,邮件被解析为此模型(图)



解析器本身是一个Perl脚本,可以独立于软件(GUI)的其余部分使用。


Still sometime I'm desperately searching for some community of developers which is dealing with the parsing of incoming email and storing its structure in the database.

Quoting Mail2db developers:

Different from traditional mail archive, the Mail2db engine can convert email into real database records stored within a RDMB architecture database.

Here is the list of some language specific implementation of IMAP labrary which is used as a main tool in the development of such interfaces

But even having these libraries the main problem still persists! That is to parse the email correctly into database.

Because, generally for parsing an email into database you need to do much more than it is done by the default classes. In a sense need to validate the email structure, to distinguish correctly the destinations, attachments, inline parts and to process the body of some parts with respect to the correct encoding.

In internet you may find some commercial (so automatically no applicable to opensource) and homemade solutions of the problem:

Any ideas, links, discussions or books about the topic are very welcome!

解决方案

Here's an open source project that does it: http://www.manitou-mail.org

The db engine is PostgreSQL and the mail messages are parsed into this model (diagram)

The parser itself is a Perl script that can be used independently of the rest of the software (GUI).

这篇关于如何将电子邮件解析到数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆