Sendmail configuration issues after upgrading Debian
I've updated my instance from Debian 8 to the latest Stable release. Now, whenever I use apt, I get the following:
$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up sendmail-bin (8.15.2-12) ...
Saving old /etc/mail/sendmail.cf as /etc/mail/sendmail.cf.old ...
start-stop-daemon: matching only on non-root pidfile /var/run/sendmail/mta/sendmail.pid is insecure
dpkg: error processing package sendmail-bin (--configure):
installed sendmail-bin package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of sendmail:
sendmail depends on sendmail-bin; however:
Package sendmail-bin is not configured yet.
dpkg: error processing package sendmail (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of sensible-mda:
sensible-mda depends on sendmail-bin | mail-transport-agent; however:
Package sendmail-bin is not configured yet.
Package mail-transport-agent is not installed.
Package sendmail-bin which provides mail-transport-agent is not configured yet.
Package exim4-daemon-light which provides mail-transport-agent is not installed.
dpkg: error processing package sensible-mda (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of bsd-mailx:
bsd-mailx depends on default-mta | mail-transport-agent; however:
Package default-mta is not installed.
Package exim4-daemon-light which provides default-mta is not installed.
Package mail-transport-agent is not installed.
Package sendmail-bin which provides mail-transport-agent is not configured yet.
Package exim4-daemon-light which provides mail-transport-agent is not installed.
dpkg: error processing package bsd-mailx (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
sendmail-bin
sendmail
sensible-mda
bsd-mailx
E: Sub-process /usr/bin/dpkg returned an error code (1)
Is it just a matter of installing the missing packages? Or is there more to it? The 4 not fully installed or removed
is a bit odd to me, but I'm admittedly pretty new to running a server.
3 Replies
I found a forum post that offers some suggestions that might help to resolve this issue for you.
Essentially, you'll just want to kill the Sendmail service then force the updates through. The following commands should take you through that process.
sudo su -
service sendmail stop
apt install -f
I hope this helps!
Thanks.
Unfortunately, that didn't work
EDIT: actually, it may have worked… had to reboot my instance for another reason, forgetting that sendmail would start on boot. Turning off the service first, like in your solution, then forcing the installation seems to have done the trick. I no longer get dpkg errors when running apt anything.
Thanks!