'Handle server responses for the WELCOME state in which the server
greeting is expected.
WELCOME is the first state.  The server should send one line of text
with a greeting and possibly an APOP challenge.  Transition the state
to WAITING.
@type line: L{bytes}
@param line: A line received from the server.
@rtype: L{bytes}
@return: The next state.'

def state_WELCOME(self, line):

    (code, status) = _codeStatusSplit(line)
    if (code != OK):
        self._greetingError = status
        self.transport.loseConnection()
    else:
        m = self._challengeMagicRe.search(status)
        if (m is not None):
            self.serverChallenge = m.group(1)
        self.serverGreeting(status)
    self._unblock()
    return 'WAITING'
