[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: sSMTP and other MTAs



On 6 Apr 1998, Adam P. Harris wrote:

> Hugo Haas <hh223@hermes.cam.ac.uk> writes:
> > 
> > However, when the MTA package is removed, the symlinks aren't restored. We
> > need to call manually update-alternatives --auto (I don't think it would
> > be sensible to ask all MTA maintainers to use alternative just for the
> > sSMTP package). Therefore, /usr/sbin/sendmail won't exist anymore, and the
> > user is not warned by dpkg about this.
> > 
> > Would it be a clean way to use a configuration script, ssmtpconfig say,
> > which would ask if ssmtp should be used as a sendmail (update-alternatives
> > --install) or not (update-alternatives --remove)? Well, if the user
> > installs and then removes another MTA, he will have to rerun the script,
> > but I don't see any other solution...
> 
> Well, ask at install time in the postinst script.  Then in the postrm
> script, check the file system state (i.e., if sendmail is diverted and
> nothing is at /usr/sbin/sendmail) and restore it reasonable like
> before the package was installed.  You'd have to be careful in the
> postinst/postrm scripts to make sure that you don't have
> divert/undivert at the wrong times (i.e., error-unroll, upgrade, etc
> etc).  Cf the maintainer script skeletons that were posted here
> earlier.

Sorry, my explanation was not clear (or perhaps I didn't quite understand
your solution).

The problem (with update-alternatives stuff and a ssmtpconfig script)
appears in the following sequence:

* installation ssmtp package:
ask in postinst script if sendmail has to be diverted (assume answer here
is yes, otherwise there's no problem)
-> /usr/sbin/sendmail is a symlink to /usr/sbin/ssmtp

* installation of sendmail package (for instance)
dpkg is overwriting /usr/sbin/sendmail (it would be possible to do that
since ssmtp would no more conflict with mail-transport-agent)
-> /usr/sbin/sendmail is sendmail's program

* remove sendmail package
dpkg removes /usr/sbin/sendmail program
-> /usr/sbin/sendmail doesn't exist anymore
(ssmtp would be the only package using alternatives for sendmail, so the
state of sendmail's diversion wouldn't be updated)
PROBLEM: the ssmtpconfig has to be rerun to put the symlink back, and
there will be no dpkg's warning after sendmail's deinstallation.
Therefore, the user could think that he has a valid MTA, but he has not
until he has rerun the script.

If I put enough warnings in ssmtp configuration script about that, and if
I had a file in /usr/doc/smmtp explaining this "problem" is it an
acceptable behaviour? 

Thanks.

Regards,

Hugo

-- 
Hugo Haas         <Hugo.Haas@via.ecp.fr>     <http://www.via.ecp.fr/~hugo/>
PGP2 key id 0x8a5af90d, fingerprint 45AB 8D24 B3E4 C9DD E85C 25C8 DB0B BFA3


--
To UNSUBSCRIBE, email to debian-mentors-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: