Suboptimal defaults in dovecot.conf

Bug #146648 reported by Ante Karamatić
4
Affects Status Importance Assigned to Milestone
dovecot (Ubuntu)
Fix Released
Medium
Mathias Gug

Bug Description

Binary package hint: dovecot

In gutsy, default dovecot.conf comes with:

protocols =

which breaks dovecot service - it won't start.

Protocols should be 'none' or commented out (as upstream does). In first case, no services will be started except dovecot-auth, otherwise only imap service will be started.

Revision history for this message
Mathias Gug (mathiaz) wrote :

Commenting the protocols option would break the situation where dovecot-imap is not installed.

Changed in dovecot:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Ante Karamatić (ivoks) wrote : Re: [Bug 146648] Re: Suboptimal defaults in dovecot.conf

Mathias Gug wrote:

> Commenting the protocols option would break the situation where dovecot-
> imap is not installed.

OK. Same happens with protocols = none. Ideal situation would be to
start services which are installed. Can we change dovecot.conf during
install of imapd|pop3d? This is already in imapd|pop3d.postinst:

#perl -pi.bak -e 'if (/^\s*protocols =/i) { s/$/ imap imaps/ unless
/imap/; };'\
# /etc/dovecot/dovecot.conf

Is this what

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=204213

is talking about?

Revision history for this message
Mathias Gug (mathiaz) wrote :

On Tue, Oct 02, 2007 at 11:08:33PM -0000, Ante Karamatić wrote:
> OK. Same happens with protocols = none. Ideal situation would be to
> start services which are installed. Can we change dovecot.conf during
> install of imapd|pop3d? This is already in imapd|pop3d.postinst:
>
> #perl -pi.bak -e 'if (/^\s*protocols =/i) { s/$/ imap imaps/ unless
> /imap/; };'\
> # /etc/dovecot/dovecot.conf
>
> Is this what
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=204213
>
> is talking about?
>

I think so. However care should be taken not to change a user setting.
If the user set protocols to none, the post-install script should not
reenable it when upgrading the dovecot package.

--
Mathias

Rick Clark (dendrobates)
Changed in dovecot:
assignee: nobody → mathiaz
Revision history for this message
Mathias Gug (mathiaz) wrote :

I've attached a patch that modifies the postinst scripts and adds postrm scripts to update dovecot.conf.

It should handle the situation where the user has disabled one protocol in dovecot.conf and a package upgrade should not re-enable it.

The only case where it won't work as expected is when dovecot-{imapd,pop3} has been removed but not purged. A reinstall of the package won't re-enable the protocols in dovecot.conf.

Revision history for this message
Soren Hansen (soren) wrote :

dovecot (1:1.0.5-1ubuntu1) gutsy; urgency=low

  [Mathias Gug]
  * Merge with Debian (LP: #149049); remaining changes:
    - Use Snakeoil SSL certificate by default.
      + debian/control: Depend on ssl-cert
      + debian/patches/ssl-cert-snakeoil.dpatch: Change default SSL cert paths
        to snakeoil.
      + debian/dovecot-common.postinst: Relax grep for SSL_* a bit.
    - Fast TearDown:
      + debian/rules: Call dh_installinit in 'multiuser' mode.
      + debian/control: Depend on newer sysv-rc for this.
      + debian/dovecot-common.postinst: Remove stop script symlinks from rc0
        and rc6 on upgrades. Needs to be kept until next LTS release.
    - Add autopkgtest in debian/tests/.

  [Soren Hansen]
  * Based on work by Mathias Gug: Enable imap/pop3 protocols when installing
    dovecot-imap/dovecot-pop3 package (LP: #146648):
    - debian/dovecot-pop3d.postinst, debian/dovecot-imapd.postinst: add
      imap,imaps/pop3,pop3s to protocols line in dovecot.conf (removing "none"
      if it's there).
    - debian/dovecot-pop3d.postrm, debian/dovecot-imapd.postrm: remove
      imap,imaps/pop3,pop3s from protocols line in dovecot.conf (putting
      "none" if last protocol is removed).
  * debian/patches/exec_check_for_none.dpatch:
    - Disable access(..., X_OK) check for protocols that are not going to be
      started anyway.
  * debian/patches/protocols_none_by_default.dpatch:
    - Set "protocols = none" by default.

 -- Soren Hansen <email address hidden> Mon, 08 Oct 2007 15:05:46 +0200

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.