Read and parse maildir (offlineimap) files

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Read and parse maildir (offlineimap) files

alistairgrant
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

Reply | Threaded
Open this post in threaded view
|

Re: Read and parse maildir (offlineimap) files

cedreek
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 <[hidden email]> 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
>


Reply | Threaded
Open this post in threaded view
|

Re: Read and parse maildir (offlineimap) files

alistairgrant
Hi Cédrick,

On Fri, 8 Mar 2019 at 16:12, Cédrick Béler <[hidden email]> 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 <[hidden email]> 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
> >
>
>

maildir.txt (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Read and parse maildir (offlineimap) files

Thierry Goubier
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 <[hidden email]> a écrit :

>
> Hi Cédrick,
>
> On Fri, 8 Mar 2019 at 16:12, Cédrick Béler <[hidden email]> 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 <[hidden email]> 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
> > >
> >
> >