Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

can someone help me with mutt (im new with this) ive got something like this :

--user1 (softlink to /home/user1/Maildir)
--user2 (softlink to /home/user2/somedir1/somedir2/Maildir)

.... and so on (about 10 users) all users are local/system/virtual

and now i dont know how to configurate muttrc for this. there is commands like spoolfile / mailbox but im doing somtheing wrong with em.

share|improve this question
Based on your feedback I'm less sure I know what question you are asking than when I first looked. Do you have mutt configured at all? Are you trying to add access to mailboxes or just trying to get mutt to read your maildir in the first place? – Caleb Mar 22 '11 at 21:38
up vote 1 down vote accepted

You are very likley to run into a file permission mess the way you are trying to do this.

The proper way to configure this would be to tell mutt about accessing the mailboxes through some sort of protocol that allows user authentication so that the mailboxes get touched as the correct user. You can do this by adding macros to your ~/.muttrc file like this:

# Utility macro to change sent, drafts and other folders after changing mailboxes
macro index,pager Mx "set folder=!<enter>:set record=!/.Sent<enter>:set postponed=!/.Drafts<enter>"
# Macro to change to using the users Mail directory
macro index,pager Mu ":set spoolfile=~/Mail<enter>Mx<change-folder>!<enter>" "Mailbox: userdir"
# Macro to switch to an imap mailbox
macro index,pager Mi ":set imap_user=username<enter>:set spoolfile=imap://server/INBOX<enter>Mx<change-folder>!<enter>" "Mailbox: imapuser"

Those macros would allow you to fire off a macro Mu to use the mailbox in your user directory or Mi to switch to an imap mailbox of another user. You can keep adding such macros for more mailboxes that you access.

If all those mailboxes are owned by the same user, setting the symlinks like you reference and then setting spooolfile=~/Mail should do the trick

share|improve this answer
maildirs are generated by exim, so i dont have to use pop3 or imap. just read a mail. I just want that all mailboxes were shownt at main screen (maybe with new mails quantity) and after selecting that mailbox and hiting enter -> you goes to that mailbox. ive got some system users like abuse/spam/www/cron and so on from many servers and want to view mails from them by separaite mailboxes. Its convinient to backup/migrate or smthg like this. – MealstroM Mar 22 '11 at 19:42
If the dirs are all owned by the user you are running mutt as then simple symlinks should do the trick like you mention in your question and I don't see what the question is that remains to be answered. The remaining disadvantage to a flat hack like that is that since mutt only think of it as more folders off of your mailbox, it won't understand them as separate boxes with different front addresses and things like that. – Caleb Mar 22 '11 at 21:37
i see. ive managed to add to muttrc this mailboxes "=user1" mailboxes "=user2" macro index c "<change-folder>?<toggle-mailboxes>" "open a different folder" macro pager c "<change-folder>?<toggle-mailboxes>" "open a different folder" and when i hit C -button ive got menu with this mailboxes. Even N (new mail) is dispayed there. so if i could add N with number, say N12 -- means 12 new mails. it would answer my question. – MealstroM Mar 23 '11 at 6:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.