Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 160277

Summary: dovecot fails to srart after upgrade with ssl enabled
Product: [Fedora] Fedora Reporter: Emerson House <ehbase-linux>
Component: dovecotAssignee: John Dennis <jdennis>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: sdavies, tss, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: dovecot-0.99.14-6.fc4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-06-16 19:27:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Emerson House 2005-06-14 02:31:48 UTC
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

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 16:27:41 UTC
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 must be consistent with

Comment 2 John Dennis 2005-06-16 17:09:47 UTC
I'm a bit confused, I don't see a problem, other than a spurious warning message
from 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

%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/ &> /dev/null
fi 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 19:19:20 UTC
From a private email from: Emerson House <>

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 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 19:27:42 UTC
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
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 22:17:38 UTC
*** Bug 167440 has been marked as a duplicate of this bug. ***