remove cryptglue.c
[apps/madmutt.git] / sendlib.c
index 1802e1d..152862b 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>
 #include "pager.h"
 #include "charset.h"
 #include "mutt_idna.h"
-
-#ifdef USE_LIBESMTP
-# include "mutt_libesmtp.h"
-#endif /* USE_LIBESMTP */
+#include "mutt_libesmtp.h"
 
 #ifdef USE_NNTP
 #include <nntp/nntp.h>
@@ -1111,8 +1107,6 @@ BODY *mutt_make_message_attach (CONTEXT * ctx, HEADER * hdr, int attach_msg)
 
   if ((option (OPTMIMEFORWDECODE) || option (OPTFORWDECRYPT)) &&
       (hdr->security & ENCRYPT)) {
-    if (!crypt_valid_passphrase (hdr->security))
-      return (NULL);
   }
 
   fp = m_tempfile(buffer, sizeof(buffer), NONULL(MCore.tmpdir), NULL);
@@ -1498,16 +1492,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);
@@ -1985,12 +1975,7 @@ void mutt_prepare_envelope (ENVELOPE * env, int final)
   rfc2047_encode_adrlist(env->reply_to, "Reply-To");
 
   if (env->subject)
-#ifdef USE_NNTP
-    if (!option (OPTNEWSSEND) || option (OPTMIMESUBJECT))
-#endif
-    {
-      rfc2047_encode_string (&env->subject);
-    }
+    rfc2047_encode_string (&env->subject);
   encode_headers (env->userhdrs);
 }