Re: Cyrus Replication Rewrite

2012-06-29 Thread David Carter
running sync_server from master, and all our mailstores have a single data partition) and hasn't been tested anywhere else. Ken rewrote large chunks of the code to turn it into proper Cyrus service, and Bron threw it all away to make something better. -- David Carter

Re: Cyrus Replication Rewrite

2012-06-29 Thread David Carter
On Fri, 29 Jun 2012, Bron Gondwana wrote: My real plan is to make the Cyrus code able to read old-version Cyrus files directly without upgrading them... I would certainly welcome this. -- David Carter Email: david.car...@ucs.cam.ac.uk University Computing Service

sync_server do_rename() and uidvalidity

2012-01-15 Thread David Carter
entry, I'm just debating what to put in that report. I am running Cyrus 2.4.13. -- David Carter Email: david.car...@ucs.cam.ac.uk University Computing Service,Phone: (01223) 334502 New Museums Site, Pembroke Street, Fax: (01223) 334679 Cambridge UK

THREAD segfault

2011-07-22 Thread David Carter
://bugzilla.cyrusimap.org/show_bug.cgi?id=2772 which has been open since December 2005. Should I open a new bug in bugzilla? Stripping the spurious whitespace from the middle of msgids in the References header (as John Capo suggests in Bugzilla #2772) feels like the most elegant solution. -- David

Re: Changing message filename convention

2009-11-15 Thread David Carter
don't have any conflict with the mailbox namespace. For example a mailbox named 42 or cyrus.index. I really wouldn't recommend this. -- David Carter Email: david.car...@ucs.cam.ac.uk University Computing Service,Phone: (01223) 334502 New Museums Site

index_operatemailbox() / EXPUNGE bug

2009-10-05 Thread David Carter
other functions in imapd.c: catenate_url() and cmd_urlfetch(). -- David Carter Email: david.car...@ucs.cam.ac.uk University Computing Service,Phone: (01223) 334502 New Museums Site, Pembroke Street, Fax: (01223) 334679 Cambridge UK. CB2 3QH.diff -udNr

Small type bug in lmtpengine.c

2009-04-22 Thread David Carter
The quota parameter to verify_user() is quota_t, not long. Solaris 10 with bundled GCC 3.4.3 wasn't doing type promotion correctly. (long)(-1) becomes (long long int)(4294967295), which is = 0. Consequently IGNOREQUOTA had no effect. -- David Carter Email

Re: Locking Policy

2009-03-28 Thread David Carter
. The exclusive POP lock on cyrus.cache is an additional complication, but that is off to one side and seems to work reasonably well. (I'm not entirely convinced that a server which implements delayed expunge actually needs the exclusive lock, but it is mandated by RFC 1725, section 4). -- David

Four patches against 2.3.14

2009-03-27 Thread David Carter
happy about mboxlist_findall which can run for several days in any case. sync_combine_commit.patch = Update quota correctly in sync_combine_commit(). Only normally triggered when replicating unexpunged messages in normal use. -- David Carter Email

Re: Four patches against 2.3.14

2009-03-27 Thread David Carter
On Fri, 27 Mar 2009, Bron Gondwana wrote: Why did this touch sieve.h? It's generated by bison. Did you not work on a clean tree? 2.3.14 ships with a sieve/sieve.h I did remove a number of the .c files which are generated from Bison or Flex, but missed this one. -- David Carter

Re: Four patches against 2.3.14

2009-03-27 Thread David Carter
) But if you are happier with two or three lines of code, then go for it. -- David Carter Email: david.car...@ucs.cam.ac.uk University Computing Service,Phone: (01223) 334502 New Museums Site, Pembroke Street, Fax: (01223) 334679 Cambridge UK. CB2 3QH.

Re: Use of isspace() and friends in Cyrus

2009-03-20 Thread David Carter
amount of processor for something that really was /[0-9]/ in meaning. So - where would you put the macro? lib/util.h? That already has: #define TOUPPER(c) (convert_to_uppercase[(unsigned char)(c)]) #define TOLOWER(c) (convert_to_lowercase[(unsigned char)(c)]) -- David Carter

Use of isspace() and friends in Cyrus

2009-03-19 Thread David Carter
the fact both are just using message_parse_file(). I infer that isspace(-10) is normally false but occasionally true, at least on Solaris x86. It appears to always be false on Linux x86. -- David Carter Email: david.car...@ucs.cam.ac.uk University Computing Service

Re: More special chars in mailbox names

2008-10-01 Thread David Carter
may not want to add these to GOODCHARS. I had to remove '!' from the list above when we moved from 2.1.x. and ? might conflict with modified UTF-7 encoding. shouldn't be allowed without checking for a valid modified UTF-7 sequence. What is the problem with '?'. -- David Carter

Re: Cyrus 2.3.12 RC1

2008-04-09 Thread David Carter
mboxlist_findall() quietly starts a transaction. We use this patch as well. The only curiosity that I haven't tracked down is the following from cyr_expire: Apr 9 03:43:52 cyrus-35 cyr_expire[15410]: skiplist: unlock while not locked (I haven't touched cyr_expire in 2.3.11). -- David Carter

Small memory leak in the status cache code

2008-01-30 Thread David Carter
There is a small memory leak in the status cache code. Or at least I don't believe that DB-store() automatically free()s its input. Probably faster to just have a char data[250] on the stack. -- David Carter Email: [EMAIL PROTECTED] University Computing Service

Re: about the replication

2008-01-24 Thread David Carter
... I run quota on master and replica every once in a while and compare. That's an easy way to find and fix the problem cases, regardless of whether the master or replica was at fault. There are typically only about half a dozen cases each time, so I don't think that it's a huge problem. -- David

unexpunge time interval

2008-01-17 Thread David Carter
expunged in the last 24 hours for that mailbox. That's the way that my old two phase expunge stuff used to work. -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502 New Museums Site, Pembroke Street, Fax: (01223

assert()

2008-01-16 Thread David Carter
: cyrusdb_skiplist.c: 913: 2 + 2 == 5 The error text is also sent to syslog() before a proper shut_down(). Here is a simple patch to change all of the '#include assert.h' into '#include assert.h': http://www-uxsup.csx.cam.ac.uk/~dpc22/cyrus/patches/2.3cvs/assert.patch -- David Carter

Incremental squat updates and IMAP SCAN extension

2008-01-03 Thread David Carter
: . SCAN test/ 1 dpc22 which could just as easily be done using EXAMINE and SEARCH. Things would probably go much faster searching one mailbox at a time rather that adding random access disk I/O just for the hell of it. -- David Carter Email: [EMAIL PROTECTED] University

reconstruct -k is broken when delayed expunge enabled

2007-12-18 Thread David Carter
of the original code. -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502 New Museums Site, Pembroke Street, Fax: (01223) 334679 Cambridge UK. CB2 3QH.

Re: condstore

2007-11-13 Thread David Carter
condstore. -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502 New Museums Site, Pembroke Street, Fax: (01223) 334679 Cambridge UK. CB2 3QH.

Re: Multiple skiplist bugs found, patches attached

2007-11-13 Thread David Carter
packages to try how they work. Do you recommend both for general consumption? It is certainly very easy to break mailboxes.db using cyr_dbtool. Kudos to Bron for tracking down the problems. -- David Carter Email: [EMAIL PROTECTED] University Computing Service

Re: reconstruct -u?

2007-11-06 Thread David Carter
On Tue, 6 Nov 2007, Rudy Gevaert wrote: Added -u and -U options to reconstruct -- courtesy of David Carter. I don't find any information in the man of reconstruct or in reconstruct.c :) UUIDs are now GUIDs, hence -g/-G -- David Carter Email: [EMAIL PROTECTED

Re: [POLL] Development guidance

2007-11-05 Thread David Carter
is possible. This requirement is likely to be a pain for: 1. Leverage delayed expunge which already stores state for expunged messages in cyrus.expunge (up until the records are purged by cyr_expire). Given that unexpunge assigns a new UIDvalidity to the mailbox. -- David Carter

Re: Making Replication Robust

2007-10-19 Thread David Carter
On Tue, 9 Oct 2007, David Carter wrote: I've never faced a spilt brain situation which involved more than two or three messages (the outstanding log on an old master system). I suppose that it was predicable that a week after writing this I faced my first serious split brain (3000 messages

Re: Making Replication Robust

2007-10-13 Thread David Carter
. And indeed it uses an explicit SA_RESTART flag, so it looks like I've been worrying about nothing all along. By all means signal away! -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502 New Museums Site, Pembroke

Re: Making Replication Robust

2007-10-12 Thread David Carter
and SVR4: BSD tries to retry while SVR4 throws EINTR. Linux of course can work either way: http://www.gnu.org/software/libc/manual/html_node/Interrupted-Primitives.html -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502

Re: Cyrus 2.3.10 RC2

2007-10-12 Thread David Carter
arguments presumably? It would be safe to convert -u and -m command line options based on unixhiersep and I agree that this would make sense. -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502 New Museums Site, Pembroke

Re: Cyrus 2.3.10 RC2

2007-10-11 Thread David Carter
-uxsup.csx.cam.ac.uk/~dpc22/cyrus/patches/2.3.8/sha1_make_sha1.patch which should probably be merged if we are working towards SHA1. -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502 New Museums Site, Pembroke Street

Re: Cyrus 2.3.10 RC2

2007-10-11 Thread David Carter
. make_md5/make_sha1 generate two checksums for each message: one for the message body and also one for the cyrus.cache entry. The latter has been occasionally useful in showing up problems with other parts of Cyrus (for example the ENVELOPE lcase() bug from a few weeks back). -- David Carter

Re: Making Replication Robust

2007-10-09 Thread David Carter
be useful, although probably more work. The kind of random sampling which Fastmail do probably wouldn't hurt as an extra sanity check. -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502 New Museums Site, Pembroke Street

Re: Making Replication Robust

2007-10-09 Thread David Carter
systems to a tape spooling array each night. Replication is transaction safe rsync for Cyrus, tailored around the cyrus.index files. More later. -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502 New Museums Site

Re: Making Replication Robust

2007-10-09 Thread David Carter
. -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502 New Museums Site, Pembroke Street, Fax: (01223) 334679 Cambridge UK. CB2 3QH.

Re: Ready for 2.3.10?

2007-10-09 Thread David Carter
. Based on the errors, I think that you might be missing flex, which is bison's compatriot in arms. -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502 New Museums Site, Pembroke Street, Fax: (01223) 334679

Re: Ready for 2.3.10?

2007-10-05 Thread David Carter
if -fstrict-aliasing or -O2 is set. The GCC man page explains -fstrict-aliasing. I also found the following: http://en.wikipedia.org/wiki/Type_punning -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502 New Museums

Re: use of guid instead of uuid

2007-10-01 Thread David Carter
On Sun, 30 Sep 2007, Rudy Gevaert wrote: If people are going to upgrade from a configuration that uses sync_machineid= X and provide_uuid=1, and don't configure guid_mode=sha, what will happen? They will get NULL GUIDs. -- David Carter Email: [EMAIL PROTECTED

sync_server RESERVE command

2007-09-25 Thread David Carter
, it would have asked for that copy in that mailbox, so the ids array would have been longer. ids[count] is always allocated. There is a one in hundred chance that ids[count+1] is not, which would lead to a segmentation fault if ids[count] matched a GUID. -- David Carter

Re: cyrus.expunge/cyrus.cache mistmatch on replica

2007-09-25 Thread David Carter
. sync_server needs to know about the expunge index. It did in my original code base, but replication got merged before delayed expunge. More later. In theory I'm on holiday this week. -- David Carter Email: [EMAIL PROTECTED] University Computing Service

Re: Large Mailbox Append Fix

2007-09-25 Thread David Carter
appears to be braindead. You need an update_uidlast() call if the last batch is empty, as Bron suggests. I'm also not convinced that: } while (!r); ever exits. I think that it should be: } while (!r msgno = mailbox-exists); Updated patch against current 2.3cvs attached. -- David

Re: cyrus.expunge/cyrus.cache mistmatch on replica

2007-09-25 Thread David Carter
On Tue, 25 Sep 2007, David Carter wrote: I imagine that a single GUID appearing in cyrus.index and cyrus.expunge is bad news. sync_server needs to know about the expunge index. It did in my original code base, but replication got merged before delayed expunge. Single _UID_ appearing

Re: cyrus.expunge/cyrus.cache mistmatch on replica

2007-09-24 Thread David Carter
this is probably the simplest solution. -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502 New Museums Site, Pembroke Street, Fax: (01223) 334679 Cambridge UK. CB2 3QH.

Re: cyrus.expunge/cyrus.cache mistmatch on replica

2007-09-24 Thread David Carter
collecting (rewrite on expunge and/or cyr_expire) when the file reaches some threshold. -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502 New Museums Site, Pembroke Street, Fax: (01223) 334679 Cambridge UK. CB2 3QH.

Re: Large Mailbox Append Fix

2007-09-22 Thread David Carter
don't match... I really should test-case this!) I don't think so. There is a separate test for UIDLAST if do_mailbox_work() finds that it has no messages to UPLOAD. -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502

Re: Large Mailbox Append Fix

2007-09-21 Thread David Carter
) { sync_index_list_free(index_list); return(r); } should just be: if (index_list-count == 0) { return(r); } As I get an exciting: *** glibc detected *** sync_client: double free or corruption (fasttop): 0x08134fd0 *** Otherwise looks good. Nice work. -- David Carter

