1

Is there a way to change the ~/mbox file where mailutils's mail program saves read mail and where mail -f reads from to something else, like ~/.mbox for example? I read that setting the MBOX environment variable does this but I tried setting it to both ~/.mbox and $HOME/.mbox and neither did anything for me. For reference, I tried setting MBOX both just by setting it in the current terminal session and by using the env command, and neither worked.

7
  • Please provide more detail on the situation, such as how/where you set the env variable MBOX. These may help though doc.dovecot.org/configuration_manual/mail_location wiki2.dovecot.org/MailLocation/mbox Commented Feb 27, 2020 at 4:33
  • @Joe There, added some more info. I'm not sure if those links are relevant though since they're for Dovecot and I'm using mailutils, unless they're compatible or something? Commented Feb 28, 2020 at 0:05
  • ~/.mailrc is the configuration file you should be altering not ~/.mbox Commented Mar 2, 2020 at 6:58
  • mailutils.org/manual/mailutils.html#Mail-Configuration-Files Commented Mar 2, 2020 at 6:58
  • @Joe I wasn't trying to edit ~/.mbox, that's what I wanted to rename my user mailbox file to so it wouldn't be visible all the time, and I wanted to know if there were any config options that would let me do that. Commented Mar 2, 2020 at 20:56

1 Answer 1

0

In mailutils 3.14 the MBOX environment variable seems to work:

export MBOX=.fubar 

will coax mail into saving your messages in ~/.fubar. Note: no directory specified here.

I keep a statement like this in my .profile so it is the login environment.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.