the lazy_expunge plugin comes with dovecot but I could not get it to work in the config.
It gets loaded but does not do what it should. Maybe because of mistakes I made or maybe some special configs used by mailcow (sieve filters etc.). I cant tell, maybe you got more luck with it.
You for sure need an extra namespace and you need to add it to the mail_plugins.
If you put the config to far behind in the dovecot config you will get an error.
Cd to your mailcow-dockerized directory and you can check if the plugin is loaded:
‘docker-compose logs dovecot-mailcow | grep plugin’
Here are some links:
If you find a working solution it would be nice if you post some feedback here.