'Generate a received header string for a message.
@type helo: 2-L{tuple} of (L{bytes}, L{bytes})
@param helo: The client\'s identity as sent in the HELO command and its
IP address.
@type origin: L{Address}
@param origin: The origination address of the message.
@type recipients: L{list} of L{User}
@param recipients: The destination addresses for the message.
@rtype: L{bytes}
@return: A received header string.'

def receivedHeader(self, helo, origin, recipients):

    authStr = heloStr = ''
    if self.user:
        authStr = ('    auth=' + self.user.encode('xtext'))
    if helo[0]:
        heloStr = ('    helo=' + helo[0])
    fromUser = (((((('from    ' + helo[0]) + '    ([') + helo[1]) + ']') + heloStr) + authStr)
    by = (((((('by    ' + self.host) + '    with    ') + self.protocolName) + '    (') + networkString(longversion)) + ')')
    forUser = ((('for    <' + '    '.join(map(bytes, recipients))) + '>    ') + smtp.rfc822date())
    return ((((('Received:    ' + fromUser) + '\n DCTB ') + by) + '\n DCTB ') + forUser)
