X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=sendlib.c;h=e45ad112fbbee4c8cf0187a678731dfe5c4f981d;hp=1802e1da8b3b4f0c6f82c903312ca0c92df7410e;hb=2bc76f88e99c16e773c2b2ba805a0bf3e2c034fd;hpb=b6980caf7b13994c57957872876cdecc21e54a82 diff --git a/sendlib.c b/sendlib.c index 1802e1d..e45ad11 100644 --- a/sendlib.c +++ b/sendlib.c @@ -10,7 +10,6 @@ #include #include -#include #include #include @@ -28,10 +27,7 @@ #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 @@ -1498,16 +1494,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);