Hi, sorry for asking this during the weekend, but maybe someone in this awesome community, might know something.
My client reached monthly volume and I have logic for rejecting messages when the limit is reached in the smtp_server_mail_from event:
kumo.on('smtp_server_mail_from', function(sender, conn_meta)
...
local sent = conn:query("INCRBY", 'tenant_sent:' .. conn_meta:get_meta('tenant'), 1)
local volume = tonumber(conn_meta:get_meta('tenant_volume'))
if tonumber(sent) > volume then
kumo.reject(420, 'monthly limit reached')
end
end)
because of this logic, my guess is that the reject is causing this
May 18 11:41:36 s11462067 kumod[1023790]: called `Option::unwrap()` on a `None` value
May 18 11:41:36 s11462067 kumod[1023790]: note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
May 18 11:41:36 s11462067 systemd[1]: kumomta.service: Main process exited, code=dumped, status=3/QUIT
May 18 11:41:36 s11462067 systemd[1]: kumomta.service: Failed with result 'core-dump'.
May 18 11:41:37 s11462067 systemd[1]: kumomta.service: Scheduled restart job, restart counter is at 76.
May 18 11:41:37 s11462067 systemd[1]: Stopped KumoMTA SMTP service.
May 18 11:41:37 s11462067 systemd[1]: Started KumoMTA SMTP service.
May 18 11:41:37 s11462067 kumod[1023870]: 2024-05-18T11:41:37.122869Z INFO localset-0 kumod: NodeId is 11a465d0-6dad-49ee-a818-5323bb30e5b7
May 18 11:41:37 s11462067 kumod[1023870]: 2024-05-18T11:41:37.285866Z INFO localset-0 kumod::smtp_server: smtp listener on 0.0.0.0:587
May 18 11:41:37 s11462067 kumod[1023870]: 2024-05-18T11:41:37.298675Z INFO localset-0 kumod::spool: start_spool: enumeration done, spooled in 38 msgs over 14.053072ms
I figured that rejecting new messages, should be done before smtp_server_mail_from, maybe in the smtp_server_auth_plain, but I need to differentiate between auth fail and limit reach responses.
Hey there @yummy-echidna, thanks for posting. Please read the “Troubleshooting” and “How to Ask for Help” buttons below. If you would like a 1:1 support session from the KumoMTA team, details are at the “Book a Support Session” button below.
May 18 14:19:21 s11462067 kumod[1069874]: thread 'localset-5' panicked at crates/kumod/src/smtp_server.rs:1184:54:
May 18 14:19:21 s11462067 kumod[1069874]: called `Option::unwrap()` on a `None` value
May 18 14:19:21 s11462067 kumod[1069874]: note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
May 18 14:19:21 s11462067 systemd[1]: kumomta.service: Main process exited, code=dumped, status=3/QUIT
May 18 14:19:21 s11462067 systemd[1]: kumomta.service: Failed with result 'core-dump'.
May 18 14:19:21 s11462067 systemd[1]: kumomta.service: Scheduled restart job, restart counter is at 311.
May 18 14:19:21 s11462067 systemd[1]: Stopped KumoMTA SMTP service.
May 18 14:19:21 s11462067 systemd[1]: Started KumoMTA SMTP service.
May 18 14:19:21 s11462067 kumod[1070143]: 2024-05-18T14:19:21.325753Z INFO localset-3 kumod: NodeId is 11a465d0-6dad-49ee-a818-5323bb30e5b7
May 18 14:19:21 s11462067 kumod[1070143]: 2024-05-18T14:19:21.493782Z INFO localset-3 kumod::smtp_server: smtp listener on 0.0.0.0:587
May 18 14:19:21 s11462067 kumod[1070143]: 2024-05-18T14:19:21.524972Z INFO localset-3 kumod::spool: start_spool: enumeration done, spooled in 33 msgs over 31.797281ms
i changed also kumo.reject(420, 'monthly limit reached') to kumo.reject(550, 'monthly limit reached') and now reception logs are not generated anymore, but the restart keeps happening