Quoting Ken Murchison ([EMAIL PROTECTED]): > 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.