'Validate the address from which a message originates.
@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.
@rtype: L{Address}
@return: The origination address.
@raise SMTPBadSender: When messages cannot be accepted from the
origination address.'

def validateFrom(self, helo, origin):

    if (not helo):
        raise smtp.SMTPBadSender(origin, 503, 'Who    are    you?        Say    HELO    first.')
    if ((origin.local != '') and (origin.domain == '')):
        raise smtp.SMTPBadSender(origin, 501, 'Sender    address    must    contain    domain.')
    return origin
