M HYPE SPLASH
// general

How to configure mail (mailutils) to use Maildir schema by default?

By John Peck

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

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

7

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

 mail -f /home/USER/Maildir/

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy