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.
- Introduce '[daemon]bounce_on_keys_missing' option to let the admin decide if
they want Lacre to deliver cleartext message when identity database is
unreachable or throws exceptions. It defaults to 'no'.
- In IdentityRepository, use option mentioned above to decide what to do when
an exception is caught.
- Let the user specify a directory, using the one from configuration by
default.
- If user requested identity list without a specific email, list all. Drop
support for '-a' option.