Wolfgang Breyha | 2 Apr 2011 12:17
Picon

Re: 2.4.7 complains about mails named '0.'

Hi!

On 2011-04-02 11:59, Bron Gondwana wrote:
> Was there seriously a version of Cyrus that allows UID zero?  That's
> bogus.  Surely IMAP UIDs start at one.

I found some historic info;-) I used cyrus-imap 2.3.7 back then. I used
"imapsync" to migrate mailboxes from courier to cyrus. It happend an
exactly one mailbox, but on several folders there.

> If UID zero is allowed, I'll have to fix that code - and probably
> some other code which assumes UIDs are never zero...

Ok, if that's the case I'll rename that files to the first available UID
and reconstruct the folder.

Regards, Wolfgang
--

-- 
Wolfgang Breyha <wbreyha <at> gmx.net> | http://www.blafasel.at/
Vienna University Computer Center | Austria
----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/

Bron Gondwana | 2 Apr 2011 14:19
Gravatar

Re: 2.4.7 complains about mails named '0.'

On Sat, Apr 02, 2011 at 12:17:25PM +0200, Wolfgang Breyha wrote:
> Hi!
> 
> On 2011-04-02 11:59, Bron Gondwana wrote:
> > Was there seriously a version of Cyrus that allows UID zero?  That's
> > bogus.  Surely IMAP UIDs start at one.

Hmm... so imapsync created them?  I'll read the code
for 2.3.7 and see how that's even possible.

Ooh... just a guess - but did you have autocreate patches?  I wonder if
autocreate caused uidnext to be zero rather than one due to doing the
append during the same lock as the create...

> I found some historic info;-) I used cyrus-imap 2.3.7 back then. I used
> "imapsync" to migrate mailboxes from courier to cyrus. It happend an
> exactly one mailbox, but on several folders there.
> 
> > If UID zero is allowed, I'll have to fix that code - and probably
> > some other code which assumes UIDs are never zero...
> 
> Ok, if that's the case I'll rename that files to the first available UID
> and reconstruct the folder.

Sounds reasonable.  Actually, I think that's probably what reconstruct
should do to the messages (well, NEXT available UID, so that the IMAP
semantics stay correct) when it finds them...

http://bugzilla.cyrusimap.org/show_bug.cgi?id=3433

(Continue reading)

Wolfgang Breyha | 2 Apr 2011 14:24
Picon

Re: 2.4.7 complains about mails named '0.'

On 2011-04-02 14:19, Bron Gondwana wrote:
> Ooh... just a guess - but did you have autocreate patches?  I wonder if
> autocreate caused uidnext to be zero rather than one due to doing the
> append during the same lock as the create...

Yes, I'm using Simons SRPMS as a base with minor patches for syslogging
(like auditlog in 2.4 now). I think I really used autocreate back then. I
disabled it after a short while.

Greetings, Wolfgang
--

-- 
Wolfgang Breyha <wbreyha <at> gmx.net> | http://www.blafasel.at/
Vienna University Computer Center | Austria
----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/

Bron Gondwana | 2 Apr 2011 14:48
Gravatar

Re: 2.4.7 complains about mails named '0.'

On Sat, Apr 02, 2011 at 02:19:30PM +0200, Bron Gondwana wrote:
> On Sat, Apr 02, 2011 at 12:17:25PM +0200, Wolfgang Breyha wrote:
> > Hi!
> > 
> > On 2011-04-02 11:59, Bron Gondwana wrote:
> > > Was there seriously a version of Cyrus that allows UID zero?  That's
> > > bogus.  Surely IMAP UIDs start at one.
> 
> Hmm... so imapsync created them?  I'll read the code
> for 2.3.7 and see how that's even possible.

Seriously:

    /* Setup */
    message_index.uid = mailbox->last_uid + as->nummsg + 1;

mailbox->last_uid gets set to zero at creation time,
as->nummsg gets set to zero in append_setup - the
first message should be UID == 1.

It seems more likely to me that your '0.' files are caused
by some bug somewhere along the way.  Did you check them to
see if they're duplicates of another message in that folder?

Bron.
----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/

(Continue reading)

Wolfgang Breyha | 2 Apr 2011 14:56
Picon

Re: 2.4.7 complains about mails named '0.'

On 2011-04-02 14:48, Bron Gondwana wrote:
> It seems more likely to me that your '0.' files are caused
> by some bug somewhere along the way.  Did you check them to
> see if they're duplicates of another message in that folder?

No, no duplicates so far. Since only one mailbox is affected I can't tell
for sure what happened some years ago;-)

Greetings, Wolfgang
--

-- 
Wolfgang Breyha <wbreyha <at> gmx.net> | http://www.blafasel.at/
Vienna University Computer Center | Austria
----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/


Gmane