Re: [Pharo-users] Read and parse maildir (offlineimap) files

2019-03-08 Thread 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  a écrit :
>
> Hi Cédrick,
>
> On Fri, 8 Mar 2019 at 16:12, Cédrick Béler  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  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
> > >
> >
> >



Re: [Pharo-users] Read and parse maildir (offlineimap) files

2019-03-08 Thread Alistair Grant
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:content-transfer-encoding:mime-version
 :subject:date:references:to:in-reply-to:message-id;
 bh=JLBqlHE8xrteXdPe7tOJaVhkGilsOxLBhklK69nyufI=;
 b=EnaB4iK31429RPcfXWI+bg5eN5B3ZKvJhLaCck5Dv62A5ScPCB84f/KqT7MO+qMA5/
 GGj05z45ZnaoT7noER1hsvrQeRD88Hi1P8vmNHtntFHl983LQvnb91DAk1/AwdxPNxyc
 uBpGINjLRwi6GibCqjdD/oIkUxS/g/J0qheB1nBhlsxSLBq+XzG7FKCfe5aJdoY7S8oA
 S/Wef16T6kJEMgCUK6RXnb/EN1imZ2amckwQRfqGncFHZHPziAsBEAeac8+Qcw41j6e+
 XRCbWEHihEGjVCcC2dmb4shFPiKw9i7CwnDQr3ajEcBFbwH7M1AbffVYgZ95O0+NybAS
 3iag==
X-Gm-Message-State: APjAAAWpuQAGpqdd4ZSI3//WnbdFDSw9hh8eHGkboQv0dKT9UaY50UAL
 Jy1KWUXVNV9FhGu5d3kB8fUTXmyPBPI=
X-Received: by 2002:a7b:cb8e:: with SMTP id m14mr8832539wmi.64.1552057912014; 
 Fri, 08 Mar 2019 07:11:52 -0800 (PST)
Received: from [192.168.8.103] ([37.168.163.3])
 by smtp.gmail.com with ESMTPSA id t9sm9958128wrx.73.2019.03.08.07.11.50
 for 
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 08 Mar 2019 07:11:51 -0800 (PST)
From: =?utf-8?B?Q8OpZHJpY2sgQsOpbGVy?= 
Content-Type: text/plain;
charset=utf-8
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\))
Date: Fri, 8 Mar 2019 16:11:50 +0100
References: 
To: Any question about pharo is welcome 
In-Reply-To: 

Message-Id: <413e1367-b9c1-43c9-9926-0f0169380...@gmail.com>
X-Mailer: Apple Mail (2.3445.102.3)
Subject: Re: [Pharo-users] Read and parse maildir (offlineimap) files
X-BeenThere: pharo-users@lists.pharo.org
X-Mailman-Version: 2.1.27
Precedence: list
List-Id: Any question about pharo is welcome 
List-Unsubscribe: 
<http://lists.pharo.org/mailman/options/pharo-users_lists.pharo.org>, 
 <mailto:pharo-users-requ...@lists.pharo.org?subject=unsubscribe>
List-Archive: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/>
List-Post: <mailto:pharo-users@lists.pharo.org>
List-Help: <mailto:pharo-users-requ...@lists.pharo.org?subject=help>
List-Subscribe: 
<http://lists.pharo.org/mailman/listinfo/pharo-users_lists.pharo.org>, 
 <mailto:pharo-users-requ...@lists.pharo.org?subject=subscribe>
Reply-To: Any question about pharo is welcome 
Errors-To: pharo-users-boun...@lists.pharo.org
Sender: "Pharo-users" 
X-AntiAbuse: This header was added to track abuse, please include it with any 
abuse report
X-AntiAbuse: Primary Hostname - mm1.emwd.com
X-AntiAbuse: Original Domain - gmail.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - lists.pharo.org
X-Get-Message-Sender-Via: mm1.emwd.com: acl_c_authenticated_local_user: 
mailman/mailman
X-Authenticated-Sender: mm1.emwd.com: mail...@lists.pharo.org
X-Source: 
X-Source-Args: 
X-Source-Dir: 

Hi Alistair,=20

This looks like what I=E2=80=99d like to have (parsing emails). I=E2=80=99=
d better like an IMAP Client but using offlinmap might be an option.

Will look at it.=20

Do you have an exemple of milder format files ?

Cheers,

C=C3=A9drick



> Le 8 mars 2019 =C3=A0 15:49, Alistair Grant  a =
=C3=A9crit :
>=20
> Hi Everyone,
>=20
> 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).
>=20
> Does anyone know of any existing libraries in Pharo?
>=20
> Thanks very much,
> Alistair
>=20




Re: [Pharo-users] Read and parse maildir (offlineimap) files

2019-03-08 Thread Cédrick Béler
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  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
>