Re: correct settings of /var/mail/user?
On Thu 08 Jul 2021 at 10:46:08 (-0400), Greg Wooledge wrote:
> On Thu, Jul 08, 2021 at 04:35:48PM +0200, Hans wrote:
> > Am Donnerstag, 8. Juli 2021, 16:27:38 CEST schrieb The Wanderer:
> > Zhat is strange, as I also can not delete the file /var/mail/myusername
> > manually - just because of access rights.
>
> You're not supposed to be able to delete that file. You should, however,
> be able to truncate it to zero bytes in size.
>
> The issue that most people face with centralized /var/mail (or
> /var/spool/mail) mbox files is locking. You can't create a "dot-lock"
> file in the spool directory, for the same reason that you can't delete
> your inbox (or create your inbox, if it doesn't already exist).
>
> Therefore, mutt normally includes a locking helper program, which is
> setgid mail (or whatever is needed on the target platform), which can
> create/remove dot-lock files in the spool directory.
>
> On Debian, it looks like this:
>
> unicorn:~$ dpkg -L mutt | grep lock
> /usr/bin/mutt_dotlock
> /usr/share/man/man1/mutt_dotlock.1.gz
> unicorn:~$ ls -ld /usr/bin/mutt_dotlock
> -rwxr-sr-x 1 root mail 14496 Jun 6 15:11 /usr/bin/mutt_dotlock*
>
> If you're getting errors about locking failure, it could be because
> you're missing this.
>
> If you're getting errors about not being able to delete your inbox file,
> ignore those. Or file a bug report asking the developers to kindly
> tell mutt not to try doing things it shouldn't be doing.
A helpful summary.
> I have no idea whether my current version of mutt would try to delete
> a central-spool mbox file if I removed all of the messages from it, for
> two reasons: I am *so* far from having an empty inbox that the concept
> of removing all the messages is ludicrous, and I don't use a central-spool
> mbox file. I'm using $HOME/Maildir/.
Likely not, on several counts:
. if you have "no idea", then it's unlikely that you've changed
"save_empty" to no (the default),
. mutt doesn't remove a central-spool mbox file,
. mutt doesn't remove MH and Maildir directories.
But I'm not sure why the OP thinks they should be able to remove a
file from: drwxrwsr-x 2 root mail 4096 8. Jul 16:02 mail
in their followup.
Cheers,
David.
Reply to: