when you edit protocols under "webmin -> servers -> dovecot -> networking and protocols" it actually writes it to the wrong file.
i copied the config folder structure and did a diff to see where it changed, and see that it touched the managesieve config file (that's a dovecot plugin whose protocols line SHOULD be saying "protocols = $protocols sieve" which means that it appends the protocol to the list of existing enabled protocols:
diff -ENwbur /tmp/dove/conf.d/20-managesieve.conf /etc/dovecot/conf.d/20-managesieve.conf
--- /tmp/dove/conf.d/20-managesieve.conf 2013-02-16 23:47:04.000000000 -0500
+++ /etc/dovecot/conf.d/20-managesieve.conf 2013-02-16 23:56:27.000000000 -0500
@@ -3,7 +3,7 @@
##
# Uncomment to enable managesieve protocol:
-protocols = $protocols sieve
+protocols = imap lmtp sieve
so it edited /etc/dovecot/conf.d/20-managesieve.conf, but it SHOULD have edited /etc/dovecot/dovecot.conf, which contains this line:
protocols = imap pop3 lmtp
maybe this is like the postfix example where you use a tool to edit the config and it's out of your hands... i hope not. if you are using a tool then either look into a way to always edit the correct config file, or disable the feature...
Comments
Submitted by aitte on Sat, 02/16/2013 - 23:26 Comment #1
also, the GUI doesn't understand enabled protocols properly.
here are my config files:
in other words, IMAP + Sieve (managesieve), no other protocols are enabled.
the webmin gui however shows all 4 protocols as enabled (imap, pop3, lmtp, sieve) since it doesnt parse the configs correctly.
unfortunately this will be tricky for you to fix unless dovecot has some sort of mode that can dump a list of all config values. it's all caused by the fact that dovecot splits configs into multiple cumulative files that are parsed one after the other, overwriting or adding to the previous files... and that's not easy to parse, unless you take the same steps of first reading the /etc/dovecot/dovecot.conf file for its "protocols" line, and then cumulatively reading all files in the include-directory and overwriting/appending values to the "protocols" line until you know the truth...
to disable built-in protocols (pop, imap, lmtp) always use /etc/dovecot/dovecot.conf
to disable plugin protocols, comment out the "protocols = $protocols sieve"-type line in the corresponding /etc/dovecot/conf.d/20-managesieve.conf file (or whatever the plugin may be).
sigh... looks like a lot of work for very little gain to properly fix this bug, unfortunately.
i guess a simple bandaid would be to only support the main protocols (pop, imap and lmtp) in the "disable/enable protocols" GUI, and only ever read/modify /etc/dovecot/dovecot.conf. that way, plugin protocols won't be listed, but at least things won't break.
Submitted by JamieCameron on Mon, 02/18/2013 - 00:28 Comment #2
I think the best fix is for Webmin to update the first
protocols
line. However, as you said this isn't ideal either .. once config directives start to refer to each other, it is hard to figure out exactly which one should be updated.Submitted by aitte on Mon, 02/18/2013 - 01:11 Comment #3
exactly; it's a really tricky situation and it would be overkill to begin parsing in depth and doing variable substitution.
here is one way to do such in-depth parsing (but i do not recommend going down this path):
see how much work that is! and it's just for 1 tiny feature.
so instead, i suggest you only read the main dovecot.conf and only support turning on/off the main imap/pop3/lmtp features and nothing else. if someone is smart enough to install plugins (which requires command line work and config editing) then they are smart enough to enable/disable them via the config files.
just change the main feature from "Serve mail protocols: [IMAP,POP3,LMTP,Sieve]" to "Serve mail protocols: [IMAP,POP3,LMTP]" and make the "serve mail protocols" clickable to a page noting that it only deals with the 3 main protocols and that any plugins need to be manually turned on/off via the respective config files.
this way you only have to bother parsing the main config file, which happens to be the only correct place to store the 3 main protocols. so at least the core features will work properly, and you save a boatload of work.
sure, it would be nice to manage plugins too, but the reality is that it takes a lot of knowledge to install plugins, and such power users will be used to installing and configuring things on the command line (which is how they got the plugin in the first place), so this is not a problem.
Submitted by helonaut on Mon, 09/07/2015 - 11:48 Comment #4
This issue has been discussed on multiple occasions (like for example: https://www.virtualmin.com/node/35299), but it's still not fixed. With every dovecot update, we need to go into the terminal to place the # before that line in /usr/share/dovecot/protocols.d/pop3d.protocol
Or was it /etc/dovecot/dovecot.conf ?
Or /etc/dovecot/conf.d/20-managesieve.conf ?
Can someone cut the wire on this issue and push the change into production, please?
Submitted by JamieCameron on Mon, 09/07/2015 - 21:38 Comment #5
This will be fixed in the next Webmin release.
Submitted by helonaut on Sat, 04/09/2016 - 05:06 Comment #6
I haven't had this issue in over almost a year now, so I consider it indeed to be fixed. Thank you JamieCameron for taking action!
Submitted by andreychek on Sat, 04/09/2016 - 08:47 Comment #7
Great, thanks for letting us know!