52

I was trying to install sendmail but it is hanging while trying to generate ssl certificates. I have canceled the installation process and later killed processes that was locking any new packages from installing.

But whenever I run apt-get install <package_name> it goes back to the sendmail installation and trys to install the ssl certs.

I have rebooted the system but problem is persisted.

How do I resolve this?

CLI Information

sudo dpkg --configure -a
Setting up sendmail-bin (8.15.2-3) ...
Updating sendmail environment ...
Reading configuration from /etc/mail/sendmail.conf.
Validating configuration.
Writing configuration to /etc/mail/sendmail.conf.
Writing /etc/cron.d/sendmail.
Disabling HOST statistics file(/var/lib/sendmail/host_status).
Reading configuration from /etc/mail/sendmail.conf.
Validating configuration.
Writing configuration to /etc/mail/sendmail.conf.
Writing /etc/cron.d/sendmail.
Could not open /etc/mail/databases(No such file or directory), creating it.
Reading configuration from /etc/mail/sendmail.conf.
Validating configuration.
Creating /etc/mail/databases...

Checking filesystem, this may take some time - it will not hang!
  ...   Done.

Checking for installed MDAs...
sasl2-bin not installed, not configuring sendmail support.

To enable sendmail SASL2 support at a later date, invoke "/usr/share/sendmail/update_auth"


Creating/Updating SSL(for TLS) information
Creating /etc/mail/tls/starttls.m4...
Creating SSL certificates for sendmail.

A similar problem can be found here but there wasn't a solution. OP just changed the OS.

Sisir
  • 657
  • 1
  • 6
  • 9
  • Hey, supporting information (I just experienced this) The sendmail installer script is providing the wrong arguments to openssl. Specifically this line is waiting for data from STDIN which the script is not supplying, and the -in parameter hasn't been provided. openssl dsaparam 2048 -out. I am not sure of the solution. Maybe submit a bug to the sendmail package maintainer? – Jotham Jul 20 '17 at 00:47
  • How do I get in touch with maintainer. I need to at least resolve this issue. I cam stuck more then 1 day now. I can't install other packages as well. – Sisir Jul 20 '17 at 06:05

1 Answers1

120

I just experienced this problem also. It appears to hang on line 240 of this script /usr/share/sendmail/update_tls.

To solve the problem, I executed the following commands:

cd /etc/mail/tls
sudo openssl dsaparam -out sendmail-common.prm 2048
sudo chown root:smmsp sendmail-common.prm
sudo chmod 0640 sendmail-common.prm
sudo dpkg --configure -a

It should now install.

Simon
  • 1,326
  • 1
  • 9
  • 4