Fix "Cannot open mailbox /var/mail/USER: No such file or directory" error message

Just installed and configured postfix and mutt on a fresh copy of Raspberry Pi OS Lite, sending of mail was fine but I was having issues with mutt.

Don't know whether it was related to my other issue here, but mutt opens but I get the error:

Cannot open mailbox /var/mail/pi: No such file or directory

Very annoying, its never happened to me before, and it worked fine on another install last week. There wasn't much help found on the internet but I managed to figure it out pretty quickly:

cd /var/mail
sudo touch pi
sudo chown pi:mail pi

Obviously you'll need to replace pi with your own username and then should be good to go:

mutt

Happy days!

Tags : raspberrypi mailbox mutt postfix

Search Posts

Back to top