qmil-run sets up the wrong symbolic links so qmail won't start

Bug #1929293 reported by Jon Thackray
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

From a fresh installation of qmail I find

jon@frobenius:/etc/qmail/qmail-send$ ls -l supervise
lrwxrwxrwx 1 root root 29 May 21 20:17 supervise -> /var/lib/supervise/qmail-send

jon@frobenius:/etc/qmail/qmail-send$ ls -l /var/lib/qmail/supervise/
total 12
lrwxrwxrwx 1 root root 21 Mar 3 2015 qmail-send -> /etc/qmail/qmail-send
drwx------ 2 root root 4096 May 22 12:23 qmail-send.log
lrwxrwxrwx 1 root root 22 Mar 3 2015 qmail-smtpd -> /etc/qmail/qmail-smtpd
drwx------ 2 root root 4096 May 22 12:23 qmail-smtpd.log
lrwxrwxrwx 1 root root 23 Mar 3 2015 qmail-verify -> /etc/qmail/qmail-verify
drwx------ 2 root root 4096 May 22 12:23 qmail-verify.log

jon@frobenius:/var/lib$ sudo qmailctl start
Starting qmail
qmail-send supervise not running
qmail-smtpd supervise not running
qmail-verify supervise not running
jon@frobenius:/var/lib$ sudo qmailctl stat
/etc/service/qmail-send: unable to open supervise/ok: file does not exist
/etc/service/qmail-send/log: unable to open supervise/ok: file does not exist
/etc/service/qmail-smtpd: unable to open supervise/ok: file does not exist
/etc/service/qmail-smtpd/log: unable to open supervise/ok: file does not exist
/etc/service/qmail-verify: unable to open supervise/ok: file does not exist
/etc/service/qmail-verify/log: unable to open supervise/ok: file does not exist
messages in queue: 0
messages in queue but not yet preprocessed: 0

The problem occurs because the files supervise all point to a non-existent directory /var/lib/supervise. The correct directory is /var/lib/qmail/supervise This can be overcome with

jon@frobenius:/var/lib$ sudo ln -s qmail/supervise supervise
jon@frobenius:/var/lib$ sudo qmailctl start
Starting qmail
jon@frobenius:/var/lib$ sudo qmailctl stat
/etc/service/qmail-send: up (pid 57710) 3 seconds
/etc/service/qmail-send/log: up (pid 57722) 3 seconds
/etc/service/qmail-smtpd: up (pid 57713) 3 seconds
/etc/service/qmail-smtpd/log: up (pid 57721) 3 seconds
/etc/service/qmail-verify: up (pid 57720) 3 seconds
/etc/service/qmail-verify/log: up (pid 57723) 3 seconds
messages in queue: 0
messages in queue but not yet preprocessed: 0

But, I believe the correct fix is to create the correct links from the subdirectories of /etc/qmail

jon@frobenius:/var/lib$ lsb_release -rd
Description: Ubuntu 20.04.2 LTS
Release: 20.04

jon@frobenius:/var/lib$ apt-cache policy qmail-run
qmail-run:
  Installed: 2.0.2+nmu1
  Candidate: 2.0.2+nmu1
  Version table:
 *** 2.0.2+nmu1 500
        500 http://gb.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        500 http://gb.archive.ubuntu.com/ubuntu focal/universe i386 Packages
        100 /var/lib/dpkg/status

I expected qmail to start, and qmailctl stat to show me it running. Instead I got the error messages above

Revision history for this message
Jon Thackray (jgt) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubiquity (Ubuntu):
status: New → Confirmed
Revision history for this message
amk (9-launchpad-mikus-sk) wrote (last edit ):

See comment of August 26, 2019 at 12:13 pm at https://ryan.buterbaugh.org/better-qmail-on-ubuntu/ by Ryan Buterbaugh:

I believe this is a bug with runit – the /var/lib/supervise directory is no longer being created as part of the package install. There are two options here:

    Install daemontools-run instead (prior to installing qmail), since it’s an alternative supervisor for qmail and appears to be working properly
    Create the /var/lib/supervise directory manually (prior to installing qmail)

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.