'Connect to the LMTP daemon, on either a Unix or a TCP socket.'

def connect(self, host='localhost', port=0):

    if (host[0] != '/'):
        return SMTP.connect(self, host, port)
    try:
        self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
        self.sock.connect(host)
    except socket.error:
        if (self.debuglevel > 0):
            self.debug('connect    fail:', host)
        if self.sock:
            self.sock.close()
        self.sock = None
        raise
    (code, msg) = self.getreply()
    if (self.debuglevel > 0):
        self.debug('connect:', msg)
    return (code, msg)
