Hi!
On upgrading my private mail server with 3.21 to 3.22 with "apk upgrade --
available" Dovecot was not started cause of:
% service dovecot start
* dovecot: `/etc/dovecot/dovecot.conf' is not readable
* ERROR: dovecot failed to start
That file was gone!
I restored it from backup.
And then I had to convert it to 2.4 format.
First off I added
dovecot_config_version = 2.4.1
dovecot_storage_version = 2.4.1
at the beginning of dovecot.conf. It needs to be the first configuration
statement.
Then I went through
https://doc.dovecot.org/2.4.1/installation/upgrade/2.3-to-2.4.html
and other parts of the documentation of Dovecot and the configuration file
example referenced in above link.
I started dovecot on command line to test changes as I did not see the
configuration syntax errors reported in "/var/log/messages" or "/var/log/
mail.log". The mail server uses Rsyslog.
Updating the configuration is not trivial. It is not completely explained
with examples in one page. I needed to review other parts of the Dovecot
2.4.1 documentation to dig out configuration examples on how things are
supposed to look now.
All in all the configuration seems to be more complex and more verbose
now: Sections need to be named, "passwd" section needs to have a "fields"
group with what was in "args" before, names of configuration directories
have been changed, configuration directives like "mail_location" have been
split up. Oh, and SSL cert file options have been renamed as well and do
not take input redirection with "<" anymore. If you still try Dovecot
treats the contents of the file as filename. So just remove that "<"
there. While some options may be clearer now I am not really sure I
whether I like most of those changes, but it is what it is.
It took me a bit more than half an hour for a simple private server
configuration in a single file in "/etc/dovecot/conf.d". Cause the version
declaration needs to be the first statement I now seem to have to modify
"/etc/dovecot/dovecot.conf" as well. If there is a way around that please
let me know. I'd prefer to leave "dovecot.conf" untouched.
So if you upgrade, plan accordingly.
And make sure you have a backup / snapshot.
At least in the future due to setting the configuration file format
version such surprises should not happen anymore.
It is currently not mentioned in Alpine 3.22 release notes² but IMHO
should be.
I can open a bug report about the missing configuration file and also
about the release notes mentioning Dovecot configuration file syntax
change, if you advice on which packages / components to report to. I am
still quite new to Alpine Linux.
[1] Over the years Postfix has been much more comfortable for me than
Dovecot regarding configuration updates.
[2] https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.22.0
Best,
--
Martin
Re: Dovecot 2.4 with Alpine 3.22 warning: dovecot.conf removed and configuration syntax changed
Hi Martin!
Thanks for the detailed report.
Apparently someone already reported in
https://gitlab.alpinelinux.org/alpine/aports/-/issues/17228, you might
want to add some details there if needed.
Regards,
Martin Steigerwald <martin@lichtvoll.de>,
02/06/2025 – 18:52:51 (+0200):
> Hi!> > On upgrading my private mail server with 3.21 to 3.22 with "apk upgrade --> available" Dovecot was not started cause of:> > % service dovecot start> * dovecot: `/etc/dovecot/dovecot.conf' is not readable> * ERROR: dovecot failed to start> > That file was gone!> > I restored it from backup.> > And then I had to convert it to 2.4 format.> > First off I added> > dovecot_config_version = 2.4.1> dovecot_storage_version = 2.4.1> > at the beginning of dovecot.conf. It needs to be the first configuration > statement.> > Then I went through> > https://doc.dovecot.org/2.4.1/installation/upgrade/2.3-to-2.4.html> > and other parts of the documentation of Dovecot and the configuration file > example referenced in above link.> > I started dovecot on command line to test changes as I did not see the > configuration syntax errors reported in "/var/log/messages" or "/var/log/> mail.log". The mail server uses Rsyslog.> > Updating the configuration is not trivial. It is not completely explained > with examples in one page. I needed to review other parts of the Dovecot > 2.4.1 documentation to dig out configuration examples on how things are > supposed to look now.> > All in all the configuration seems to be more complex and more verbose > now: Sections need to be named, "passwd" section needs to have a "fields" > group with what was in "args" before, names of configuration directories > have been changed, configuration directives like "mail_location" have been > split up. Oh, and SSL cert file options have been renamed as well and do > not take input redirection with "<" anymore. If you still try Dovecot > treats the contents of the file as filename. So just remove that "<" > there. While some options may be clearer now I am not really sure I > whether I like most of those changes, but it is what it is.> > It took me a bit more than half an hour for a simple private server > configuration in a single file in "/etc/dovecot/conf.d". Cause the version > declaration needs to be the first statement I now seem to have to modify> "/etc/dovecot/dovecot.conf" as well. If there is a way around that please > let me know. I'd prefer to leave "dovecot.conf" untouched.> > So if you upgrade, plan accordingly.> > And make sure you have a backup / snapshot.> > At least in the future due to setting the configuration file format > version such surprises should not happen anymore.> > It is currently not mentioned in Alpine 3.22 release notes² but IMHO > should be.> > I can open a bug report about the missing configuration file and also > about the release notes mentioning Dovecot configuration file syntax > change, if you advice on which packages / components to report to. I am > still quite new to Alpine Linux.> > [1] Over the years Postfix has been much more comfortable for me than > Dovecot regarding configuration updates.> > [2] https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.22.0> > Best,> -- > Martin> >
--
Faustin
GPG: F652 BCD1 1AA8 8975 F010 48A5 390A 2F27 832A 5C79
Re: Dovecot 2.4 with Alpine 3.22 warning: dovecot.conf removed and configuration syntax changed
Hi!
Thank you for sharing!
Might even be worth a wiki page. I would appreciate if someone could
help writing it.
https://wiki.alpinelinux.org
Thanks!
-nc
On Mon, 02 Jun 2025 18:52:51 +0200
Martin Steigerwald <martin@lichtvoll.de> wrote:
> Hi!> > On upgrading my private mail server with 3.21 to 3.22 with "apk upgrade --> available" Dovecot was not started cause of:> > % service dovecot start> * dovecot: `/etc/dovecot/dovecot.conf' is not readable> * ERROR: dovecot failed to start> > That file was gone!> > I restored it from backup.> > And then I had to convert it to 2.4 format.> > First off I added> > dovecot_config_version = 2.4.1> dovecot_storage_version = 2.4.1> > at the beginning of dovecot.conf. It needs to be the first configuration > statement.> > Then I went through> > https://doc.dovecot.org/2.4.1/installation/upgrade/2.3-to-2.4.html> > and other parts of the documentation of Dovecot and the configuration file > example referenced in above link.> > I started dovecot on command line to test changes as I did not see the > configuration syntax errors reported in "/var/log/messages" or "/var/log/> mail.log". The mail server uses Rsyslog.> > Updating the configuration is not trivial. It is not completely explained > with examples in one page. I needed to review other parts of the Dovecot > 2.4.1 documentation to dig out configuration examples on how things are > supposed to look now.> > All in all the configuration seems to be more complex and more verbose > now: Sections need to be named, "passwd" section needs to have a "fields" > group with what was in "args" before, names of configuration directories > have been changed, configuration directives like "mail_location" have been > split up. Oh, and SSL cert file options have been renamed as well and do > not take input redirection with "<" anymore. If you still try Dovecot > treats the contents of the file as filename. So just remove that "<" > there. While some options may be clearer now I am not really sure I > whether I like most of those changes, but it is what it is.> > It took me a bit more than half an hour for a simple private server > configuration in a single file in "/etc/dovecot/conf.d". Cause the version > declaration needs to be the first statement I now seem to have to modify> "/etc/dovecot/dovecot.conf" as well. If there is a way around that please > let me know. I'd prefer to leave "dovecot.conf" untouched.> > So if you upgrade, plan accordingly.> > And make sure you have a backup / snapshot.> > At least in the future due to setting the configuration file format > version such surprises should not happen anymore.> > It is currently not mentioned in Alpine 3.22 release notes² but IMHO > should be.> > I can open a bug report about the missing configuration file and also > about the release notes mentioning Dovecot configuration file syntax > change, if you advice on which packages / components to report to. I am > still quite new to Alpine Linux.> > [1] Over the years Postfix has been much more comfortable for me than > Dovecot regarding configuration updates.> > [2] https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.22.0> > Best,