'Returns a unique X-OfflineIMAP header
Generate an \'X-OfflineIMAP\' mail header which contains a random
unique value (which is based on the mail content, and a random
number). This header allows us to fetch a mail after APPENDing
it to an IMAP server and thus find out the UID that the server
assigned it.
:returns: (headername, headervalue) tuple, consisting of strings
headername == \'X-OfflineIMAP\' and headervalue will be a
random string'

def __generate_randomheader(self, content):

    headername = 'X-OfflineIMAP'
    headervalue = (str((binascii.crc32(content) & 4294967295)) + '-')
    headervalue += str(self.randomgenerator.randint(0, 9999999999))
    return (headername, headervalue)
