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.
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.
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.