Commit graph

7 commits

Author SHA1 Message Date
Rodolphe Breard
45639f18c0 Refactor the library
Threads are a bad idea because for now the filter API is not guaranteed
to be state-less. The interface is now synchronous, which should be
enough for most filters.
The refactoring brought other changes, the most important being the
concept of modular input sources and output destination and the complete
rewrite of the procedural macro.
2019-09-17 16:45:04 +02:00
Rodolphe Breard
4a99257263 Upgrading to nom 5 2019-06-29 17:29:52 +02:00
Rodolphe Breard
866298c948 Updating nom to 4.2 2019-03-03 15:23:31 +01:00
Rodolphe Breard
8173cb282a Switch to the MIT or Apache 2.0 license 2019-01-18 19:08:40 +01:00
Rodolphe Breard
ae8b64941e Add a logger
OpenSMTPD plans to gather all logs from filters. Therefore, a default
logger that implements the smtpd (future) log interface has to be
available.
2019-01-17 19:53:04 +01:00
Rodolphe Breard
4b1f99db7e Allow the use of custom context
The main goal of events/reports is to update a context object, which
will be used in filters to generate a response. It is now possible to
use any object implementing both Clone and Default as a context object.
It is also possible to define no context at all.
2019-01-12 23:43:02 +01:00
Rodolphe Breard
789455668c Use procedural macros to define events
The construction of an EventHandler object should not be directly done
by the client. Instead, it is easier to use procedural macro to
automatize the process, hence exposing a nice and simple interface. Such
use of procedural macros requires to crate an additional crate.
2019-01-06 15:41:30 +01:00