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.

2 Answers 2


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

  • I did not say nautilus, but mailutils (similar, tho :) )
    – luri
    Commented Feb 14, 2011 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
    Commented Feb 14, 2011 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
    Commented Feb 14, 2011 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
    Commented Feb 14, 2011 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
    Commented Feb 14, 2011 at 13:50

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

 mail -f /home/USER/Maildir/
  • but how do you specify mbox or mailutils? Commented Nov 27, 2023 at 21:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .