DEV Community

Cover image for Solve Dovecot error "Unknown section name: plugin"
Sergio Peris
Sergio Peris

Posted on • Originally published at sertxu.dev

Solve Dovecot error "Unknown section name: plugin"

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
Enter fullscreen mode Exit fullscreen mode
plugin {
       # Make sure to run "sievec" on this:
       sieve_after = /etc/dovecot/conf.d/custom-sieve/global_after.sieve
}
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode
sieve_script after {
  sieve_script_path = /etc/dovecot/conf.d/custom-sieve/global_after.sieve
}
Enter fullscreen mode Exit fullscreen mode

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

doveconf -n
Enter fullscreen mode Exit fullscreen mode

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

Restart your server and everything should work as expected.

Top comments (0)