Fix log reopen in >=2.2.33

Bug #1777008 reported by Michael Heuberger on 2018-06-14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dovecot (Ubuntu)

Bug Description


 * The version in Bionic fails to reopen the log which is needed for log

 * Fix by backporting a change from latter versions

[Test Case]

 * sudo apt install mail-stack-delivery
   # set log_path = /var/log/dovecot.log in 10-logging.conf:
   sudo vi /etc/dovecot/conf.d/10-logging.conf
   sudo systemctl restart dovecot

   In another terminal:
   sudo mv /var/log/dovecot.log /var/log/dovecot.log.1
   sudo doveadm log reopen

   Verify that /var/log/dovecot.log is *not* created. That shows the bug.

[Regression Potential]

 * log handling code is changed, so in theory this could affect log
   handling. But since only the code for sig_reopen_logs (which is broken
   without the fix) is changed we should be good.
   There also is a header change part of the upstream change, that could
   in theory affect log handling.

[Other Info]

 * n/a


Version 2.2 comes with lots of bugs, especially this nasty one

Would be good to bump to 2.3 for Bionic. Thanks!

Related branches

Hi Michael,
at the time we worked on the version for Bionic 2.3 was not ready yet.
See bug 1771524 for details if you want, but the above is the TL;DR.

Due to the SRu policy [1] and 2.3 being a rather bug jump from 2.2 it is imposing too much regression to pull all of 2.3 into Bionic.

For your issue though, one could consider evaluating and backporting [2].
It needs to be evaluated if it needs more than just the change, but if so would that adress your issue?

If so lets change the title to something like "fix log reopen"

The patch seems applicable, so further if one would provide a PPA would you be willing and able to test the PPA package if it fixed the issue or exposes other log related issues?


Changed in dovecot (Ubuntu):
status: New → Incomplete

Thanks for your input Christian. Agree in all points then. Tried to rename ticket title but server returned an error.

Hence doing nothing from here an leave it into your hands. Thanks heaps.

- Michael

summary: - Bump to v2.3 due to many bugs
+ Fix log reopen in >=2.2.33
Changed in dovecot (Ubuntu):
status: Incomplete → Confirmed
Changed in dovecot (Ubuntu Bionic):
status: New → Confirmed
tags: added: server-next
Changed in dovecot (Ubuntu):
status: Confirmed → Fix Released

There is a test build in [1] that I'd ask you to try before going forward.

It would also be great if you could assist by providing short steps to reproduce that we could use as test verification of the issue under the terms of [2], to fill the test section for the SRU template here.

The changes itself seem small enough, I opened a merge proposal for another community/team member to double check for silly mistakes [3]


description: updated
Changed in dovecot (Ubuntu Bionic):
status: Confirmed → Triaged

Hello Michael, or anyone else affected,

Accepted dovecot into bionic-proposed. The package will build now and be available at in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at . Thank you in advance!

Changed in dovecot (Ubuntu Bionic):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-bionic
Download full text (3.8 KiB)

root@b:~# vim /etc/dovecot/conf.d/10-logging.conf
root@b:~# sudo systemctl restart dovecot
root@b:~# sudo mv /var/log/dovecot.log /var/log/dovecot.log.1
root@b:~# sudo doveadm log reopen
root@b:~# ll /var/log/dovecot.log
ls: cannot access '/var/log/dovecot.log': No such file or directory

# apt install mail-stack-delivery
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
  dovecot-core dovecot-imapd dovecot-managesieved dovecot-pop3d dovecot-sieve
Suggested packages:
  dovecot-gssapi dovecot-ldap dovecot-lmtpd dovecot-mysql dovecot-pgsql dovecot-solr dovecot-sqlite ntp
The following packages will be upgraded:
  dovecot-core dovecot-imapd dovecot-managesieved dovecot-pop3d dovecot-sieve mail-stack-delivery
6 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.
Need to get 3289 kB of archives.
After this operation, 1024 B disk space will be freed.
Do you want to continue? [Y/n] Y
Get:1 bionic-proposed/main amd64 dovecot-managesieved amd64 1: [41.6 kB]
Get:2 bionic-proposed/main amd64 dovecot-sieve amd64 1: [311 kB]
Get:3 bionic-proposed/main amd64 dovecot-pop3d amd64 1: [32.3 kB]
Get:4 bionic-proposed/main amd64 dovecot-imapd amd64 1: [153 kB]
Get:5 bionic-proposed/main amd64 dovecot-core amd64 1: [2740 kB]
Get:6 bionic-proposed/main amd64 mail-stack-delivery all 1: [10.4 kB]
Fetched 3289 kB in 1s (2986 kB/s)
(Reading database ... 29440 files and directories currently installed.)
Preparing to unpack .../dovecot-managesieved_1%3a2.2.33.2-1ubuntu4.1_amd64.deb ...
Unpacking dovecot-managesieved (1: over (1: ...
Preparing to unpack .../dovecot-sieve_1%3a2.2.33.2-1ubuntu4.1_amd64.deb ...
Unpacking dovecot-sieve (1: over (1: ...
Preparing to unpack .../dovecot-pop3d_1%3a2.2.33.2-1ubuntu4.1_amd64.deb ...
Unpacking dovecot-pop3d (1: over (1: ...
Preparing to unpack .../dovecot-imapd_1%3a2.2.33.2-1ubuntu4.1_amd64.deb ...
Unpacking dovecot-imapd (1: over (1: ...
Preparing to unpack .../dovecot-core_1%3a2.2.33.2-1ubuntu4.1_amd64.deb ...
Unpacking dovecot-core (1: over (1: ...
Setting up dovecot-core (1: ...
(Reading database ... 29440 files and directories currently installed.)
Preparing to unpack .../mail-stack-delivery_1%3a2.2.33.2-1ubuntu4.1_all.deb ...
Unpacking mail-stack-delivery (1: over (1: ...
Processing triggers for ufw (0.35-5) ...
Processing triggers for ureadahead (0.100.0-20) ...
Setting up dovecot-sieve (1: ...


tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dovecot - 1:

dovecot (1: bionic; urgency=medium

  * d/p/lp1777008-log-Fix-log-reopening-on-SIGUSR1.patch: Fix log reopen on
    SIGUSR1 for log rotation (LP: #1777008)

 -- Christian Ehrhardt <email address hidden> Tue, 19 Jun 2018 08:03:41 +0200

Changed in dovecot (Ubuntu Bionic):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for dovecot has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers