More things to the Mime package.
[apps/madmutt.git] / sendlib.c
index 1802e1d..ad29311 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -10,7 +10,6 @@
 #include <lib-lib/lib-lib.h>
 
 #include <signal.h>
-#include <sys/utsname.h>
 
 #include <lib-lua/lib-lua.h>
 #include <lib-sys/exit.h>
@@ -1498,16 +1497,12 @@ int mutt_write_rfc822_header (FILE * fp, ENVELOPE * env, BODY * attach,
   }
 
   if (mode == 0 && !privacy && option (OPTXMAILER) && !has_agent) {
-    const char *os;
-
-    if (OperatingSystem != NULL) {
-      os = OperatingSystem;
+    if (MCore.operating_system) {
+      fprintf(fp, "User-Agent: %s (%s)\n", mutt_make_version(),
+              MCore.operating_system);
     } else {
-      struct utsname un;
-      os = (uname(&un) == -1) ? "UNIX" : un.sysname;
+      fprintf(fp, "User-Agent: %s\n", mutt_make_version());
     }
-    /* Add a vanity header */
-    fprintf (fp, "User-Agent: %s (%s)\n", mutt_make_version(), os);
   }
 
   return (ferror (fp) == 0 ? 0 : -1);