| 836 | |
| 837 | # AUTH related stuff. It would be nice if support for this were in smtpd. |
| 838 | def found_terminator(self): |
| 839 | if self.smtp_state == self.AUTH: |
| 840 | line = self._emptystring.join(self.received_lines) |
| 841 | print('Data:', repr(line), file=smtpd.DEBUGSTREAM) |
| 842 | self.received_lines = [] |
| 843 | try: |
| 844 | self.auth_object(line) |
| 845 | except ResponseException as e: |
| 846 | self.smtp_state = self.COMMAND |
| 847 | self.push('%s %s' % (e.smtp_code, e.smtp_error)) |
| 848 | return |
| 849 | self.all_received_lines.append(self.received_lines) |
| 850 | super().found_terminator() |
| 851 | |
| 852 | |
| 853 | def smtp_AUTH(self, arg): |