Bug 160277 - dovecot fails to srart after upgrade with ssl enabled
dovecot fails to srart after upgrade with ssl enabled
Product: Fedora
Classification: Fedora
Component: dovecot (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: John Dennis
: 167440 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2005-06-13 22:31 EDT by Emerson House
Modified: 2014-01-21 17:52 EST (History)
3 users (show)

See Also:
Fixed In Version: dovecot-0.99.14-6.fc4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-06-16 15:27:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Emerson House 2005-06-13 22:31:48 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050524 Fedora/1.0.4-4 Firefox/1.0.4

Description of problem:
Functional FC3 sytem with SSL upgraded to FC4.
pem files appear to have been moved from usr/share/ssl/certs
to /etc/pki/dovecot

Upgrade moved existing pems to /etc/pki/dovecot

Delete existing pem's and run mkcert.sh

New pem's created in /etc/pki/dovecot

Try to start Dovecot

Dovecot puts message in logfile that it cannot find /etc/pki/dovecot/certs/dovecot.pem

No certs subdirectory in /etc/pki/dovecot

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.service dovecot start

Actual Results:  <nothing>
service dovecot status 
dovecot dead but subsys locked

Expected Results:  Dovecot starts

Additional info:


Create certs directory in /etc/pki/dovecot

copy /etc/pki/dovecot/dovecot.pem to /etc/pki/dovecot/certs/dovecot.pem

Dovecot starts and functions.

Do not copy /etc/pki/dovecot/private/dovecot.pem
Comment 1 Emerson House 2005-06-16 12:27:41 EDT
Upgrade does not replace dovecot.conf, but writes dovecot.conf.rpmnew.  FC3
dovecot.conf specifies /usr/share/ssl/dovecot/certs as default directory for
cert file but is commented out so it does not override system default.

dovecot.conf.rpmnew specifies /etc/pki/dovecot [not /cert] as default directory
for cert, but is not commented out so it would overide system default.

System default must now use /etc/pki/dovecot/cert but new installations would be
set by dovecot.conf.rpmnew [installed as dovecot.conf] and explicitly point to
/etc/pki/dovecot.  Upgrade scripts and mkcert.sh must be consistent with
Comment 2 John Dennis 2005-06-16 13:09:47 EDT
I'm a bit confused, I don't see a problem, other than a spurious warning message
from mkcert.sh. Also this was tested both for upgrades and for new installations
and no problems were found. O.K. that doesn't mean a mistake or oversight didn't
occur. Please review the following snippets, a second set of eyeballs is a good

/etc/dovecot.conf (indeed on upgrade you have look for .rpmnew files) sets this:

ssl_cert_file = /etc/pki/dovecot/dovecot.pem
ssl_key_file = /etc/pki/dovecot/private/dovecot.pem

The spec file on upgrade will move existing ssl files from the old location to
the new location, or if absent creates a new set of certs with mkcert.sh

%define ssldir /etc/pki/%{name}
# create a ssl cert
if [ -f /usr/share/ssl/certs/dovecot.pem -a ! -f %{ssldir}/%{name}.pem ]; then
mv /usr/share/ssl/certs/dovecot.pem %{ssldir}/%{name}.pem
if [ -f /usr/share/ssl/private/dovecot.pem -a ! -f %{ssldir}/private/%{name}.pem
]; then
mv /usr/share/ssl/private/dovecot.pem %{ssldir}/private/%{name}.pem
if [ ! -f %{ssldir}/%{name}.pem ]; then
%{docdir}/examples/mkcert.sh &> /dev/null

mkcert.sh also puts things in the right place (albeit it mistakenly emits a
warning about the now deprecated certs subdirectory)

Comment 3 John Dennis 2005-06-16 15:19:20 EDT
From a private email from: Emerson House <emersonhouse@hotmail.com>

With the old dovecot.conf the explict pems are commented, thus using system 
defaults (set somewhere else, but the commented pems are the same).  With 
the upgrade and the old dovecot.conf the system defaults are changed (again 
set some where else).  The new system defaults and the explicit pems in the 
new dovecot.conf share the same directory - /etc/pki/dovecot, however the 
explicit pems are not commented so they override the system defaults.  The 
explicit pems differ from the system defaults in that the cert file is in 
the /etc/pki/dovecot directory not the /etc/pki/dovecot/certs directory. 
The upgrade and makecerts.sh both write the cert file to /etc/pki/dovecot 
not /etc/pki/dovecot/certs which is consistent with the explicit uncommented 
pems in the new dovecot.conf but will not work for any system using the 
implicit system default which still points to a .../certs directory.
Comment 4 John Dennis 2005-06-16 15:27:42 EDT
Fundamental problem relying on the config file to set the ssl location. Dovecot
does have built in defaults for all of its config parameters which are used if
not set in the config file. If the ssl locations were not set in the config
file, but instead the built in defaults were relied on then
/etc/pki/dovecot/certs/dovecot.pem would be used instead of
/etc/pki/dovecot/dovecot.pem (note certs subdir is no longer in use). The
built-in defaults were modified.

Also fixed: The /etc/pki/dovecot/private directory is now created by the rpm.
The warn concerning /etc/pki/dovecot/certs was fixed in mkcert.sh. mkcert.sh
will now exit with an error if either directory /etc/pki/dovecot or
/etc/pki/dovecot/private is absent.

Fixed in dovecot-0.99.14-6.fc4
Comment 5 Alasdair Kergon 2005-10-03 18:17:38 EDT
*** Bug 167440 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.