'duplicate listener' on port 465
Hi,
When configuring SMTPS as described on https://doc.dovecot.org/main/core/config/submission.html#smtps, Dovecot says there is a 'duplicate listener'.
MRE:
root@dovecot24-test:/etc/dovecot/conf.d# doveconf -n
# 2.4.1-4+debian12 (7d8c0e5759): /etc/dovecot/dovecot.conf
# Pigeonhole version 2.4.1-4+debian12 (0a86619f)
# OS: Linux 6.1.0-29-amd64 x86_64 Debian 12.11
# Hostname: dovecot24-test.cyberfusion.nl
# 4 default setting changes since version 2.4.0
dovecot_config_version = 2.4.0
dovecot_storage_version = 2.4.0
protocols = submission
service submission-login {
inet_listener submission_465 {
port = 465
}
}
doveconf: Error: duplicate listener: 465:*
doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf:
duplicate listener: 465:*
Can anyone help me understand why this listener would be 'duplicate'? This setup worked on 2.3.21.1.
Thanks!
William David Edwards
Hi,
I also encountered this issue after updating from dovecot 2.3 to 2.4 (Debian upgrade to trixie). I managed to get dovecot working and thought I'd share the info.
In my case the submission-login config looked like this:
service submission-login { inet_listener submission { port = 465 ssl = yes } }
This worked in v2.3 but yielded the "|Error: duplicate listener: 465:*|" error message in v2.4.
I managed to fix it by renaming the inet_listener to "submissions" (note the trailing s).
I think that dovecot has some sort of default config for the submission-login service. I found this in the dovecot code that seems to point in the same direction: https://github.com/dovecot/core/blob/main/src/submission-login/submission-lo... This default config contains an inet_listener called "submissions" on port 465 with TLS enabled. When you configure an inet_listener that is not named "submissions" and put it on port 465 this clashes with the default listener. Though I am not really sure if that is correct and I don't claim I really understand what that code does so take this with a grain of salt.
I did not find any mention of this in the documentation. If dovecot actually injects some default config I think this should be prominently mentioned somewhere in the docs.
There is also a default "submission" listener for non-TLS traffic on port 587. I explicitly disabled this by setting the port to 0 (this is documented here https://doc.dovecot.org/main/core/config/service.html#inet_listener_port). If this is not done, dovecot will also listen on port 587. My full submission-login config now looks like this:
service submission-login { inet_listener submission { port = 0 }
inet_listener submissions { port = 465 ssl = yes } }
Hi,
I also encountered this issue after updating from dovecot 2.3 to 2.4 (Debian upgrade to trixie). I managed to get dovecot working and thought I'd share the info.
In my case the submission-login config looked like this: service submission-login { inet_listener submission { port = 465 ssl = yes } } This worked in v2.3 but yielded the "Error: duplicate listener: 465:*" error message in v2.4.
I managed to fix it by renaming the inet_listener to "submissions" (note the trailing s).
I think that dovecot has some sort of default config for the submission-login service. I found this in the dovecot code that seems to point in the same direction: [1]https://github.com/dovecot/core/blob/main/src/submission-login/submission-lo... This default config contains an inet_listener called "submissions" on port 465 with TLS enabled. When you configure an inet_listener that is not named "submissions" and put it on port 465 this clashes with the default listener. Though I am not really sure if that is correct and I don't claim I really understand what that code does so take this with a grain of salt.
I did not find any mention of this in the documentation. If dovecot actually injects some default config I think this should be prominently mentioned somewhere in the docs.
There is also a default "submission" listener for non-TLS traffic on port 587. I explicitly disabled this by setting the port to 0 (this is documented here [2]https://doc.dovecot.org/main/core/config/service.html#inet_listener_port). If this is not done, dovecot will also listen on port 587. My full submission-login config now looks like this:
service submission-login { inet_listener submission { port = 0 }
inet_listener submissions {
port = 465
ssl = yes
}
}
References
Visible links
participants (2)
-
Markus Siebenhaar
-
William David Edwards