Woke up, and a few minutes later, my milter did its first SPF evaluation.
I decided to care about body scanning later, lets have some easy wins first.
Discussion
Woke up, and a few minutes later, my milter did its first SPF evaluation.
I decided to care about body scanning later, lets have some easy wins first.
This is a nice easy win.
I quickly turned the trace into <details>, because that's nicer.
And now I can do DNS Blocklist (& allowlist) lookups too. Almost at a point where I feel like I can direct one of my less important domains here.
I am very proud of myself.
Need a way to extract the domain part of an email, look up its IP addresses, and then run DNSBL checks on that, too.
In a somewhat related note: I now tested Roto's const: I can create a dnsbl.Resolver at script compile time, and use it at runtime.
I'll be able to do the same with #iocaine matchers, and thus, will be able to get rid of the double compilation, and the split between init and main modules. Which, in turn, will greatly simplify iocaine's Roto scripts.
I'm also experimenting with using modules for stdlib parts, for better organization.
I'm even considering putting everything related to the tool under the ryoms module, so that they don't conflict with other things.
Maybe I should decouple the score from the tag name. The problem with that, is that some of my checks have variable score, and I like that.
I don't have different symbols/tags/whatever for "found in spamhaus zen's DROP list" and "found in spamhaus zen's SBL". I have the one DNSBL_SPAMHAUS_FOUND, and the score increases if the IP is found on multiple lists.
Also... the report. I'm currently generating markdown. But it has HTML parts, to make it look better rendered. Maybe I should directly generate HTML instead, and if I need a textual report, I can lynx -dump or pandoc it.
On the other hand, markdown-with-html-snippets is a whole lot easier to emit.
I think I found a neat way to handle adjusting scores.
I can provide a ryoms.score.update(<category>, <tag>, <score-adjustment>) function. Category is something like DNSBL_MAILSPIKE_FOUND, tag is something like REPUTATION_L5.
The Rust-side function can check if there's a custom on_score_update function, and if there is, dispatch there. If that function doesn't return a modified score, use the original one.
Ugh. Okay, that's not so easy doing such circular calling.
I have a cursed idea.
@algernon do useful dns blocklists still exist?