package sendmail-bin 8.15.2-12 failed to install/upgrade: installed sendmail-bin package post-installation script subprocess returned error exit status 2

Bug #1822866 reported by Gerrit Cap
110
This bug affects 21 people
Affects Status Importance Assigned to Milestone
sendmail (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

while upgrading

ProblemType: Package
DistroRelease: Ubuntu 19.04
Package: sendmail-bin 8.15.2-12
ProcVersionSignature: Ubuntu 4.18.0-17.18-generic 4.18.20
Uname: Linux 4.18.0-17-generic x86_64
ApportVersion: 2.20.10-0ubuntu23
Architecture: amd64
Date: Tue Apr 2 20:45:45 2019
ErrorMessage: installed sendmail-bin package post-installation script subprocess returned error exit status 2
InstallationDate: Installed on 2017-11-12 (506 days ago)
InstallationMedia: Ubuntu-Server 17.10 "Artful Aardvark" - Release amd64 (20171017.1)
Python3Details: /usr/bin/python3.7, Python 3.7.3, python3-minimal, 3.7.2-1
PythonDetails: /usr/bin/python2.7, Python 2.7.16, python-minimal, 2.7.16-1
RelatedPackageVersions:
 dpkg 1.19.5ubuntu1
 apt 1.8.0
SourcePackage: sendmail
Title: package sendmail-bin 8.15.2-12 failed to install/upgrade: installed sendmail-bin package post-installation script subprocess returned error exit status 2
UpgradeStatus: Upgraded to disco on 2019-04-02 (0 days ago)

Revision history for this message
Gerrit Cap (gerrit-cap) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in sendmail (Ubuntu):
status: New → Confirmed
Revision history for this message
Domar (domar) wrote :

Happened for me when trying to upgrade from 18.10.
When trying to configure the sendmail paclage, exit status 2 is returned.
Tried with linux 5.0.0-13.

Revision history for this message
Scott (scmtt) wrote :

Looks to me like it's a problem with the init.d script. (See the attached "DpkgTerminalLog.txt" file:

start-stop-daemon: matching only on non-root pidfile /var/run/sendmail/mta/sendmail.pid is insecure

Some other packages had similar problems (exim, amavis_d), but I'm not clear on how to correct this problem (despite having tried several ways).

And I'm stuck. Cannot complete a reinstallation of sendmail, cannot remove or purge it either. I get the above message (matching...is insecure) every time.

Does someone have a workaround?

Revision history for this message
Mirko Strüßmann (mirko-struessmann) wrote :

My workaround was the following:

sudo su -
service sendmail stop
apt install -f

This worked for me. :)

Revision history for this message
Anthony Martin (telamont) wrote :

What worked for me was killing any running sendmail processes (stopping the service did not do this) and then updating worked with no noticeable issues.
The only thing I see is sm-mta warnings that "My unqualified host name (HOSTNAME) unknown", which for me is a non-issue since this box is on my home network with no domain.

Revision history for this message
C. Jeffery Small (loyhz2ay-jeff-h670zbts) wrote :
Download full text (4.1 KiB)

Just adding another voice to this thread. I had the same problem during the upgrade. The failure for sendmail-bin to properly configure caused the sensible-mta, dovecot-core and inn2 packages to all fail to properly update due to dependency problems. Thanks to Mirko above, who suggested a solution. Stopping the sendmail service and running "apt install -f" allowed the configuration to complete.

In case it is any help, here are the relevant log messages:

Messages from /var/log/dist-upgrade/main.log:

ERROR got an error from dpkg for pkg: 'sendmail-bin': 'installed sendmail-bin
    package post-installation script subprocess returned error exit status 2'
2019-07-07 22:44:50,515 DEBUG running apport_pkgfailure() sendmail-bin:
    installed sendmail-bin package post-installation script subprocess
    returned error exit status 2
2019-07-07 22:44:50,528 ERROR got an error from dpkg for pkg: 'sendmail-bin':
   'installed sendmail-bin package post-installation script subprocess
   returned error exit status 2'
2019-07-07 22:47:47,560 ERROR got an error from dpkg for pkg: 'sendmail':
    'dependency problems - leaving unconfigured'
2019-07-07 22:47:47,561 DEBUG running apport_pkgfailure() sendmail:
    dependency problems - leaving unconfigured
2019-07-07 22:47:47,561 DEBUG dpkg error because of dependency problems,
    not reporting against sendmail
2019-07-07 22:47:47,561 ERROR got an error from dpkg for pkg: 'sendmail':
    'dependency problems - leaving unconfigured'
2019-07-07 22:47:47,758 ERROR got an error from dpkg for pkg: 'sensible-mda':
    'dependency problems - leaving unconfigured'
2019-07-07 22:47:47,758 DEBUG running apport_pkgfailure() sensible-mda:
    dependency problems - leaving unconfigured
2019-07-07 22:47:47,759 DEBUG dpkg error because of dependency problems,
    not reporting against sensible-mda
2019-07-07 22:47:47,759 ERROR got an error from dpkg for pkg: 'sensible-mda':
    'dependency problems - leaving unconfigured'
2019-07-07 22:47:48,269 ERROR got an error from dpkg for pkg: 'inn2':
    'dependency problems - leaving unconfigured'
2019-07-07 22:47:48,270 DEBUG running apport_pkgfailure() inn2:
    dependency problems - leaving unconfigured
2019-07-07 22:47:48,270 DEBUG dpkg error because of dependency problems,
    not reporting against inn2
2019-07-07 22:47:48,270 ERROR got an error from dpkg for pkg: 'inn2':
    'dependency problems - leaving unconfigured'
2019-07-07 22:47:52,116 ERROR got an error from dpkg for pkg: 'dovecot-core':
    'triggers looping, abandoned'
2019-07-07 22:47:52,116 DEBUG running apport_pkgfailure() dovecot-core:
    triggers looping, abandoned
2019-07-07 22:47:52,132 ERROR got an error from dpkg for pkg: 'dovecot-core':
    'triggers looping, abandoned'
2019-07-07 22:51:47,341 ERROR Exception during pm.DoInstall()
Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-nggm0iiu/DistUpgrade/DistUpgradeView.py",
  line 220, in run res = pm.do_install(self.writefd)
apt_pkg.Error: E:Sub-process /usr/bin/dpkg returned an error code (1)
2019-07-07 22:51:47,369 ERROR SystemError from cache.commit():
    installArchives() failed
2019-07-07 22:51:47,370 ERROR found exception: ...

Read more...

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

This bug was fixed in the package sendmail - 8.15.2-13

---------------
sendmail (8.15.2-13) unstable; urgency=medium

  * QA upload.
  * initscript: Let start-stop-daemon match on pidfile and executable.
    (Closes: #932598, LP: #1822866)

 -- Andreas Beckmann <email address hidden> Tue, 30 Jul 2019 19:22:43 +0200

Changed in sendmail (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Martin (martin3000) wrote :

I had to remove /var/run/sendmail/mta/sendmail.pid then it worked.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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