CORRECT PATCH Re: sync_client bails when encountering a deleted message

Ken Murchison murch at andrew.cmu.edu
Tue May 15 14:15:21 EDT 2007


John Capo wrote:
> Quoting Ken Murchison (murch at andrew.cmu.edu):
>> Ken Murchison wrote:
>>> Obviously, the chances of header_size being 0xdeadbeef is remote, but it 
>>> is possible.  Would it make more sense to use ULONG_MAX as the "failure 
>>> size"?
>> Or better yet, how about just using 0 (zero)?  IIRC, RFC2822 stipulates 
>> that the message header has to be non-zero (Date and From are mandatory)
> 
> I have seen zero size messages created with IMAP uploads from desktop
> clients.  This is probably a bug elsewhere.  I do not know if the
> zero size messages were replicated.
> 
> Sending more than one magic number would be the safest way. The
> value of the second magic number could be used to signal other
> conditions if needed.  I can't imagine what that would be other
> than aborting the upload.  Two ULONG_MAX is a row can't be a valid
> message.

After thinking about this some more,do we even need a magic number?  If 
we don't send anything after the flags list, shouldn't this be enough to 
signal that we have an invalid/missing message?

-- 
Kenneth Murchison
Systems Programmer
Project Cyrus Developer/Maintainer
Carnegie Mellon University


More information about the Cyrus-devel mailing list