def messageid(uniq=None, N=idGenerator().next):
 datetime = time.strftime('%Y%m%d%H%M%S', time.gmtime())
 pid = os.getpid()
 rand = random.randrange(((2 ** 31L) - 1))
 if (uniq is None):
  uniq = ''
 else:
  uniq = ('.' + uniq)
 return ('<%s.%s.%s%s.%s@%s>' % (datetime, pid, rand, uniq, N(), DNSNAME))

def messageid ( uniq = None , N = idGenerator ( ) . next ) : datetime = time . strftime ( '%Y%m%d%H%M%S' , time . gmtime ( ) ) pid = os . getpid ( ) rand = random . randrange ( ( ( 2 ** 31 L ) - 1 ) ) if ( uniq is None ) : uniq = '' else : uniq = ( '.' + uniq ) return ( '<%s.%s.%s%s.%s@%s>' % ( datetime , pid , rand , uniq , N ( ) , DNSNAME ) )
return a globally unique random string in rfc 2822 message-id format <datetime .