'Check the state of the relay queue and, if possible, launch relayers to
handle waiting messages.
@rtype: L{None} or L{Deferred}
@return: No return value if no further messages can be relayed or a
deferred which fires when all of the SMTP connections initiated by
this call have disconnected.'

def checkState(self):

    self.queue.readDirectory()
    if (len(self.managed) >= self.maxConnections):
        return
    if (not self.queue.hasWaiting()):
        return
    return self._checkStateMX()
