This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ITP] Sendmail 8.14.9


On Aug 26 09:51, Pierre A. Humblet wrote:
> > -----Original Message-----
> > From:  Yaakov Selkowitz
> > Sent: Friday, August 22, 2014 17:40
> > 
> > On 2014-08-22 13:19, D. Boland wrote:
> > >> On Aug 22 07:43, D. Boland wrote:
> > >>> I re-packaged Sendmail with cygport. See:
> > >>>
> > >>> http://cygwin.boland.nl/x86/release/sendmail/
> > >>
> > >> Packaging looks good in theory.
> > >>
> > >> Unfortunately we have a problem.
> > >>
> > >> On inspection of your binary package I noticed that we have conflicts
> > >> with exim and ssmtp packages:
> > [snip]
> > >> What we'll have to do to fix this problem is to convert all three
> > >> packages to use alternatives.  The alternatives package exists and is
> > >> already used by a couple of other packages which would otherwise
> > >> conflict, so there's precendent.  And on Fedora, the various mail
> > >> packages all use alternatives, too, to install their packages in
> > >> parallel and conflict-free.
> > [snip]
> > >
> > 
> > > Why not let the user choose one program? Putting both Exim and
> > > Sendmail on one box is confusing, to say the least. Sendmail is very
> > > tough to understand. You don't want another (very similar looking) mail
> > exchanger to add to the confusion.
> > 
> > Cygwin's setup*.exe does not support the concept of "conflicts" (one
> > package blocking others from being installed), nor does it prevent file
> > clobbering if multiple packages provide the same file.  Since there is no
> way
> > to stop multiple MTAs from being installed, it is necessary to insure that
> they
> > do so properly.
> > 
> > This needs to be handled properly, that's all, and that can take time.
> > If Pierre doesn't respond soon, we can step in to help with exim.
>  
> I should have time one evening this week to do whatever it takes. 
> However I am not sure we need alternatives to handle conflicts in this case.
> In the exim package /usr/bin/mailq and /usr/bin/newaliases are just symbolic
> links to exim (newaliases is just a noop provided only to keep some 3rd
> party scripts from failing). It would be easy to pull them out of the
> package and to recreate them under user control in the exim config script.
> Hopefully other MTAs can do something similar.
> The symbolic link /usr/sbin/sendmail is not used by exim. It can be set from
> the exim config script to allow third party programs to find the local MTA.
> 
> Whatever we do should be transparent to users who have already installed
> ssmtp or exim and are updating to a newer version.

I guess that's exactly the problem.  Consider somebody has installed
exim or ssmtp and then installs sendmail accidentally or out of
curiosity.  This immediately overwrites the symlinks and even if
the user never actually uses sendmail, the MTA installation is broken.

I don't have a clear concept yet if and how we should use alternatives
to fix this problem.

Anyway, to have some working example, here's how Fedora does it:

The binaries, or symlinks to the actual binaries are called:

  /usr/sbin/sendmail.sendmail
  /usr/bin/mailq.sendmail
  /usr/bin/newaliases.sendmail

  /usr/sbin/sendmail.exim
  /usr/bin/mailq.exim
  /usr/bin/newaliases.exim

  /usr/sbin/sendmail.postfix
  /usr/bin/mailq.postfix
  /usr/bin/newaliases.postfix

  [analog for other MTAs]

Sendmail, mailq, newalias (etc.) are alternatives symlinks:

  /usr/sbin/sendmail -> /etc/alternatives/mta
  /usr/bin/mailq -> /etc/alternatives/mta-mailq
  /usr/bin/newaliases -> /etc/alternatives/mta-newaliases

And in /etc/alternatives are the symlinks to the actual binaries,
as configured by postinstall or the user:

  /etc/alternatives/mta -> /usr/sbin/sendmail.exim
  /etc/alternatives/mta-mailq -> /usr/bin/mailq.exim
  /etc/alternatives/mta-newaliases -> /usr/bin/newaliases.exim

In fact, there are more than these three symlinks, mainly to rmail
and to the man pages for the aforementioned binaries.

Maybe we can shamelessly borrow this scheme?!?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpwqfSpO_lrn.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]