[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#887064: marked as done ([sendmail] persistent queue runners in split daemon mode missed by /etc/init.d/sendmail)



Your message dated Thu, 09 Jul 2020 18:32:26 +0000
with message-id <E1jtbLO-000BHS-5a@fasolo.debian.org>
and subject line Bug#887064: fixed in sendmail 8.15.2-8+deb9u1
has caused the Debian Bug report #887064,
regarding [sendmail] persistent queue runners in split daemon mode missed by /etc/init.d/sendmail
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
887064: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=887064
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: sendmail-bin
Version: 8.15.2-8
Tags: patch

When sendmail is configured with persistent queue runners *and* the
queue runner control process is separate from the main MTA daemon,
/etc/init.d/sendmail fails to find the queue runner control process and
deletes the pid file after startup.  This results in the queue runners
not being terminated at shutdown or restart.


Here's how to reproduce this behaviour:

Activate persistent queue runners e.g. by setting
	QUEUE_INTERVAL="p1m";
in /etc/mail/sendmail.conf

Make sure that "split daemon" mode is active, i.e. that the MTA listener
daemon is a separate process from queue runner control (otherwise the
bug does not show).  Among other situations, this is the case when
QUEUE_PARMS is different from DAEMON_PARMS.  For debugging purposes,
just set some option such as
	QUEUE_PARMS="-O QueueFactor=600000";
in /etc/mail/sendmail.conf

Run sendmailconfig; /etc/init.d/sendmail restart

At this point, the MTA listener daemon and queue control
pids should be recorded in /run/sendmail/mta/sendmail.pid and
/run/sendmail/mta/queue.pid, respectively.  However, /etc/init.d/sendmail
has checked for the queue control process after startup, was unable to
find it, and has deleted /run/sendmail/mta/queue.pid.

Run /etc/init.d/sendmail stop

At this point, there should be no more sendmail processes; in fact,
both the queue runner control process and all configured queue runners
are still present.


I believe the problem results from Debian calling the sendmail binary
as "sendmail-mta" while /etc/init.d/sendmail checks for a process with
an executable called "sendmail".  Patching /etc/init.d/sendmail to
check for sendmail-mta in this particular case (split-daemon mode and
persistent queue runners) seems to fix the problem for me.  Other ps
invocations in /etc/init.d/sendmail do not select by binary names and
are thus not affected.

Here's a patch:

--- etc/init.d/sendmail.orig	2016-12-08 17:43:49.000000000 +0000
+++ etc/init.d/sendmail	2018-01-13 08:06:45.350670214 +0000
@@ -289,7 +289,7 @@
 		if [ -z "$qp" ]; then
 			chmod 0664 $MTAQ_PIDFILE;
 		else
-			qc=`ps --no-headers -fCsendmail \
+			qc=`ps --no-headers -fCsendmail-mta \
 				| egrep -e 'Queue control' \
 				| awk '{print $2}'`;
 			if [ -z "$qc" ]; then

--- End Message ---
--- Begin Message ---
Source: sendmail
Source-Version: 8.15.2-8+deb9u1
Done: Andreas Beckmann <anbe@debian.org>

We believe that the bug you reported is fixed in the latest version of
sendmail, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 887064@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Andreas Beckmann <anbe@debian.org> (supplier of updated sendmail package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sun, 25 Aug 2019 20:07:11 +0200
Source: sendmail
Binary: sendmail-bin rmail sensible-mda libmilter1.0.1 libmilter-dev sendmail-doc sendmail sendmail-base sendmail-cf
Architecture: source
Version: 8.15.2-8+deb9u1
Distribution: stretch
Urgency: medium
Maintainer: Debian QA Group <packages@qa.debian.org>
Changed-By: Andreas Beckmann <anbe@debian.org>
Description:
 libmilter-dev - Sendmail Mail Filter API (Milter) (development files)
 libmilter1.0.1 - Sendmail Mail Filter API (Milter)
 rmail      - MTA->UUCP remote mail handler
 sendmail   - powerful, efficient, and scalable Mail Transport Agent (metapacka
 sendmail-base - powerful, efficient, and scalable Mail Transport Agent (arch inde
 sendmail-bin - powerful, efficient, and scalable Mail Transport Agent
 sendmail-cf - powerful, efficient, and scalable Mail Transport Agent (config ma
 sendmail-doc - powerful, efficient, and scalable Mail Transport Agent (documenta
 sensible-mda - Mail Delivery Agent wrapper
Closes: 863567 873978 887064 893424 894535
Changes:
 sendmail (8.15.2-8+deb9u1) stretch; urgency=medium
 .
   * QA upload.
   * rmail: Add exim4 to the list of conflicting MTAs.  (Closes: #863567)
   * Skip hook execution if /usr/share/sendmail/dynamic does not exist.
     (Closes: #873978)
   * debian/examples/network/if-post-down.d/sendmail: Generate during build.
   * connect-from-null.patch: New, fix "NOQUEUE: connect from (null)", thanks
     to Michael Grant and Claus Assmann.
   * Fix finding the queue runner control process in "split daemon" mode,
     thanks to Marc Andre Selig.  (Closes: #887064)
   * Fix prerm failure on btrfs.  (Closes: #893424)
   * Switch Vcs-* URLs to salsa.debian.org.
   * Fix typos in descriptions.  (Closes: #894535)
   * sendmail-bin.prerm: Stop sendmail before removing the alternatives.
Checksums-Sha1:
 75284ae33b217bb4dfa92b4fea0df445231ac28d 2561 sendmail_8.15.2-8+deb9u1.dsc
 e7485d43f311b18a40caab5ae6b7a6c9bd88c097 407432 sendmail_8.15.2-8+deb9u1.debian.tar.xz
 fd7405279fb1fdb45db5e1d21a8586c131c97af5 6528 sendmail_8.15.2-8+deb9u1_source.buildinfo
Checksums-Sha256:
 5fd23723c263b9319f0d4343ad5b1b540f51ca15c778a9a5e7c1add63a1296eb 2561 sendmail_8.15.2-8+deb9u1.dsc
 05a88a7ec27566be71b493c576e93018f3004ef36d766b545fb05d27b5264471 407432 sendmail_8.15.2-8+deb9u1.debian.tar.xz
 cd941313c5805966bae94dfcd8d479a622c6b205f94f17fa903f30f15356ccbe 6528 sendmail_8.15.2-8+deb9u1_source.buildinfo
Files:
 f86d1916ac4ccea2792f4dbf2691c447 2561 mail extra sendmail_8.15.2-8+deb9u1.dsc
 498fb31428ca2adefd5eb51510419950 407432 mail extra sendmail_8.15.2-8+deb9u1.debian.tar.xz
 4fc0bd65e7251ea5fc5b7114f4f741b0 6528 mail extra sendmail_8.15.2-8+deb9u1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJEBAEBCAAuFiEE6/MKMKjZxjvaRMaUX7M/k1np7QgFAl8DMSUQHGFuYmVAZGVi
aWFuLm9yZwAKCRBfsz+TWentCL+nD/9662kywkfDi+ICEIvqnTqlM9ySSJRPIPIX
ibDM8qDkzit4O2U0ZtermmFHsOBYN+y/Mz57A4gWiQhXmS69+TTQztQYRqJcWTaL
GISR/3AW6NGnQCyNAf7UuJ3hW2qhRxhKWVJouEQ3HSXqSFFx2/HRLWrEdI/ihi2F
DAQhCKYN64GDT4YUDpTdOehCHetvK1omXJCLsDhieJ3bui3dyWEU/kVlM27M577l
qpTtXc2d2Az/lvhuigX5MQqGN7Ev4xobnPHMXynIVOLRr7CdifFJyVCR1gNK7adX
62TmqABHu7q86s1OP5CMT6wx82cHnQ6Waijge+2U6T96mGnr3mETsii3C5kSS/Kk
R6ITEoPNz1okq/ogVXPLcdnfKAQX1pydn/I1UWgnDSQ7dp6o2b/e7dtQbQGMF9/p
LR/4mooG3YZcOmXSaIFvnYzffZEVzVIUOYNQIatusjCXgmwOJaTBdS322oeWM0Dk
N8AgcFx/4hZFwHPQx5ab2kdV1DaRJAYaTDugpfaVdal6iNelNlapDAFe0AYlOPPP
8ew2FN7CYi3mtgLCmUmWRb9LzICVfU/qpqkUvQ0jFjHTD+d87s55lZm6R6rhXqma
3tKs7ogE14uiSf6AFk5jJNnFcJnftiAR+Dk4MBxcgIcfq85621ZhIahYJ/Cz+s6e
x+aBz1MQ7g==
=bu4G
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: