Temporary dir for mailpost

Russ Allbery eagle at eyrie.org
Wed Apr 15 21:56:19 UTC 2015

Julien ÉLIE <julien at trigofacile.com> writes:

> Regarding this ticket:
>   https://inn.eyrie.org/trac/ticket/81

> "mailpost tries to store its message ID database in INN's pathtmp, but
> since it's usually running as the mail system (often daemon) rather than
> as news, this fails."

> What should we do?

This is a hard problem, since there's no generally good directory for this
sort of thing and we can't automatically create one since we don't know
what user mailpost will actually run as.  I don't think there's a good
alternative to just requiring some manual configuration when mailpost is
set up.

It might make sense to put the database and the temporary files all in the
same place.  The advantage of using /var/run is that those files will
often be wiped automatically on reboot.  It would be nice to keep that.
But there's no guarantee that /var/run will be writable, and putting them
in /tmp is a bad idea since they're very predictable filenames.  It may be
necessary to just live with putting them in a persistent directory.

I think it would make sense to have a directory explicitly configured for
mailpost, and to put the database and the temporary files there, and to
document that this directory has to be created and set to be writable by
the user that mailpost runs as.  And if we're going to do that, it might
be simplest to just make -b mandatory, although that's not a
backward-compatible change.  But it's hard to see how to do this safely in
a backward-compatible way.

Russ Allbery (eagle at eyrie.org)              <http://www.eyrie.org/~eagle/>

    Please send questions to the list rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.

More information about the inn-workers mailing list