+- snprintf (buffer, sizeof (buffer), "%s/.mutt/muttrc", NONULL(Homedir));
++ snprintf (buffer, sizeof (buffer), "%s/.mutt/muttrc", NONULL(H_CFDIR));
+ if (access(buffer, F_OK) == -1) /* default to .muttrc for alias_file */
+- snprintf (buffer, sizeof(buffer), "%s/.muttrc", NONULL(Homedir));
++ snprintf (buffer, sizeof(buffer), "%s/.muttrc", NONULL(H_CFDIR));
+
+ default_rc = 1;
+ Muttrc = safe_strdup (buffer);
+@@ -2526,10 +2545,10 @@
+ }
+
+ uname (&u);
+- pathlen = strlen (Homedir) + sizeof("/.slrnfaces/")
++ pathlen = strlen (H_CFDIR) + sizeof("/.slrnfaces/")
+ + strlen (u.nodename) + 30;
+ fifo = safe_malloc (pathlen);
+- sprintf (fifo, "%s/.slrnfaces", Homedir);
++ sprintf (fifo, "%s/.slrnfaces", H_CFDIR);
+ if (mkdir (fifo, 0700))
+ {
+ if (errno != EEXIST)
+@@ -2544,7 +2563,7 @@
+ FILE *fp;
+
+ /* We'll abuse fifo filename memory here. It's long enough. */
+- sprintf (fifo, "%s/.slrnfaces/README", Homedir);
++ sprintf (fifo, "%s/.slrnfaces/README", H_CFDIR);
+ if ((fp = fopen (fifo, "w")) != NULL)
+ {
+ fputs (_(
+@@ -2560,7 +2579,7 @@
+ }
+ }
+
+- status = snprintf (fifo, pathlen, "%s/.slrnfaces/%s.%ld", Homedir,
++ status = snprintf (fifo, pathlen, "%s/.slrnfaces/%s.%ld", H_CFDIR,
+ u.nodename, (long)getpid());
+ if (status < 0)
+ goto clean_face;
+diff -Nur mutt-1.5.11.orig/mutt_ssl.c mutt-1.5.11/mutt_ssl.c
+--- mutt-1.5.11.orig/mutt_ssl.c 2005-08-03 11:17:46.000000000 +0200
++++ mutt-1.5.11/mutt_ssl.c 2006-05-12 00:58:13.000000000 +0200
+@@ -58,6 +58,13 @@
+ #define HAVE_ENTROPY() (!access(DEVRANDOM, R_OK) || entropy_byte_count >= 16)
+ #endif
+
++#ifdef HAVE_HOME_ETC_H
++# include <home_etc.h>
++# define H_CFDIR _HEdir
++#else
++# define H_CFDIR Homedir
++#endif
++
+ /* keep a handle on accepted certificates in case we want to
+ * open up another connection to the same server in this session */
+ static STACK_OF(X509) *SslSessionCerts = NULL;
+@@ -162,7 +169,7 @@
+ /* load entropy from egd sockets */
+ #ifdef HAVE_RAND_EGD
+ add_entropy (getenv ("EGDSOCKET"));
+- snprintf (path, sizeof(path), "%s/.entropy", NONULL(Homedir));
++ snprintf (path, sizeof(path), "%s/.entropy", NONULL(H_CFDIR));
+ add_entropy (path);
+ add_entropy ("/tmp/entropy");
+ #endif
+diff -Nur mutt-1.5.11.orig/sendlib.c mutt-1.5.11/sendlib.c
+--- mutt-1.5.11.orig/sendlib.c 2006-05-11 23:23:13.000000000 +0200
++++ mutt-1.5.11/sendlib.c 2006-05-12 00:58:13.000000000 +0200
+@@ -45,6 +45,13 @@
+ #include <sys/wait.h>
+ #include <fcntl.h>
+
++#ifdef HAVE_HOME_ETC_H
++# include <home_etc.h>
++# define H_CFDIR _HEdir
++#else
++# define H_CFDIR Homedir
++#endif
++
+ #ifdef HAVE_SYSEXITS_H
+ #include <sysexits.h>
+ #else /* Make sure EX_OK is defined <philiph@pobox.com> */
+@@ -908,9 +915,9 @@
+
+ /* Given a file with path ``s'', see if there is a registered MIME type.
+ * returns the major MIME type, and copies the subtype to ``d''. First look
+- * for ~/.mime.types, then look in a system mime.types if we can find one.
+- * The longest match is used so that we can match `ps.gz' when `gz' also
+- * exists.
++ * for either $HOME_ETC/.mime.types or ~/.mime.types, then look in a system
++ * mime.types if we can find one. The longest match is used so that we can
++ * match `ps.gz' when `gz' also exists.
+ */
+
+ int mutt_lookup_mime_type (BODY *att, const char *path)
+@@ -939,7 +946,7 @@
+ switch (count)
+ {
+ case 0:
+- snprintf (buf, sizeof (buf), "%s/.mime.types", NONULL(Homedir));
++ snprintf (buf, sizeof (buf), "%s/.mime.types", NONULL(H_CFDIR));
+ break;
+ case 1:
+ strfcpy (buf, SYSCONFDIR"/mime.types", sizeof(buf));