def _command_MAIL(self, arg):
        match = from_pattern.match(arg)
        if not match:
            bad_arguments.send(self.io)
            return

        start = match.end(0)
        end = find_outside_quotes(arg, b'>', start)
        if end == -1:
            bad_arguments.send(self.io)
            return
        address = arg[start:end].decode('utf-8')

        if not self.ehlo_as:
            bad_sequence.send(self.io)
            return

        if self.have_mailfrom:
            bad_sequence.send(self.io)
            return

        params = self._gather_params(arg[end+1:])

        if b'SIZE' in params:
            try:
                size = int(params[b'SIZE'])
            except __HOLE__:
                bad_arguments.send(self.io)
                return
            max_size = self.extensions.getparam('SIZE', filter=int)
            if max_size is not None:
                if size > max_size:
                    m = '5.3.4 Message size exceeds {0} limit'.format(max_size)
                    Reply('552', m).send(self.io)
                    return
            else:
                unknown_parameter.send(self.io)
                return

        reply = Reply('250', '2.1.0 Sender <{0}> Ok'.format(address))
        self._call_custom_handler('MAIL', reply, address, params)
        reply.send(self.io)
        self._check_close_code(reply)

        self.have_mailfrom = self.have_mailfrom or (reply.code == '250')
dataset/ETHPy150Open slimta/python-slimta/slimta/smtp/server.py/Server._command_MAIL