diff --git a/lacre/daemon.py b/lacre/daemon.py index 280a7e2..5300d60 100644 --- a/lacre/daemon.py +++ b/lacre/daemon.py @@ -63,7 +63,7 @@ class MailEncryptionProxy: if conf.should_log_headers(): LOG.error('Erroneous message headers: %s', self._beginning(envelope)) - return xport.RESULT_ERRORR + return xport.RESULT_ERROR return xport.RESULT_OK diff --git a/lacre/mailop.py b/lacre/mailop.py index 69d6d9b..e6e9344 100644 --- a/lacre/mailop.py +++ b/lacre/mailop.py @@ -131,7 +131,7 @@ class KeepIntact(MailOperation): """Return MESSAGE unmodified.""" try: return message.as_bytes(policy=SMTPUTF8) - except IndexError as e: + except (IndexError, UnicodeEncodeError) as e: raise MailSerialisationException(e) def __repr__(self):