best way to read imap mbox into postgres database (linux centOS) ?

Hi ,

I have a linux box with centos 6 on it somewhere in the world with speedy internet link.
I installed a postgres database on it, and there is a cpanel software installed on it to manage the box.

I want to read an IMAP mail account, and store the datas (sender, receiver, headers, message, attachements) into the postgres database
so that the database users can have the mails attached to the contact records.
and I think the best place to do that is on the server itself.

what is the best way to do it ?
as xojo does not seems to handle the IMAP mail accounts, (or buy a plugin ? but I dont like plugins since a not updated plugin that screw my program long ago…)
as it is a linux box where available softwares are less numerous than mac or windows ?

how would you handle such task ?
thanks for any details if you already did that.

A good part of my application handles this task. It’s not impossible without a plugin but it would be a lot of work.

I can highly recommend the Chilkat plugin (https://www.chilkatsoft.com/xojo.asp). It’s not cheap but it has been around for other languages for a while. The documentation and the examples are very very good.

Most likely the CURL plugin from the Monkeybread plugins would also work. If you only want to access your own account this should work.

bump …

Multicorn

What about the options I gave you? IMAP ain’t trivial.

yes thanks it enlightens me a little …
but I was hopping other members would give some other solutions to me ?
also I started the thread on saturday, bad day to start a thread, better in monday-thursday.

There were already mentioned quite a few different approaches. If you are still looking for more, and not giving more detail on what you are about to reach in the end, what about hosting a Mailserver that is storing the data in a well structured schema and query directly against that mailstore? I would have a look at Archiveopteryx If you’re not able to get the mail delivered directly via LMTP you could import them using something like imapsync
Not a straight forward solution but it may solve other issues as well. As Beatrix mentioned - IMAP isn’t trivial, nor is mail parsing.

[quote=271404:@Beatrix Willius]A good part of my application handles this task. It’s not impossible without a plugin but it would be a lot of work.

I can highly recommend the Chilkat plugin (https://www.chilkatsoft.com/xojo.asp). It’s not cheap but it has been around for other languages for a while. The documentation and the examples are very very good.

Most likely the CURL plugin from the Monkeybread plugins would also work. If you only want to access your own account this should work.[/quote]
coming back to this topic
when you buy a chilkat plugin licence, do you get full source code or not ?
I was not able to read it somewhere …
thanks.

[quote]when you buy a chilkat plugin licence, do you get full source code or not ?
[/quote]

Nope. It is a plugin - no source code. That’s why you have to make sure you trust the plugin author. I feel you can in this case…

When you buy you get a license code for the plugin. There is a demo available, which works for 30 days.

IMAP is a challenging protocol (meaning s.h.i.t.t.y). The login process is the most fun part.