LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-24-2009, 02:10 AM   #1
moistTowelette
Member
 
Registered: Sep 2003
Posts: 79

Rep: Reputation: 15
Mutt experts - Mutt won't use the Maildir I specify in .muttrc


I'm posting this in the Debian because I have a suspicion it might be something inherent to the Mutt build for the distro (Debian Lenny). I have configured Exim to drop mail in ~/Maildir, and I want Mutt to read this directory automatically when started; however:
  1. When I start mutt manually with 'mutt -m Maildir -f ~/Maildir', everything works as expected.
  2. When I start mutt with no command line options, I am warned that /var/mail/<username> does not exist, and would I like to create it. Understandably, mutt does not look in ~/Maildir.
  3. I create ~/.muttrc, add the line 'set folder = ~/Maildir', and start mutt. This time I don't get the offer to create /var/mail/<username>, mutt simply tells me that the directory does not exist and gives me 'errno = 2'. Typing ':set ?folder' returns 'folder="~/Maildir"' as expected, however mutt refuses to read this folder automatically.

The reason I think this may be to do with the distro build is the 'MAILPATH' flag in the output of 'mutt -v':

Code:
Mutt 1.5.18 (2008-05-17)
Copyright (C) 1996-2008 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.

System: Linux 2.6.27.2-xenU (i686)
ncurses: ncurses 5.7.20081213 (compiled with 5.7)
libidn: 1.8 (compiled with 1.10)
hcache backend: GDBM version 1.8.3. 10/15/2002 (built Apr 24 2006 03:25:20)
Compile options:
-DOMAIN
+DEBUG
-HOMESPOOL  +USE_SETGID  +USE_DOTLOCK  +DL_STANDALONE
+USE_FCNTL  -USE_FLOCK
+USE_POP  +USE_IMAP  +USE_SMTP  +USE_GSS  -USE_SSL_OPENSSL  +USE_SSL_GNUTLS  +USE_SASL  +HAVE_GETADDRINFO
+HAVE_REGCOMP  -USE_GNU_REGEX
+HAVE_COLOR  +HAVE_START_COLOR  +HAVE_TYPEAHEAD  +HAVE_BKGDSET
+HAVE_CURS_SET  +HAVE_META  +HAVE_RESIZETERM
+CRYPT_BACKEND_CLASSIC_PGP  +CRYPT_BACKEND_CLASSIC_SMIME  -CRYPT_BACKEND_GPGME
-EXACT_ADDRESS  -SUN_ATTACHMENT
+ENABLE_NLS  -LOCALES_HACK  +COMPRESSED  +HAVE_WC_FUNCS  +HAVE_LANGINFO_CODESET  +HAVE_LANGINFO_YESEXPR
+HAVE_ICONV  -ICONV_NONTRANS  +HAVE_LIBIDN  +HAVE_GETSID  +USE_HCACHE
-ISPELL
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="/var/mail"
PKGDATADIR="/usr/share/mutt"
SYSCONFDIR="/etc"
EXECSHELL="/bin/sh"
MIXMASTER="mixmaster"
To contact the developers, please mail to <mutt-dev@mutt.org>.
To report a bug, please visit http://bugs.mutt.org/.

patch-1.5.13.cd.ifdef.2
patch-1.5.13.cd.purge_message.3.4
patch-1.5.13.nt+ab.xtitles.4
patch-1.5.4.vk.pgp_verbose_mime
patch-1.5.6.dw.maildir-mtime.1
patch-1.5.8.hr.sensible_browser_position.3
Is the only way to specify MAILPATH at compile time? And if so, is there (seriously) no way to override it?

For reference, here is the content of my .muttrc:

Code:
set mbox_type = Maildir
set folder = ~/Maildir
...and the output of 'mutt -debug 3':

Code:
Mutt 1.5.18 started at Mon Aug 24 07:06:06 2009
.
Debugging at level 3.

Reading configuration file '/etc/Muttrc'.
Reading configuration file '/usr/lib/mutt/source-muttrc.d|'.
Reading configuration file '/etc/Muttrc.d/charset.rc'.
Reading configuration file '/etc/Muttrc.d/colors.rc'.
mutt_alloc_color(): Color pairs used so far: 1
mutt_alloc_color(): Color pairs used so far: 2
mutt_alloc_color(): Color pairs used so far: 3
mutt_alloc_color(): Color pairs used so far: 4
mutt_alloc_color(): Color pairs used so far: 5
mutt_alloc_color(): Color pairs used so far: 6
mutt_alloc_color(): Color pairs used so far: 7
mutt_alloc_color(): Color pairs used so far: 8
Reading configuration file '/etc/Muttrc.d/compressed-folders.rc'.
Reading configuration file '/etc/Muttrc.d/gpg.rc'.
Reading configuration file '/etc/Muttrc.d/smime-paths.rc'.
Reading configuration file '/home/aaron/.muttrc'.
mx_get_magic(): unable to stat /var/mail/aaron: No such file or directory (errno 2).
/var/mail/aaron: No such file or directory (errno = 2)
/var/mail/aaron: No such file or directory (errno = 2)
Help much appreciated.
 
Old 08-24-2009, 06:47 AM   #2
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 60
I'm at work now (no Debian box to check here), but this works fine for me on Debian. My mail is found, even though it's in an odd place:

Code:
set mbox_type=Maildir
set mbox="~/.maildir/Inbox"
set spoolfile="~/.maildir/Inbox"
set folder="~/.maildir/"
set record="~/.maildir/Sent/"
set postponed="~/.maildir/Drafts"
Edit: A quick follow-up thought - Is the folder a proper Maildir folder? It must have inside it three folders: cur new tmp. (See here for more technical details.)

Last edited by Telemachos; 08-24-2009 at 07:40 AM.
 
Old 08-24-2009, 08:04 AM   #3
moistTowelette
Member
 
Registered: Sep 2003
Posts: 79

Original Poster
Rep: Reputation: 15
Yay - thank you.

After adding the 'set spoolfile' and 'set mbox' lines with my own directory paths, everything works as it should. I wasn't aware I needed to specify those.

More specifically, I wasn't aware of the $MAIL environment variable which is where mutt was getting the incorrect mail spool path from. So I added 'MAIL=/home/aaron/Maildir' to .bashrc and removed the 'set spoolfile' line from .muttrc, just in case any other programs look at $MAIL for their info.

Cheers!
 
  


Reply

Tags
debian, mutt


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What is better than Mutt? leebrent Linux - Software 7 11-11-2007 04:00 PM
Mutt question: "How can I configure mutt for not automarking as read??" xowl Linux - Software 0 09-25-2007 09:09 AM
Basic setup for Mutt using Maildir buskmann Linux - Software 2 10-31-2005 02:12 PM
MUTT reconfigure (no ~/.muttrc) blizunt7 Linux - Software 1 08-21-2005 01:33 AM
New To Mutt-ng hzs202 Linux - Software 0 08-18-2005 09:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 01:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration