Solve Dovecot error "Unknown section name: plugin"

Published at 24 Oct 2025

If you use Dovecot as your mail server, upgrading from 2.3 to 2.4 can cause some issues.

It's always recommended to carefully read the upgrade guide before upgrading a a neewer version, but if you use Plesk like me, the upgrade can happen automatically.

If you're getting the following error:

doveconf: Fatal: Error in configuration file /etc/dovecot/conf.d/37-custom-global-sieve.conf line 2: Unknown section name: plugin

You need to modify the 37-custom-global-sieve.conf file to the new syntax.

Until version 2.3, this was the syntax you'll probably have:

vi /etc/dovecot/conf.d/37-custom-global-sieve.conf
plugin {
       # Make sure to run "sievec" on this:
       sieve_after = /etc/dovecot/conf.d/custom-sieve/global_after.sieve
}

Since version 2.4, in new syntax the plugin section no longer exists, and sieve_after also has changed. To achieve the same functionality as before, you should update the file content to the following:

vi /etc/dovecot/conf.d/37-custom-global-sieve.conf
sieve_script after {
  sieve_script_path = /etc/dovecot/conf.d/custom-sieve/global_after.sieve
}

After this change, you can run the following command to check if there's any other syntax error.

doveconf -n

If it displays the whole Dovecot configuration, you're ready to go.

Restart your server and everything should work as expected.