projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Andreas Krennmair:
[apps/madmutt.git]
/
sendlib.c
diff --git
a/sendlib.c
b/sendlib.c
index
8128089
..
666f4ec
100644
(file)
--- a/
sendlib.c
+++ b/
sendlib.c
@@
-40,6
+40,11
@@
#include <signal.h>
#include <sys/wait.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/wait.h>
#include <fcntl.h>
+#include <sys/utsname.h>
+
+#ifdef USE_LIBESMTP
+# include "mutt_libesmtp.h"
+#endif /* USE_LIBESMTP */
#ifdef USE_NNTP
#include <nntp.h>
#ifdef USE_NNTP
#include <nntp.h>
@@
-190,9
+195,6
@@
static void encode_quoted (FGETCONV * fc, FILE *fout, int istext)
linelen = 3;
}
linelen = 3;
}
-#ifdef USE_LIBESMTP
-# include "mutt_libesmtp.h"
-#endif /* USE_LIBESMTP */
if (c == '\n' && istext)
{
if (c == '\n' && istext)
{
@@
-1738,8
+1740,19
@@
int mutt_write_rfc822_header (FILE *fp, ENVELOPE *env, BODY *attach,
if (mode == 0 && !privacy && option (OPTXMAILER) && !has_agent)
{
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 */
/* 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);
}
return (ferror (fp) == 0 ? 0 : -1);