-
-
Notifications
You must be signed in to change notification settings - Fork 8
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
November 2018: OpenSMTPD released and upcoming filters preview #80
Comments
Filters protocol looks very similar to communigate Congrats on releasing it! |
The new filter design is absolutley amazing. I love it. It allows people to quickly write a filter in a simple shell script but it also allows you to redirect the filter-requests to a different (central filtering server) and process there. It's simply amazing. I have already written a SPF filter in Rust. Works perfect. |
@kaey I wasn't aware but it's not really surprising, I didn't do rocket science, the interesting part is not so much the protocol but rather the split between events reporting and filtering, where a filter may or not depend on reporting to build its state, this and the read from stdin / write to stdout logic which makes it trivial to plug with any language. Thanks for your comment. @leo-unglaub oh my, I created a monster... :-) |
This looks great! Some requests:
|
This is already implemented, I use it myself
This can be done using proc filters which actively slow down responses. I have implemented a PoC filter which paused 5 seconds for each reply to
This will be done, it was even discussed yesterday on IRC but I want the Tags are trickier because we already have a tagging mechanism which does
That's a nope :-) I don't want to deal with multiple formats in OpenSMTPD itself. If a filter wants to work with json, in most languages that provide json
It doesn't make sense to me that OpenSMTPD should start supporting json, Filters get to convert the simple format into what they want, and this way |
After you pointed me to your blog from my well intentioned, but utterly misguided PR at OpenSMTPD/OpenSMTPD-extras#58, I guess this is the right forum to ask a follow-up question. From a quick reading of
I apologize if I overlooked some easily accessible information that would have answered those questions. Thank you for your work and all that you do. |
Very simple: A filter is simply a process fork()-ed by OpenSMTPD at startup and which is expected to run an infinite loop reading reporting events and filtering requests from stdin, writing filtering responses to stdout. What your process does internally is up to you: you can run with a single thread if you don't do blocking tasks, you can run with a single thread and event-based programming, you can run with a single thread and co-routines (or related), you can run with multiple threads, etc... the only rule is that you're not allowed to block. One process is enough to handle concurrent deliveries so a single mono-thread filter, like the filter-rspamd you gave as example, is enough to handle all concurrent sessions, there is no need to spawn multiple instances. If you write a cpu-bound filter, one instance is not enough, which I doubt, it is up to your filter to spawn subinstances. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
https://poolp.org/posts/2018-11-03/opensmtpd-released-and-upcoming-filters-preview/
The text was updated successfully, but these errors were encountered: