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

Bug#42052: PROPOSAL] /var/mail and /var/spool/mail



On Thu, Aug 05, 1999 at 06:46:33PM +0200, Santiago Vila wrote:
> > > > Why does /var/mail have to exist before those packages are unpacked?
> > > Others have explained that this is probably not necessary for MTA's.
> > > However, it still seems necessary for MUA's.  On a multi-user system,
> > > any unpacked MUA could possibly get executed while the package is
> > > unconfigured, and before base-files is configured.
> > However, that MUA would presumably get run by a non-root user, who couldn't
> > create a subdirectory with /var, which isn't world-writable.
> > And while that may cause the MUA to do "weird" things (like read the user's
> > mail via /var/spool/mail, or die saying "can't find your mail"), for an
> > unconfigured package, this doesn't seem unreasonable.
> It would be unreasonable that we claim that we can upgrade the system
> "in place" without it being true.
> Pre-Depends are absolutely needed for MUAs.

How so?

MUAs that are currently executing will continue to work (the mail isn't
getting moved or anything), by the time the MTA is configured, it'll
work, and MTA's being executed sometime between being unpacked and
configured will at worst fail in an obvious, harmless way.

Must all packages work completely correctly even in unconfigured state?

> It is 100% certain that *every* MTA is stopped in the postrm? If so, I
> will not mind that policy is reworded so that it says "Pre-Depends for
> MUAs, Depends for MTAs".

And again, even if the MTA *isn't* stopped, it will simply keep using
/var/spool/mail, blithely unaware that someone's making a /var/mail
link, and that it'll soon be restarted as a new binary that uses that
link.

Your failure case here seems to be an admin deliberately killing the MTA
and restarting it while it's unconfigured and its dependencies aren't met
(which admittedly is actually reasonably likely if you're running your
MTA from inetd). But even then, at least for exim, it simply means mail
will be spooled instead of delivered with an error like;

1999-08-06 12:54:44 11Ca9c-000060-00 == aj@distress.localnet T=local_delivery defer (2): No such file or directory: creating lock file hitching post /var/spool/mail/aj.lock.distress.localnet.37aa4e74.00000176

Cheers,
aj

-- 
Anthony Towns <aj@humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. PGP encrypted mail preferred.

 ``The thing is: trying to be too generic is EVIL. It's stupid, it 
        results in slower code, and it results in more bugs.''
                                        -- Linus Torvalds

Attachment: pgpYGjFf45RVa.pgp
Description: PGP signature


Reply to: