mdadm installs postfix

Bug #379882 reported by Dozch
62
This bug affects 11 people
Affects Status Importance Assigned to Milestone
mdadm (Ubuntu)
Opinion
Medium
Unassigned

Bug Description

Binary package hint: mdadm

When upgrading to Jaunty from Intrepid, the mdadm package installed postfix. I can't see why a package that manage software RAID partitions needs a mail transport agent, but what is worse is that my desktop machine is suddenly turned into a mail server. One of the reasons Ubuntu desktop is deemed secure is that it does not run unnecessary services.

The dependency has been introduced in version 2.6.7.1-1ubuntu5; from the changelog:

mdadm (2.6.7.1-1ubuntu5) jaunty; urgency=low

  * Depend on postfix | mail-transport-agent, to ensure we get the
    correct default MTA for Ubuntu.

During the upgrade the postfix configuration was run and although I ticked not to configure, the postfix service was running by default anyway.

I manually uninstalled postfix and mdadm runs perfectly fine. Can this dependency be removed?

--

-> mdadm should by default only install with a small local mail delivery system (like esmtp + procmail) but not postfix on desktops, laptops etc.! On servers postfix is pulled in by server tasks anyway.

Here is how to setup esmtp+procmail:
apt-get install esmtp procmail
echo mda=\'/usr/bin/formail -a \"Date: \`date -R\`\" \| /usr/bin/procmail -d %T\' >> /etc/esmtprc
(as documented in /usr/share/doc/esmtp/README)

visibility: private → public
security vulnerability: yes → no
Revision history for this message
causticsoda (glenn-thomasfamily) wrote :

Agree, I had to manually remove postfix, and set up msmtp-mta instead.

I prefer the approach Debian takes which has "mail-transport-agent" as a "recommends" dependency.

I don't know exactly how Debian works, but I presume it presents the user with the option to install various MTA's or not install one at all.

Revision history for this message
ceg (ceg) wrote :

The monitoring facility of mdadm is very important to get notice if somthing goes wrong with your raid.

So you can replace disks etc. ahead of a total failure.

To send out notifications mdadm needs a sendmail command (MTA mail transport agent ).

To deliver mail localy you need a mail delivery agent (MDA)

Things like exim, postfix open network ports and are large and not easy to configure, but of course provide the sendmail command and delivery.

If none of the large MTAs is installed, yes mdadm should pull in a replacement like esmtp + procmail but no postfix on desktops.

Revision history for this message
ceg (ceg) wrote :

Bug #535417: mdadm monitor feature broken, not depending on local MTA/MDA or using wall/notify-send

Changed in mdadm (Ubuntu):
status: New → Fix Released
Revision history for this message
ceg (ceg) wrote :

causticsoda: what release were you using?

