How do I configure the Dovecot message delivery agent to only allow imap connections from localhost?
2 Answers
The listen = addr:port
config is deprecated in newer versions of dovecot. The new way of doing things is with service { inet_listener imap { address = ... } }
.
On my system it's in /etc/dovecot/conf.d/10-master.conf
:
service imap-login { inet_listener imap { address = 127.0.0.1 } }
- It's strange, this is supposed to be the new way to configure but my server just ignores the 'address' restriction in 10-master.conf, while another answer from year-2011 using simplistic dovecot.conf finally resolved my need...Van Jone– Van Jone2019-09-10 15:04:06 +00:00Commented Sep 10, 2019 at 15:04
It's probably easiest to just listen only on localhost:
protocol imap { listen = 127.0.0.1:143 ssl_listen = 127.0.0.1:993 }
- Thanks again for another answer :) I'm a bit green with all this, so what file would I make this change in?linus1412– linus14122011-04-21 11:10:22 +00:00Commented Apr 21, 2011 at 11:10
- 1Found it - dovecot.conf in /etc/dovecotlinus1412– linus14122011-04-21 11:15:27 +00:00Commented Apr 21, 2011 at 11:15