lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Oct 2, 2011, at 10:20 AM, Dieter Plaetinck wrote:

> The long story is @
> http://dieter.plaetinck.be/luamail_a_mail_client_built_into_luakit.html

Nice :)

> currently our biggest concern is - as is mentioned here adequately - finding a good message parser.

Right, it's a bit of a pain.

For the sake of expediency, I'm presently using a mixture of external tools to get this going:

- 822date to parse RFC*822 dates
- reformail to extract headers
- reformime to handle MIME structures
- addrlist to parse RFC*822 addresses
- iconv for charset conversion

While not optimal, this gets the job done at the sluggish rate of around 1,000 messages per minute on a diminutive laptop  -including persistent data storage [1][2].

>  I figure, if there is no good lua one, it's probably more sane to add lua bindings to a C/C++ based one.  There should be plenty of those around.

There are quite a few indeed. The challenge is to choose a sane one :)

In no particular order:

http://cryp.to/librfc2822/
http://minimime.berlios.de/
http://spruce.sourceforge.net/gmime/
http://www.codesink.org/mimetic_mime_library.html
http://www.scalingweb.com/mime_parser.php
http://www.vmime.org/
https://developer.mozilla.org/en/Thunderbird/The_libmime_module

etc, etc


[1] http://dev.alt.textdrive.com/browser/Mail/Mail.ddl
[2] http://dev.alt.textdrive.com/browser/Mail/Mail.dml