Changed in mdadm (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
ceg (ceg) wrote :

Current mdadm in 9.10 has "recommends": postfix | mail-transport-agent.

My installation did not pull in an MTA. Did you use synaptic that treats "recommends" as "requires"?

Changed in mdadm (Ubuntu):
status: Confirmed → Fix Released
ceg (ceg)
Changed in mdadm (Ubuntu):
status: Fix Released → Confirmed
status: Confirmed → Incomplete
status: Incomplete → Confirmed
Revision history for this message
causticsoda (glenn-thomasfamily) wrote :

ceg: I am using 9.10

Revision history for this message
ceg (ceg) wrote :

Ok, so you used synaptic to install mdadm later on (it did not come with the initial install from alternate CD), right?

Revision history for this message
ceg (ceg) wrote :

Ah, sorry I over-read you updated.

description: updated
Revision history for this message
Mathieu Mitchell (mat128) wrote :

The "recommended" automatically installs postfix in a preseeded "alternate cd" installation (or netboot installer) where you have software raid (mdadm gets installed, and recommends are automatically installed).

Revision history for this message
ceg (ceg) wrote :

Mathieu what version did you use, and what did you preseed? I used plain 9.10 alternate to install on raid and it did not install postfix with mdadm, but synaptic would pull it in if it's installed later.

Revision history for this message
Mathieu Mitchell (mat128) wrote :

Sorry I should have been clearer, I used lucid's latest netboot, with the preseed file I attached.

Revision history for this message
Mathieu Mitchell (mat128) wrote :

Excerpt of installer's syslog with debconf debugging turned on:

Apr 15 17:15:31 in-target: debconf (developer): starting /usr/bin/debconf-apt-progress --no-progress --logstderr -- apt-get -q -y --no-remove install mdadm
Apr 15 17:15:31 in-target: debconf (developer): <-- GET debconf/priority
Apr 15 17:15:31 in-target: debconf (developer): --> 0 high
Apr 15 17:15:31 in-target: Reading package lists...
Apr 15 17:15:32 in-target:
Apr 15 17:15:32 in-target: Building dependency tree...
Apr 15 17:15:32 in-target:
Apr 15 17:15:32 in-target: Reading state information...
Apr 15 17:15:32 in-target:
Apr 15 17:15:32 in-target: The following extra packages will be installed:
Apr 15 17:15:32 in-target: postfix ssl-cert
Apr 15 17:15:32 in-target: Suggested packages:
Apr 15 17:15:32 in-target: procmail postfix-mysql postfix-pgsql postfix-ldap postfix-pcre sasl2-bin
Apr 15 17:15:32 in-target: resolvconf postfix-cdb mail-reader ufw
Apr 15 17:15:32 in-target: The following NEW packages will be installed:
Apr 15 17:15:32 in-target: mdadm postfix ssl-cert

Revision history for this message
jlms (jjllmmss) wrote :

Guys, this is ludicrous. I just installed Ubuntu 10.10 and grabbed mdadm and to my surprise postfix was forced upon me.

Notification of system problems is done by a syslog facility, and in the syslog facility you can configure email alerts if so you wish, then you can also send the alerts to a central log server for secure safeguarding.

This dependency on postfix should not even be suggested. There should be no dependency at all. Allowing this is a security issue, who downgraded this above is completely and utterly mistaken.

This gives Linux and Ubuntu a bad name, can this please , please, please be sorted.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Hello and thank you to everyone who reported and commented on this issue.

The package maintainers have chosen to recommend an MTA for a very good reason. By default, mdadm sends problems to the local user, 'root'. If you haven't setup an MTA, root is just going to be ignored and problems will be missed. You are quite welcome to remove postfix, or to ask synaptic/aptitude/apt-get not to install "Recommends". When mdadm is installed from the CD during install or upgrade, it does not pull in any MTA, only when it is manually added later. I know that this is somewhat confusing, but postfix and other MTA's can be configured very easily during installation not to listen on any ports or expose your system to any danger, so its not a security issue either.

I am going to flag this one as Opinion. It seems there are some strong feelings here and its worth hearing more before closing the bug. However, I think the current situation is fine and should not be changed.

Changed in mdadm (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Opinion
Revision history for this message
Mathieu Mitchell (mat128) wrote :

> When mdadm is installed from the CD during install or upgrade, it does not pull in any MTA, only when it is manually added later.

I have to disagree with you there. If I install mdadm during the installation postfix gets pulled in. I can easily reproduce it (see my earlier post).
However, if the behavior would be "install postfix if manually installed", that would be great for all cases I guess.

Revision history for this message
Clint Byrum (clint-fewbar) wrote : Re: [Bug 379882] Re: mdadm installs postfix

Excerpts from Mathieu Mitchell's message of Wed Apr 27 02:07:36 UTC 2011:
> > When mdadm is installed from the CD during install or upgrade, it does
> not pull in any MTA, only when it is manually added later.
>
> I have to disagree with you there. If I install mdadm during the installation postfix gets pulled in. I can easily reproduce it (see my earlier post).
> However, if the behavior would be "install postfix if manually installed", that would be great for all cases I guess.

I should be more clear. When mdadm is installed to support software
RAID configured during installation, it does not pull in postfix. If
it is manually selected then it will still install with the recommended
packages.

Revision history for this message
Ray Link (rlink) wrote :

Even if an actual MTA is added to the d-i pkgsel/include debconf question in the installer preseed file, setting up software RAID in the installer will cause postfix to be installed, prompting the user for configuration information, and then postfix will silently be replaced with the MTA requested by the preseed file.

The whole point of preseeding is to automate stuff. If an MTA has already been selected and its configuration preseeded by the person who built the custom installer, then installing a different MTA, interrupting the person performing the install to ask them unexpected questions whose answers are going to be discarded, and then uninstalling the spurious MTA seems pretty sub-optimal.

Revision history for this message
Matthew O'Riordan (matthew-oriordan) wrote :

You can tell mdadm not to install postfix by simply passing in the --no-install-recommends param, such as
`sudo apt-get install mdadm --no-install-recommends`

In my setup, I used msmtp, symlinked it `ln -s /usr/bin/msmtp /usr/sbin/sendmail`, and mdadm now sends mail through this lightweight email sender.

Revision history for this message
Colan Schwartz (colan) wrote :

@Matthew: If you installed msmtp-mta, you wouldn't need the symlink. ;)

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.