Temporary dir for mailpost

Russ Allbery eagle at eyrie.org
Thu Apr 16 20:12:59 UTC 2015


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

> Thanks for your suggestions.

> We may:
> - put the database and the temporary files in the same directory
> (configurable with -b)
> - in case -b is not given, mailpost checks whether INN's pathtmp is
> writable and if that's not the case, it dies with an error
> - in case -b is given, mailpost checks whether the explicitly configured
> directory is writable and if that's not the case, it dies with an error

> Wouldn't that do the trick instead of making -b mandatory?

Sure, that would also work.

> Hmm...  Couldn't we also just create and use the ~/.mailpost directory by
> default instead of INN's pathtmp? (or ~/.inn-mailpost or ~/.inn/mailpost
> that could be useful if we ever wish to store files for other programs ?)

The problem there is that the user mailpost is running at may not (and
probably shouldn't) have a home directory that it can write to.  With a
lot of mail systems, it's going to be running as some user like daemon,
which normally won't have write access anywhere in the file system other
than to world-writable directories.

If we knew what user it would run as, we could just create a subdirectory
of INN's pathtmp for it during install and set up permissions
appropriately, but there's no good way to know.

These days, it's a lot easier to arrange to run programs from the mail
system as another user (like the news user), so your approach does make
sense if we can encourage people to run mailpost as news.  In that case,
it might even make sense to just use pathdb for the persistent database.

-- 
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