Samba depends on mailutils/mailx

Bug #32987 reported by Jonathan Roes
6
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Fix Released
Medium
Adam Conrad

Bug Description

After having trouble with a bug similar to 28021, I found that I wasn't even getting an error report mailed to me because the "mail" binary did not exist.

Apparently, line 51 of /usr/share/samba/panic-action in samba 3.0.21b-1ubuntu2 uses the "mail" binary, but the mailutils package was not installed as a dependency beforehand. This is executed after samba segfaults on startup. This bug report, however, is not for the samba segfault, just the dependency. I will keep segfault correspondence on 28021.

Output:

      jroes@shazbot:~$ /etc/init.d/samba start
       * Starting Samba daemons... /usr/share/samba/panic-action: line 51: mail: command not found
      /usr/share/samba/panic-action: line 20: echo: write error: Broken pipe
      /usr/share/samba/panic-action: line 21: echo: write error: Broken pipe
      /usr/share/samba/panic-action: line 22: echo: write error: Broken pipe
      /usr/share/samba/panic-action: line 41: echo: write error: Broken pipe
      /usr/share/samba/panic-action: line 42: echo: write error: Broken pipe
      /usr/share/samba/panic-action: line 43: echo: write error: Broken pipe
      /usr/share/samba/panic-action: line 44: echo: write error: Broken pipe
      /usr/share/samba/panic-action: line 45: echo: write error: Broken pipe
      /usr/share/samba/panic-action: line 46: echo: write error: Broken pipe
      /usr/share/samba/panic-action: line 47: echo: write error: Broken pipe
      /usr/share/samba/panic-action: line 48: echo: write error: Broken pipe
      /usr/share/samba/panic-action: line 49: echo: write error: Broken pipe
      /etc/init.d/samba: line 24: 7221 Aborted start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/smbd -- -D
                                                                               [fail]

Revision history for this message
Jonathan Roes (jroes) wrote :

Simply installing the mailutils package still has its problems:

jroes@shazbot:~$ sudo apt-get install mailutils
-- snip --

Setting up mailutils (0.6.90-3) ...

-- snip --

jroes@shazbot:~$ mail
No mail for jroes
jroes@shazbot:~$ /etc/init.d/samba start
 * Starting Samba daemons... sh: sendmail:/usr/sbin/sendmail: No such file or directory
/etc/init.d/samba: line 24: 8878 Aborted start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/smbd -- -D
                                                                                                                                    [fail]

Revision history for this message
Patrice Vetsel (vetsel-patrice) wrote :

I think that we had to suggest a package providing /usr/sbin/sendmail to the samba package.

Changed in samba:
assignee: nobody → adconrad
status: Unconfirmed → Confirmed
Revision history for this message
Adam Conrad (adconrad) wrote :

There are three bugs in one here.

1) mailutils doesn't depend on an MTA, like mailx does (the maintainer is aware, I'll poke him about it again)
2) The samba panic action script is entirely too verbose about failing when it can't execute mailx.
3) Some people think it should never fail, cause all samba installations should have an MTA.

I don't hold with (3), since the panic-action thing is a tiny piece of "functionality" (I hesitate to call it that, even, since it only gets executed if the package is dysfunctional), and it doesn't HURT if the panic info never gets mailed.

That said, I'll put some effort into (2), both in Debian and Ubuntu, to just make the panic-action stop being so verbose about failing if mailx isn't around. It's not the end of the world if it isn't, afterall, and I personally don't believe that every samba fileserver MUST have an MTA installed.

Revision history for this message
Adam Conrad (adconrad) wrote :

Fixed in samba_3.0.22-1ubuntu1

Changed in samba:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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