<sect>Configuration
<p>
-While the default configuration (or ``preferences'') make Mutt usable right
-out of the box, it is often desirable to tailor Mutt to suit your own tastes.
-When Mutt is first invoked, it will attempt to read the ``system''
-configuration file (defaults set by your local system administrator), unless
-the ``-n'' <ref id="commandline" name="command line"> option is
-specified. This file is typically
-<tt>/usr/local/share/Muttrc</tt> or <tt>/usr/local/lib/Muttrc</tt>. Next,
-it looks for a file in your home directory named <tt/.muttrc/. In this file
-is where you place <ref id="commands" name="commands"> to configure Mutt.
+While the default configuration (or ``preferences'') make Mutt
+usable right out of the box, it is often desirable to tailor Mutt to
+suit your own tastes. When Mutt is first invoked, it will attempt to
+read the ``system'' configuration file (defaults set by your local
+system administrator), unless the ``-n'' <ref id="commandline"
+name="command line"> option is specified. This file is typically
+<tt>/usr/local/share/Muttrc</tt> or <tt>/usr/local/lib/Muttrc</tt>.
+If your home directory has a subdirectory named <tt/.mutt/, mutt
+will next look for a file named <tt>.mutt/muttrc</tt>. Otherwise, it
+looks for a file in your home directory named <tt/.muttrc/. In this
+file is where you place <ref id="commands" name="commands"> to
+configure Mutt.
In addition, mutt supports version specific configuration files that are
parsed instead of the default files as explained above. For instance, if
if (!Muttrc)
{
- snprintf (buffer, sizeof (buffer), "%s/.muttrc-%s", NONULL(Homedir), VERSION);
- if (access (buffer, F_OK) == -1)
- snprintf (buffer, sizeof (buffer), "%s/.muttrc", NONULL(Homedir));
+ snprintf (buffer, sizeof (buffer), "%s/.mutt/muttrc-%s", NONULL(Homedir), VERSION);
+ if (access(buffer, F_OK) == -1)
+ {
+ snprintf (buffer, sizeof (buffer), "%s/.muttrc-%s", NONULL(Homedir), VERSION);
+ if (access (buffer, F_OK) == -1)
+ {
+ snprintf (buffer, sizeof (buffer), "%s/.mutt/muttrc", NONULL(Homedir));
+ if (access (buffer, F_OK) == -1)
+ snprintf (buffer, sizeof (buffer), "%s/.muttrc", NONULL(Homedir));
+ }
+ }
default_rc = 1;
Muttrc = safe_strdup (buffer);
}