[Imap-protocol] [SORT EXTENSION] Base-Subject extraction

Michael M Slusarz slusarz at curecanti.org
Tue Jun 7 01:26:53 PDT 2011

Quoting Norman Maurer <norman.maurer at 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 at fastmail.fm>:

>> On Tue, 07 Jun 2011 00:33:21 -0600

>> Michael M Slusarz <slusarz at curecanti.org> wrote:


>>> Quoting Norman Maurer <norman.maurer at 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:


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).


More information about the Imap-protocol mailing list