- 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.
- Provide a new reuqired parameter: [database]pooling_mode and use it during
SQLAlchemy engine initialisation.
- Update tests and configuration (including sample configuration).
- Adjust repository unit test to load config during setup.
- Pass an engine instance to repository constructors instead of connections.
Engine keeps a connection pool and we rely on it.
Provide 3 new configuration parameters in database section:
- max_connection_age --- number of seconds before an idle connection is
"recycled", i.e. replaced with a new one;
- pool_size --- number of simultaneous connections kept in the pool;
- max_overflow --- maximum number of simultaneous connections we could make to
the database.
Update sample config, including links to documentation.