fatal errors during install

Bug #360891 reported by Tavish Armstrong on 2009-04-14
8
Affects Status Importance Assigned to Milestone
dovecot (Ubuntu)
Medium
Unassigned

Bug Description

Binary package hint: dovecot-postfix

This was the terminal output (Ubuntu Jaunty 9.04 32bit):

----------------------------------------------------------------------
Setting up dovecot-postfix (1:1.1.11-0ubuntu3) ...

Creating config file /etc/dovecot/dovecot-postfix.conf with new version
 * Restarting IMAP/POP3 mail server dovecot Error: ssl_cert_file: Can't use /etc/ssl/certs/ssl-mail.pem: No such file or directory
Fatal: Invalid configuration in /etc/dovecot/dovecot-postfix.conf
                                                                         [fail]
postconf: fatal: open /etc/postfix/main.cf: No such file or directory
postconf: fatal: open /etc/postfix/main.cf for reading: No such file or directory
dpkg: error processing dovecot-postfix (--configure):
 subprocess post-installation script returned error exit status 1
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
 dovecot-postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)
-------------------------------------------------------------------------------------------

ProblemType: Package
Architecture: i386
DistroRelease: Ubuntu 9.04
ErrorMessage: subprocess post-installation script returned error exit status 1
Package: dovecot-postfix 1:1.1.11-0ubuntu3
PackageArchitecture: all
SourcePackage: dovecot
Title: package dovecot-postfix 1:1.1.11-0ubuntu3 failed to install/upgrade: subprocess post-installation script returned error exit status 1
Uname: Linux 2.6.28-11-generic i686

Ante Karamatić (ivoks) wrote :

There are two problems in this bug. First one is an easy one (I attached a patch for dovecot for it) - dovecot-postfix postinst script should restart dovecot *after* the certificate links are created, not before.

The second one is about postfix - If you check out DpkgTerminaLog.gz, you'll notice:

Setting up postfix (2.5.5-1.1) ...

Adding group `postfix' (GID 124) ...

Done.

Adding system user `postfix' (UID 113) ...

Adding new user `postfix' (UID 113) with group `postfix' ...

Not creating home directory `/var/spool/postfix'.

Creating /etc/postfix/dynamicmaps.cf

Adding tcp map entry to /etc/postfix/dynamicmaps.cf

Adding group `postdrop' (GID 125) ...

Done.

/etc/aliases does not exist, creating it.

Postfix was not set up. Start with

  cp /usr/share/postfix/main.cf.debian /etc/postfix/main.cf

. If you need to make changes, edit

/etc/postfix/main.cf (and others) as needed. To view Postfix configuration

values, see postconf(1).

After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

I'm not sure why that happened.

Changed in dovecot (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Ante Karamatić (ivoks) wrote :

Ok, that happened cause user selected No configuration for postfix. dovecot-postfix should be aware of that situation and shouldn't just fail to install. This patch solves the issue.

Changed in dovecot (Ubuntu):
status: Confirmed → Fix Committed
Martin Pitt (pitti) wrote :

The patch looks a bit weird. Isn't the entire idea of dovecot-postfix to *not* require the user to configure postfix before? Shouldn't that (ideally) be handled as integral part of configuring d-p?

U Pet, 17. 04. 2009., u 13:24 +0000, Martin Pitt je napisao/la:

> The patch looks a bit weird. Isn't the entire idea of dovecot-postfix to
> *not* require the user to configure postfix before? Shouldn't that
> (ideally) be handled as integral part of configuring d-p?

At this point of development, no, dovecot-postfix can't know what type
of mail server user is setting up - is it a satelite system (with a
relay host) or stand alone mail server, or some special type of mail
server. We need user input on this, and postfix does a great job at that
- it offers couple of predefined use cases. dovecot-postfix just
integrates rest of the stuff (tls for all procotols, some postfix
security features, etc...).

This patch works around the problem when user doesn't choose any kind of
predefined configurations (when user selects 'No configuration'). In
that case, postfix package doesn't create main.cf file and
dovecot-postfix can't set up rest of the postfix variables. So, instead
of just exploding, with this patch, it offers the way out of the
situation.

Martin Pitt (pitti) wrote :

I see; what I actually meant was that installing dovecot-postfix would trigger the main postfix debconf bits, but if this is only for the "no configuration" case, it makes sense.

Martin Pitt (pitti) wrote :

Please note that using echo is not a good method. You should display a debconf note. But since this is a server thing, and it avoids package install failure, it looks like a less intrusive bandaid patch.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dovecot - 1:1.1.11-0ubuntu4

---------------
dovecot (1:1.1.11-0ubuntu4) jaunty; urgency=low

  * debian/dovecot-postfix.postinst (LP: #360891):
    - restart dovecot after linking certificates
    - handle use case when postfix is unconfigured
      + check if /etc/postfix/main.cf exist before runing postconf

 -- Ante Karamatic <email address hidden> Thu, 16 Apr 2009 15:17:45 +0200

Changed in dovecot (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers