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.

  • 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
    Commented Jul 20, 2017 at 0: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
    Commented Jul 20, 2017 at 6:05

1 Answer 1


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.

  • 18
    This worked, thanks. One side note: if dpkg is locked due to the hung install, you'll need to first to kill the update_sendmail pid. [ps -A | grep update_sendmail] before running dpkg --configure -a.
    – pragmar
    Commented Aug 28, 2017 at 19:01
  • 8
    After killing stuck dpkg processed and running dpkg --configure -a it now hangs on "Updating /etc/mail/aliases..." Commented Oct 1, 2017 at 19:23
  • 5
    oh wait, it actually now is fine. It just took a while to do it's things Commented Oct 1, 2017 at 19:23
  • 5
    Suitable for Ubuntu 14.04 also Commented Oct 7, 2017 at 21:59
  • 6
    I got this error :Warning: 3 database(s) sources were not found, (but were created) please investigate. should I be worried? Commented Mar 13, 2018 at 17:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .