+- snprintf (buffer, sizeof (buffer), "%s/.mutt/muttrc-%s", NONULL(Homedir), MUTT_VERSION);
++ snprintf (buffer, sizeof (buffer), "%s/.mutt/muttrc-%s", NONULL(H_CFDIR), MUTT_VERSION);
+ if (access(buffer, F_OK) == -1)
+- snprintf (buffer, sizeof (buffer), "%s/.mutt/muttrc", NONULL(Homedir));
++ snprintf (buffer, sizeof (buffer), "%s/.mutt/muttrc", NONULL(H_CFDIR));
+
+ default_rc = 1;
+ Muttrc = safe_strdup (buffer);
+diff -Nur mutt-1.4.1.orig/muttbug.sh.in mutt-1.4.1/muttbug.sh.in
+--- mutt-1.4.1.orig/muttbug.sh.in Mon Dec 8 13:51:50 2003
++++ mutt-1.4.1/muttbug.sh.in Mon Dec 8 13:53:17 2003
+@@ -244,13 +244,21 @@
+ if test "$personal" = "yes" ; then
+ CANDIDATES=".muttrc-${MUTTVERSION} .muttrc .mutt/muttrc-${MUTTVERSION} .mutt/muttrc"
+ MATCHED="none"
++ if test -n "$HOME_ETC" ; then
++ for f in $CANDIDATES; do
++ if test -f "${HOME_ETC}/$f" ; then
++ MATCHED="${HOME_ETC}/$f"
++ break
++ fi
++ done
++ else
+ for f in $CANDIDATES; do
+ if test -f "${HOME}/$f" ; then
+ MATCHED="${HOME}/$f"
+ break
+ fi
+ done
+-
++ fi
+ if test "$MATCHED" = "none" ; then
+ echo "Warning: Can't find your personal .muttrc." >&2
+ else
+diff -Nur mutt-1.4.1.orig/sendlib.c mutt-1.4.1/sendlib.c
+--- mutt-1.4.1.orig/sendlib.c Mon Dec 8 13:51:51 2003
++++ mutt-1.4.1/sendlib.c Mon Dec 8 14:02:54 2003
+@@ -29,7 +29,6 @@
+ #include "pager.h"
+ #include "charset.h"
+
+-
+ #include <string.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+@@ -40,6 +39,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> */
+@@ -958,9 +964,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.
+ */
+
+ static int lookup_mime_type (BODY *att, const char *path)
+@@ -989,7 +995,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));