[lsb-discuss] Possible to get rid of /usr/bin/sendmail requirement in LSB 4.1?

Theodore Tso tytso at mit.edu
Fri Jun 12 13:58:30 PDT 2009


On Fri, Jun 12, 2009 at 09:14:17PM +0200, Martin Pitt wrote:
> I'm not saying that I know the desktop market better than you, but I
> don't think that claiming "desktop users want to use email through a
> local MTA" is an obvious and unanimous assumption. 
> 
> Thunderbird, claws, kmail, evolution, android, and even Outlook all
> ask for your SMTP server and use that. They have to, because in order
> to use SMTP these days you need to authenticate to the server. This
> makes it impossible to do this as a system wide setting if you have
> more than one user on a machine.

This is a fair point, I agree.

> So let's ask it the other way round. How would you like to see this
> done by default? What setup would match your expectation as well as
> the LSB idea, and avoid interactive questions on installation which
> are irrelevant to users anyway (such as configuring postfix or ssmtp?)

Well, let's take this from first principles.  The reason why LSB
requires an executable named "sendmail" to exist at a certain
well-defined location is because there are a number of programs want
to be able to send e-mail, and historically, /usr/lib/sendmail --- and
now /usr/sbin/sendmail --- was the standardized interface.  It didn't
matter which MTA was in use, they all provided "sendmail" as that
interface.

Why do programs want to send e-mail?  They might want to send periodic
log results to the system administrator; there might be exceptional
reason that requires notification, perhaps while the user isn't logged
in (for example, "S.M.A.R.T. has detected a disk which has started
failing").

I'll point out that the current scheme where each program has to ask
for an SMTP server is lame; what if you are using evolution, and you
decide you want to change to Thuderbird --- wouldn't it be better if
there was a single, shared registry where this information could be
kept?  Also, if a program need to send an e-mail, does it really need
to fire up bloatware such as evolution just to send mail?  Why is it
that we don't have a single back-end MTA that is responsible for
sending mail, and if authenticated SMTP is needed, that the logged in
user temporarily passes the necessary authentication to said back-end
MTA, which takes care of sending the e-mail out?

So I can imagine schemes where for the desktop user, if it can only
send e-mail after doing the SMTP authentication dance, that e-mail
that is sent while the user is not logged in must be queued until the
user has logged in.  (Let's assume for the sake of argument that the
user is unwilling to store their SMTP authentication information in an
unencrypted location for use by system daemons, and is willing to make
the tradeoff that e-mail can't be sent while the user is not logged
in.)  So we could create a mail agent which accepts the mail using the
standard /usr/sbin/sendmail interface, and if it can't send it right
away, queues it in a queue directory, so when the user logs in, the
e-mail can be sent.

I'm not saying that this is the only way to design things --- just
that the current system where you have to load tens of megabytes of
bloatware and shared library just to send e-mail on a desktop system
is arguably broken.  And it's really not the LSB's place to dictate to
distributions *how* to do this right, but I think it's pretty clear
there are plenty of options that would allow the system to Do The
Right Thing --- and what might work well on a Linux-on-a-cell-phone
might be quite different from Linux-on-a-netbook or
Linux-on-an-enterprise-server.

Regards,

						- Ted


More information about the lsb-discuss mailing list