'Creates a new unique Maildir filename
:param uid: The UID`None`, or a set of maildir flags
:param flags: A set of maildir flags
:returns: String containing unique message filename'

def new_message_filename(self, uid, flags=set(), date=None):

    (timeval, timeseq) = _gettimeseq(date)
    return ('%d_%d.%d.%s,U=%d,FMD5=%s%s2,%s' % (timeval, timeseq, os.getpid(), socket.gethostname(), uid, self._foldermd5, self.infosep, ''.join(sorted(flags))))
