I've attached a patch that modifies the postinst scripts and adds postrm scripts to update dovecot.conf.
It should handle the situation where the user has disabled one protocol in dovecot.conf and a package upgrade should not re-enable it.
The only case where it won't work as expected is when dovecot-{imapd,pop3} has been removed but not purged. A reinstall of the package won't re-enable the protocols in dovecot.conf.
I've attached a patch that modifies the postinst scripts and adds postrm scripts to update dovecot.conf.
It should handle the situation where the user has disabled one protocol in dovecot.conf and a package upgrade should not re-enable it.
The only case where it won't work as expected is when dovecot- {imapd, pop3} has been removed but not purged. A reinstall of the package won't re-enable the protocols in dovecot.conf.