Read and parse maildir (offlineimap) files
Hi Everyone, I'd like to be able to parse and read the mail files as saved by offlineimap, i.e. in maildir format (one message per file). Does anyone know of any existing libraries in Pharo? Thanks very much, Alistair
Hi Alistair, This looks like what Iâd like to have (parsing emails). Iâd better like an IMAP Client but using offlinmap might be an option. Will look at it. Do you have an exemple of milder format files ? Cheers, Cédrick
Le 8 mars 2019 à 15:49, Alistair Grant <akgrant0710@gmail.com> a écrit :
Hi Everyone,
I'd like to be able to parse and read the mail files as saved by offlineimap, i.e. in maildir format (one message per file).
Does anyone know of any existing libraries in Pharo?
Thanks very much, Alistair
Hi Cédrick, On Fri, 8 Mar 2019 at 16:12, Cédrick Béler <cdrick65@gmail.com> wrote:
Hi Alistair,
This looks like what Iâd like to have (parsing emails). Iâd better like an IMAP Client but using offlinmap might be an option.
Will look at it.
Do you have an exemple of milder format files ?
Attached is the email you sent. I found https://github.com/codeZeilen/SMailDir but it is written for Squeak and doesn't load cleanly in Pharo (I haven't actually done anything with it yet). Cheers, Alistair
Le 8 mars 2019 à 15:49, Alistair Grant <akgrant0710@gmail.com> a écrit :
Hi Everyone,
I'd like to be able to parse and read the mail files as saved by offlineimap, i.e. in maildir format (one message per file).
Does anyone know of any existing libraries in Pharo?
Thanks very much, Alistair
It's a common shell script lab assignment to be able to parse this format (RFC 822). Unix 101 level. A bit tricky in practice, because the format has a strong dependency on the blank line between the header part and the email content... Technically, maildir only refers to the directory/files organisation, not the format of an email inside each file. Emails with attachments can create headaches for quick and dirty scan, because they appear as text files containing binary data a few MBs long... If you happen to have a backtracking RE or parser on it, you'll kill your image. Thierry Le ven. 8 mars 2019 à 16:23, Alistair Grant <akgrant0710@gmail.com> a écrit :
Hi Cédrick,
On Fri, 8 Mar 2019 at 16:12, Cédrick Béler <cdrick65@gmail.com> wrote:
Hi Alistair,
This looks like what Iâd like to have (parsing emails). Iâd better like an IMAP Client but using offlinmap might be an option.
Will look at it.
Do you have an exemple of milder format files ?
Attached is the email you sent.
I found https://github.com/codeZeilen/SMailDir but it is written for Squeak and doesn't load cleanly in Pharo (I haven't actually done anything with it yet).
Cheers, Alistair
Le 8 mars 2019 à 15:49, Alistair Grant <akgrant0710@gmail.com> a écrit :
Hi Everyone,
I'd like to be able to parse and read the mail files as saved by offlineimap, i.e. in maildir format (one message per file).
Does anyone know of any existing libraries in Pharo?
Thanks very much, Alistair
participants (3)
-
Alistair Grant -
Cédrick Béler -
Thierry Goubier