MBOX-Line: From slusarz at curecanti.org  Tue Jun  7 01:26:53 2011
To: imap-protocol@u.washington.edu
From: Michael M Slusarz <slusarz@curecanti.org>
Date: Fri Jun  8 12:34:46 2018
Subject: [Imap-protocol] [SORT EXTENSION] Base-Subject extraction
In-Reply-To: <BANLkTimizsxtBapqcwWGZa72TcZz33_mOw@mail.gmail.com>
References: <BANLkTimaQZXif-G33pjCdVuNzNHs8cjr=Q@mail.gmail.com>
	<20110607003321.Horde.7akgDoF5lbhN7cYxm91GKuA@bigworm.curecanti.org>
	<20110607095157.31a2609a@arbre.eng.oslo.osa>
	<BANLkTimizsxtBapqcwWGZa72TcZz33_mOw@mail.gmail.com>
Message-ID: <20110607022653.Horde.B8YBPYF5lbhN7eDNvRbny5A@bigworm.curecanti.org>

Quoting Norman Maurer <norman.maurer@googlemail.com>:

> The project I'm working on (james.apache.org) needs something ASL2
> compatible so LGPL is not going to work here.. :(
>
> Thanks anyway,
> Norman
>
>
> 2011/6/7 Bron Gondwana <brong@fastmail.fm>:
>> On Tue, 07 Jun 2011 00:33:21 -0600
>> Michael M Slusarz <slusarz@curecanti.org> wrote:
>>
>>> Quoting Norman Maurer <norman.maurer@googlemail.com>:
>>>
>>> > Hi there,
>>> >
>>> > I'm currently working on getting SORT to work with my IMAP-Server /
>>> > Mailbox-Store. I have read about the Base-Subject extraction and I'm
>>> > almost sure I have implement it in the right manner. But I would be
>>> > interested in some "Test Subjects" to write some Unit-Tests.
>>> >
>>> > Does anyone have a list of Subjects and the related Base-Subjects
>>> > which I could use for my Unit-Tests (just to be sure I did it he right
>>> > way) ?
>>>
>>> We've got a basic test suite with a few examples here:
>>>
>>> http://git.horde.org/co.php/framework/Imap_Client/test/Horde/Imap/Client/SubjectParseTest.php?rt=horde-git
>>
>> @license ?http://www.fsf.org/copyleft/lgpl.html LGPL
>>
>> I'm guessing it doesn't pass the "is it a creative work" test, but I
>> wouldn't want to go explaining myself in court! ?I might skip adding
>> that to the Cyrus unit tests.

Not that I am a lawyer (actually, I am...) but I highly doubt that the  
test suite, with all 7 of its test cases, is copyrightable.  Even if  
it was, infringement would probably lead to damages creeping into the  
double digits (in cents) for the 15 seconds it had originally taken me  
to come up with those thorough examples.

In the interest of keeping everyone here out of jail and/or not on the  
losing side of a crushing judgment, let me go ahead and present to you  
a test suite that I freely release into the public domain:

These subjects:

     'Re: Test'
     're: Test'
     'Fwd: Test'
     'fwd: Test'
     'Fwd: Re: Test'
     'Fwd: Re: Test (fwd)'

Should all resolve into the string:

     'Test'

And this subject:

     "Re: re:re: fwd:[fwd: \t  Test]  (fwd)  (fwd)(fwd) "

Should resolve into the string:

     "\t  Test"

(I adapted/ripped off Timo's LGPL code for the actual subject parsing  
code itself, so I guess you probably shouldn't look at that if you are  
looking to keep your code ASL2-compatible).

michael


