aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-mime-utils.c')
-rw-r--r--camel/camel-mime-utils.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index 6ecec61670..d2df6cac76 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -30,6 +30,7 @@
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <unicode.h>
@@ -3055,3 +3056,15 @@ void run_test(void)
}
#endif /* BUILD_TABLE */
+
+char *
+header_msgid_generate (void)
+{
+ gchar host [256], domain [768];
+ static gint count = 0;
+
+ gethostname (host, sizeof (host));
+ getdomainname (domain, sizeof (domain));
+
+ return g_strdup_printf ("%d.%d.%d.camel@%s.%s", (gint) time (NULL), getpid (), count++, host, domain);
+}