Sendmail Issue: Infinite Loop

Hello,

I recently attempted to update Ubuntu to the latest release (13.10) and I ran into an issue with sendmail. During the update, I got an infinite loop with these three lines:

    Reading configuration from /etc/mail/sendmail.conf.
    Validating configuration.
    Creating /etc/mail/databases...

I was able to break the loop with Ctrl+C.

Now whenever I try "sudo apt-get install [package]", I get this message:

    E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

When I run "sudo dpkg –configure -a", I get the same infinite loop. Sometimes I'm able to break it with Ctrl+C, sometimes I have to restart the server.

This bug report seems to describe the issue:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=717951

The post above mentions a workaround, but I don't understand what to do.

Here's the output that I get before the loop happens:

Setting up sendmail-bin (8.14.4-2.1ubuntu5) ...
update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match sendmail Default-Stop values (1)
update-alternatives: warning: forcing reinstallation of alternative /usr/lib/sm.bin/sendmail because link group sendmail-msp is broken
update-alternatives: warning: not replacing /usr/share/man/man8/sendmail.8.gz with a link
 * Stopping Mail Transport Agent (MTA) sendmail                                             [ OK ] 
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...
You already have sendmail certificates

*** *** *** WARNING *** WARNING *** WARNING *** WARNING *** *** ***

Everything you need to support STARTTLS (encrypted mail transmission
and user authentication via certificates) is installed and configured
but is *NOT* being used.

To enable sendmail to use STARTTLS, you need to:
1) Add this line to /etc/mail/sendmail.mc and optionally
   to /etc/mail/submit.mc:
  include(`/etc/mail/tls/starttls.m4')dnl
2) Run sendmailconfig
3) Restart sendmail

Checking {sendmail,submit}.mc and related databases...
Reading configuration from /etc/mail/sendmail.conf.
Validating configuration.
Creating /etc/mail/databases...
[... the last three lines repeat indefinitely ...]

Thank you so much for your help.

Chris

1 Reply

@zara2stra:

The post above mentions a workaround, but I don't understand what to do.

There is a script named update_db in the package that needs to be modified to apply the workaround. Doing this yourself is not all that simple.

My suggestions would be:

1. Submit a bug report to Ubuntu, and point them to the Debian bug. Hopefully they would be able to publish a fix quickly.

2. If you don't have a specific reason to use sendmail, try another MTA such as postfix. It seems to be more popular (so you can expect bugs to be caught earlier) and is IMO easier to use than sendmail.

If you do want to fix the package with the workaround, you'll have to extract its contents, find the update_db file, and replace the lines

              str=$(echo "$line" | cut -d "
" -f 1);
              line=$(echo "$line" | cut -d "
" -f 2-);

with

              str=$(echo "$line" | head -n 1);
              line=$(echo "$line" | tail -n +2);

Then you'll have to re-assemble the package and install it. Since the modified package won't be signed by Ubuntu, you may have to do something special to force it to install.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct