X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=sendlib.c;h=31596c9387be7aba271da64ee25a262339e4dd10;hp=8128089e7ce4131f0a544bb02743b82c5172b8f0;hb=6e0187ce721be4997bef32d724528f8976df89d6;hpb=6833ce8bdca2d64e14485118f2a4417b7e1cb1b1 diff --git a/sendlib.c b/sendlib.c index 8128089..31596c9 100644 --- a/sendlib.c +++ b/sendlib.c @@ -40,6 +40,7 @@ #include #include #include +#include #ifdef USE_NNTP #include @@ -1738,8 +1739,19 @@ int mutt_write_rfc822_header (FILE *fp, ENVELOPE *env, BODY *attach, if (mode == 0 && !privacy && option (OPTXMAILER) && !has_agent) { + struct utsname un; + char * os; + if (OperatingSystem!=NULL) { + os = OperatingSystem; + } else { + if (uname(&un)==-1) { + os = "UNIX"; + } else { + os = un.sysname; + } + } /* Add a vanity header */ - fprintf (fp, "User-Agent: Mutt/%s\n", MUTT_VERSION); + fprintf (fp, "User-Agent: mutt-ng %s (%s)\n", MUTT_VERSION,os); } return (ferror (fp) == 0 ? 0 : -1);