- Polish implementation of mail operations (lacre/mailop.py). Add two
strategies: InlineOpenPGPEncrypt and MimeOpenPGPEncrypt, to support two modes
of OpenPGP encryption.
- In delivery_plan, only use those strategies that actually make sense with
the recipients we'd got.
- Add flag_enabled predicate (lacre/config.py) to make configuration checks
easier / simpler.
- Handle TypeError errors in Advanced Filter, indicating a delivery failure
when they appear.
- Add type hints to some of the functions.
- Add a "mailop" module to define mail operations. Each should inherit from
MailOperation class (which just defines the contract).
- Make lacre.mailgate.delivery_plan always return KeepIntact strategy to have
a daemon that just forwards messages without modifying them.
- Add sample configuration.
- Include daemon configuration in mandatory parameter check.
Also: extend failover logging configuration with file-based handler to make
sure that the user gets _some_ logs even if they do not configure Lacre at
all.
- Replace custom logging code with calls to logging module.
- Use logging.config to provide configuration parameters.
To make Lacre's logging more flexible, use fileConfig from logging.config to
set up all parameters. If the configuration file is missing, use dictConfig
with hardcoded reasonable defaults.
- Move configuration-processing code to a separate module (lacre.config) and
provide a simple API to access configuration parameters.
- Prepare to use builtin logging module to log diagnostic data.
- Rework the configuration-processing file to make it cleaner.
- Log additional information while processing configuration.
- Reorder functions.