On Thu 11 Nov 2021 at 15:53:53 (-0500), Greg Wooledge wrote: > On Thu, Nov 11, 2021 at 02:48:25PM -0600, David Wright wrote: > > There should be some indication at this point of why it can't > > delete your emails. The reason you see the filename > > /home/username/.mutt-cache/scratchpad/mutt-hostname… above is > > that I have set tmpdir="$HOME/.mutt-cache/scratchpad" in my > > muttrc file. I use that, rather than /tmp, because it is encrypted > > along with all of /home. But it means I have to clean it occasionally. > > If mutt normally writes these "temporary files" in /tmp (whaaat, how do > you guarantee an atomic move from /tmp to /var/mail??) then the OP > should at least check the perms and ownership of /tmp. > > ls -ld /tmp > > We've seen *so* many people with messed-up /tmp ownership lately.
I assume it does check '$tmpdir'/$TMPDIR, but only when it requires its use, hence the message. After that, what can it do but give up syncing? I suppose it could treat deleting /all/ messages as a special case and truncate the file. One is warned about security risks with confidentiality from poor choice of tmpdir. I don't think it ever does a conventional atomic move (nor do I know the mechanism that one would use without having write access to the directory). I think it writes it back. Personally, it doesn't worry me what it does, because all the mail in my /var/mail/ is ephemeral stuff from APT, cron etc from this and my other hosts. All my /real/ mail is either on a remote IMAP server (different mechanism, presumably) or in local mailboxes also on /home. Therefore the most frequent use for my tmpdir is juggling files while composing replies. Cheers, David.