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.
- 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/mboxJoe– Joe2020-02-27 04:33:08 +00:00Commented 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?tdeary– tdeary2020-02-28 00:05:17 +00:00Commented Feb 28, 2020 at 0:05
- ~/.mailrc is the configuration file you should be altering not ~/.mboxJoe– Joe2020-03-02 06:58:49 +00:00Commented Mar 2, 2020 at 6:58
- mailutils.org/manual/mailutils.html#Mail-Configuration-FilesJoe– Joe2020-03-02 06:58:52 +00:00Commented 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.tdeary– tdeary2020-03-02 20:56:00 +00:00Commented Mar 2, 2020 at 20:56
| Show 2 more comments
1 Answer
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.