KumoMTA is unable to listen on IPv6 and IPv4 simultaneously

I am injecting mails in KumoMTA from IPv4 and IPv6. So to handle that I will have to define a listener for both types of IPs, and that is where I am getting stuck.
I have defined two smtp_listeners for IPv4 and Ipv6 both listening on port 25. But it can only listen to one at a time.
Here are my listeners defined in init.lua.
kumo.start_esmtp_listener {
listen = ‘0.0.0.0:25’,
hostname = ‘example.com’,
tls_private_key = “/etc/letsencrypt/live/example.com/privkey.pem”,
tls_certificate = “/etc/letsencrypt/live/example.com/fullchain.pem”,
relay_hosts = {’ ‘},
}
kumo.start_esmtp_listener {
listen = ‘[::]:25’,
tls_private_key = “/etc/letsencrypt/live/example.com/privkey.pem”,
tls_certificate = “/etc/letsencrypt/live/example.com/fullchain.pem”,
relay_hosts = {’ '},

Here is the error occuring in logs.
kumod::mod_kumo: Error in SmtpServer: failed to bind to [::]:25: Address already in use (os error 98)

Hey there @helpful-emu, 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.

Check for what process is already listening to port 25 on ipv6 in the server.

The IPv4 smtp_listener is using that port. If I comment out the entry of IPv4 then IPv6 listens on it perfectly. But not both at once.

Show your output for netstat -putan | grep 25

tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 3845/kumod

This is the output for “netstat -putan | grep 25”

Please open an issue with full details, that does not normally happen.

I am injecting mails in KumoMTA from IPv4 and IPv6. So to handle that I will have to define a listener for both types of IPs, and that is where I am getting stuck.

Yes, put that in your issue description

Do you mean I should describe this at the beginning of the post?

Open an issue in the GitHub repository.

If you want to listen on both v4 and v6 addresses, the way that linux works is that the v6 wildcard acts as both v4 and v6, so I think you should be fine to remove the v4 0.0.0.0 listener and keep just the v6 [::] listener.