Despite configuring the SMTP listener to accept connections only from specific hosts, messages from unauthorized hosts are not being rejected.
Configuration:
init.lua
kumo.start_esmtp_listener({
listen = "0.0.0.0:25",
relay_hosts = { "127.0.0.1", "192.168.1.0/24", "<myredactedipv4>" },
})
listener_domains
["*"]
relay_to = false
log_oob = true
log_arf = true
Messages from an unauthorized host (91.92.251.215) were successfully received. This is evident from the message receipt log:
{"type":"Reception","id":"ebaaab5e9e7b11eeb206960002ccea16","sender":"test@test.com","recipient":"mmiihhww09@gmail.com","queue":"default@gmail.com","site":"","size":594,"response":{"code":250,"enhanced_code":null,"content":"","command":null},"peer_address":{"name":"WIN-CLJ1B0GQ6JP","addr":"91.92.251.215"},"timestamp":1702996556,"created":1702996556,"num_attempts":0,"bounce_classification":"Uncategorized","egress_pool":null,"egress_source":null,"feedback_report":null,"meta":{},"headers":{"Subject":"test smtp xx.xx.xx.xxx--"},"delivery_protocol":null,"reception_protocol":"ESMTP","nodeid":"dd2b41fd-78f0-4105-8cd9-01ac7114cada"}
Does the listener domains precede the relay_hosts or does it need an extra configuration to be rejected?
Additional Issue:
Every message receipt, regardless of its validity, has the bounce_classification field set to Uncategorized. This occurs even though the default IANA configuration is loaded in the init handler.