How to configure Mutt to access /var/mail/
My email system is configured as follows:
fetchmail procmail mutt msmtp My mail is stored in ~/Mail/, and in Maildir format. I want to configure Mutt to read local mail in /var/mail/<username>, which is in mbox format. Alternatively redirect local mail to procmail to sort into ~/Mail/<subdirs>. |
You will need turn off fetchmail, then delete your present mail store (or at least rename the directory to take it out of circulaton), then edit .muttrc, .fetchmailrc, and .procmailrc to reflect the new configuration. Then turn fetchmail back on and test.
Note that, if you are using the mbox format, the mail does not go into subdirectories of the Mail director in your home directory. It goes into files (called "spoolfiles") in the Mail in your home directory, except for any mail that you choose to leave in the default mail directory of /var/spool/mail/[username]. This web page will provide far better guidance than I can, as it describes setting up an mbox style mailbox. http://docs.huihoo.com/gentoo/resour...e-to-mutt.html It was a primary resource when I set up Mutt for the first time. I'll give you some sample lines from my .muttrc indicating where you should look to make your edits: Code:
set mbox_type=Maildir In .procmailrc, you will need to edit the mailbox type. Again, some sample lines: Code:
MAILDIR=$HOME/Maildir/ I did a podcast for Hacker Public Radio about setting up Mutt. You may find some of the links in the shownotes helpful. (Two years ago, before I decided to Mutt, I wouldn't have understood a word of this.) |
Are you seriously suggesting that I rebuild my entire mail system to mbox, just to pick up /var/mail/<username>?
I had expected a suggestion on how to inject mail from /var/mail/ into the existing stream, so it would show up alongside mail from my ISP and Gmail etc. Perhaps a bash script to read /var/mail/<username> and send the output to procmail, then delete /var/mail/<username>. However formating the mbox style mail file would be very difficult for me. Another option is to just read /var/mail/<username> in vim, but I did want my local mail stored with my external mail. |
Say what?
No need to delete your current mail store. If I understand you correctly, you want the local mail to be treated the same as your foreign mail is treated... retrieve, process, put all in the same place. If this is what you want, check out https://wiki.debian.org/MaildirConfiguration Do you just want to set up mutt easily to read the local mail from /var/spool/...? It will require a separate rc file, and you'll have to quit mutt to change between local and the delivered mail. You can have either way, but not at the same time. |
Quote:
mbox and maildir are completely different formats. You can use one or the other with a single instance of Mutt, but you can't use both and you can't use a hybrid. I've used both. I've switched from mbox to maildir and I've switched from maildir to mbox in the course of learning Mutt. Whichever format you choose, you must speak to it in a language it can understand. |
All times are GMT -5. The time now is 07:37 AM. |