Re: Large Mailbox Append Fix

2007-09-21 Thread David Carter
be a NOOP in that case. Could always add the (index_list-count == 0) test to upload_messages_list() and upload_messages_from() as well. -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502 New Museums Site, Pembroke

Re: Two bug fix patches

2007-09-14 Thread David Carter
values to users, but the wrong case isn't the end of the world. -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502 New Museums Site, Pembroke Street, Fax: (01223) 334679 Cambridge UK. CB2 3QH.

Re: replication is unable to fix uidvalidity difference

2007-09-11 Thread David Carter
-uxsup.csx.cam.ac.uk/~dpc22/cyrus/patches/2.3cvs/sync_do_mailbox_work.patch -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502 New Museums Site, Pembroke Street, Fax: (01223) 334679 Cambridge UK. CB2 3QH.

Re: replication is unable to fix uidvalidity difference

2007-09-03 Thread David Carter
reconstruct on a mailbox which is missing cyrus.header. -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502 New Museums Site, Pembroke Street, Fax: (01223) 334679 Cambridge UK. CB2 3QH.

Re: 2.3.9 mod time bug

2007-09-01 Thread David Carter
, not CMUs. I'll prepare a proper patch next week. -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502 New Museums Site, Pembroke Street, Fax: (01223) 334679 Cambridge UK. CB2 3QH.

Re: 2.3.9 mod time bug

2007-09-01 Thread David Carter
On Sat, 1 Sep 2007, Ken Murchison wrote: FYI, the code in CVS has sync_message_sync() declared as having no return value. Does your code has it declared as returning an int, and checking for it? Yes. -- David Carter Email: [EMAIL PROTECTED] University Computing

Re: *IMPORTANT* - bugfix sync_append_commit index breakage

2007-08-31 Thread David Carter
seek using mailbox-exists is definitely more robust, although it probably doesn't help if power fails halfway through the fsync() on the cyrus.index file after both updates have been made (data=journal maybe?) -- David Carter Email: [EMAIL PROTECTED] University

Re: *IMPORTANT* - bugfix sync_append_commit index breakage

2007-08-31 Thread David Carter
wasn't expecting the replication code to ever get merged when I first wrote it. All of the really awful stuff should be in sync_commit.c. Those are the routines which create messages with predetermined UIDs and mailboxes with predetermined UniqueIDs. -- David Carter

Re: deleted DELETE

2007-08-30 Thread David Carter
embarrassment about broken code in CVS, so long as we are able to generate a separate branch for emergency bug fix releases. At the end of the day CMU's CVS repository is the canonical reference. Trying to track third party patches (and patches to patches) is hard work. -- David Carter

Re: deleted DELETE

2007-08-30 Thread David Carter
On Wed, 29 Aug 2007, David Carter wrote: mboxname_isusermailbox() works on internal mailbox names. I don't think that it needs to worry about IMAPOPT_UNIXHIERARCHYSEP. Here's a trivial patch to remove the IMAPOPT_UNIXHIERARCHYSEP stuff. Otherwise mboxname_isusermailbox() is broken when

Re: deleted DELETE

2007-08-29 Thread David Carter
. Small bug fix (the p++ line) attached. -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502 New Museums Site, Pembroke Street, Fax: (01223) 334679 Cambridge UK. CB2 3QH. Index: imap/cyr_expire.c

Re: deleted DELETE

2007-08-29 Thread David Carter
. mboxname_isusermailbox() works on internal mailbox names. I don't think that it needs to worry about IMAPOPT_UNIXHIERARCHYSEP. -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502 New Museums Site, Pembroke Street

Re: CORRECT PATCH Re: sync_client bails when encountering a deleted message

2007-08-10 Thread David Carter
lrswipkxtea 279 87 1 suggests that you have a missing eatline() somewhere. -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502 New Museums Site, Pembroke Street, Fax: (01223) 334679 Cambridge UK. CB2 3QH.

Re: A couple of goodies

2007-07-25 Thread David Carter
postponed messages mailboxes from our Webmail application and PINE, which I imagine is rather unusual. Deleted mailboxes are removed after 7 days. -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502 New Museums Site

Re: sync_client bails when encountering a deleted message

2007-05-13 Thread David Carter
off for a couple of days, but may have a go at implementing this next week unless someone has a better idea. -- David Carter Email: [EMAIL PROTECTED] University Computing Service,Phone: (01223) 334502 New Museums Site, Pembroke Street, Fax: (01223