Dovecot fails to start if cloud packages are removed. The service has "After=local-fs.target network-online.target". Probably the network-online.target is gone, the service started too early, before ip addresses are assigned.
Errors:
dovecot[320]: Error: bind(n.n.n.n, 993) failed: Cannot assign requested address
dovecot[320]: Error: service(imap-login): listen(n.n.n.n, 993) failed: Cannot assign requested address
dovecot[320]: Error: bind(n:n:n:n:n:n:n:n, 993) failed: Cannot assign requested address
dovecot[320]: Error: service(imap-login): listen(n:n:n:n:n:n:n:n, 993) failed: Cannot assign requested address
dovecot[320]: Fatal: Failed to start listeners
dovecot.service is defined here:
/etc/systemd/system/multi-user.target.wants/dovecot.service
Below [unit]:
After=local-fs.target network-online.target
This can be fixed by using:
After=local-fs.target network.target
Or by appending " network.target":
After=local-fs.target network-online.target network.target
This may work with or without cloud (not tested with cloud). It fixes the problem when cloud functions have been removed.
Activate change:
systemctl daemon-reload