Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

When I type mail command, I get a "No mail for USER" answer, but there's indeed mail (it's in /home/USER/Maildir/new)

I guess it has something to do with the mailbox being in Maildir format, instead of mbox, but I don't know how to tell mailutils (specifically the mail command) which format to use.

share|improve this question

Afaik "mail" utility checks mails at the location given with the MAIL environment variable. Try this command: MAIL=/home/USER/Maildir/ mail (for sure, replace USER with something meaningful & valid). If that works, it seems that you should set MAIL variable you can do it in your bash profile / rc file for example. You can check the content of your current MAIL variable with: echo $MAIL

share|improve this answer
I did not say nautilus, but mailutils (similar, tho :) ) – luri Feb 14 '11 at 13:08
Arghhh, I haven't slept too much, I must admit :) Okei, and sorry for the misread, however what I told (the other parts than nautilus, hehe) is still valid. But after this nasty mistake, I am not sure anymore :-@ – LGB Feb 14 '11 at 13:12
OK... if I set MAIL=/home/USER/Maildir/ mail, I get the right number of mails, and I can read them... BUT upon reading mails, 'mail' command will move them from /home/USER/Maildir to /home/USER/mbox.... wich doesn't exist, so, as a matter of fact, it did erase them (just test mails, so no worries). But shouldn't it realize where and how mail is stored (btw I have postfix and courier working). – luri Feb 14 '11 at 13:14
Update: my bad, it does not move mail to /home/USER/mbox folder. It's a file, that contains the mails in text format... But anyway it renders them unusable for Courier, that seeks a Maildir schema. – luri Feb 14 '11 at 13:42
"text file format"? Then it's the "standard" "unix mailbox" file format, which is just one file (as opposite to the maildir) containing every mails. But I am not sure now, if you write that "it does not move mails" then what's the problem, if mails were not moved, your mails are still in your maildir (/home/USER/Maildir), isn't it? Or have you missed check /home/USER/Maildir/cur/ ? Maildir has cur/ and new/, new contains the unread mails, cur the read ones. Maybe "mail" utility moved your mails into /cur, since they are not new anymore. That is the good behavior, maildir works this way! – LGB Feb 14 '11 at 13:50

To fetch mail from users home directory, use mail with -f option

 mail -f /home/USER/Maildir/
share|improve this answer

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.