Hello KumoMTA team, I need to count messages sent by tenants and domains. Any best practices around that? Basically I need some sort of counter, increment it and store to database (I think I can count Reception webhooks, or just custom Lua logic on http message generated for example (I’m using api), but maybe you know any better options? Thank you!
I would go with the webhooks approach unless you plan to do something with that count within KumoMTA itself.
Thanks Mike, the only thing with the webhooks is - looks like I’ll need some sort of caching, maybe even additional counter, because recalculation will be very heavy eventually…Need to think…
What is your actual usecase?
I just want to know total number of emails sent by tenant and domain, store it somehow and use this data for my inhouse API. Maybe as an option add Redis based counter or DynamoDB counters inside my http_generated callback…
That would also be an option, you do have Lua functions to write to Redis
@yearning-hyena hey, sorry let me know if I’ll need to create new thread, but I can’t connect to my ElastiCache instance with the kumo redis client. At the same time - I do can connect to it from my EC2 (Kumo EC2), but not from the lua code. Can I adjust ssl/tls options on my connection or it’s enabled? (its also works with my local redis, so something is wrong with the connection params) UPD: it’s related to ssl parameters, just tried in my python script, without enabled ssl it gives the same timeout
Pls start a new one so everyone can see it. And show errors and config.