Homebrew mutt(1) file permission weirdness

I just installed mutt ('brew install mutt') running as myself (uid=501(john)), no sudo.

It seems to have worked, but now I've got a couple of weird permission problems.

  1. When I run mutt, email always appears new and I can't delete it. When I try, the screen flashes (visual bell, I guess) and I get "Mailbox is read-only". The mailbox appears to be /var/mail/john, and ls gives me this:

    -rw-------  1 john  mail  607 Jun 24 11:25 /var/mail/john
    

    (I'm not in the mail group. Should I be?)

  2. When I run mutt as another user on the system, I get different errors.

    sudo su - conrad
    

    Now my uid (as given by id(1)) is 502 (conrad).

    This time when I run mutt, as before (just plain mutt on the command line), I get slightly different errors:

    /Users/conrad/.mbox: No such file or directory (errno = 2)
    

    (If I supply -f /var/mail/conrad then I go back to case 1.)

    If I use sudo to run mutt, then everything's copacetic, but that doesn't seem right.

How do I fix this?

I guess I'm asking two questions:

  1. How do I fix the file permission issue?
  2. How do I make mutt, when run as another user besides the one that installed it, by default read from /var/mail/*username* instead of /Users/*username*/.mbox?

My software is running the specific versions:

Deimos$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.10.3
BuildVersion:   14D136

Deimos$ brew info mutt | head -1
mutt: stable 1.5.23 (bottled), HEAD

Solution 1:

Ok, I still don't know what's going on with the .mbox thing. I suspect that's a mutt/mail config issue of some sort.

BUT... I have a solution for the inability to write /var/mail/username.

http://hints.macworld.com/article.php?story=20100609140550467

dseditgroup -o edit -u john -p -a john -t user mail
dseditgroup -o edit -u john -p -a conrad -t user mail

(john is the admin user)

I added both users in question to the mail group and now both users can use mutt (no command-line arguments) to read their mail spool.

(As an expedient hack to get rid of the visual flag/error message for .mbox, I did:

touch ~/.mbox
chmod go-rwx ~/.mbox

)