haraka / haraka-plugin-karma

Karma plugin - A heuristics based reputation engine for Haraka
https://www.npmjs.com/package/haraka-plugin-karma
MIT License
8 stars 6 forks source link

Asn keys without expiration in Redis #60

Closed DoobleD closed 3 months ago

DoobleD commented 3 months ago

System Info:

Haraka Haraka.js — Version: 3.0.3
Node v20.11.1
OS Linux mail.postale.io 5.15.0-1038-aws #43~20.04.1-Ubuntu SMP Fri Jun 2 17:10:57 UTC 2023 x86_64 GNU/Linux
openssl OpenSSL 1.1.1w 11 Sep 2023

Describe the bug

In my redis I see asn keys without expiration:

local:6379> hgetall as12876
1) "connections"
2) "2"
3) "bad"
4) "2"
local:6379> ttl as12876
(integer) -1

Expected behavior

I expected asn keys to have an expiration, as per the config and the code. I haven't defined the expire_days setting, so I assumed it'd be set to the default (60 days).

Or is this behavior normal? I'll admit I haven't read the entire plugin code.

msimerson commented 3 months ago

Yes, this is normal. My thinking was, ASN numbers are far less transient than IP addresses, which get moved from customer to customer, and occasionally from provider to provider. Network management is durable and tends not to change frequently, so why should the ASNs score?

DoobleD commented 3 months ago

Thank you @msimerson. Over time these records accumulate to a significant number, but I get the point. Thanks for explaining!