When we fail to encrypt a message, we log a message with a complete traceback.
The goal is to ensure that when diagnosing it later, we have complete
information.
We want to avoid deserialising message contents, because Python's email module
might produce different representation than the MUA sending original message.
The result would be a transformed message, which could mean broken message in
certain conditions.
- Always default to 'python' if PYTHON env. var. unset.
- Enable SQLAlchemy warnings in daemon tests.
- Commit changes in schema initialisation script.
- Implement KeyConfirmationQueue.delete_expired_queue_items to delete items
older than a given number of hours.
- Introduce configuration parameter to specify maximum number of hours. It
defaults to 1 hour.
- Update documentation to explain that we never assign ST_TO_BE_DELETED.
- Introduce exceptions to be raised upon transient and permanent delivery
failures, as specified by SMTP RFC. Depending on type of failure, return
either 451 or 554 reply code.
- When serialising a message, treat ValueError as a serialisation issue (and
try again to deliver in cleartext).
1. Log the full traceback only once for each error (when we bounce the
message).
2. Use 451 response code on processing failure.
3. Disable decoding message contents as we operate on raw data anyway.
When we know we need to bounce a message and [daemon]log_headers is enabled,
we record up to 2.5kB of message headers at ERROR level. This could help
diagnosing issues later.
Also: no longer record MIME Type, Charset and Content-Transfer-Encoding, as
the issues related to these properties no longer occur.
When we fail to produce byte representation of the email message being
processed, we may end up bouncing a message. An example of such case would be
a message with a Message-Id header that Python's email parser library cannot
process.
In such cases, just take whatever original content we have received and pass
it to the destination without touching it to minimise any chances of breaking
the overall flow.
- Set nullability of columns.
- Set up primary keys and auto-increment where necessary.
- Add missing 'lacre_locks' table.
- Implement a function to create tables.