'anonymise' Message-Id: header string
authorPaul Mangan <paul@claws-mail.org>
Thu, 11 Dec 2003 11:13:53 +0000 (11:13 +0000)
committerPaul Mangan <paul@claws-mail.org>
Thu, 11 Dec 2003 11:13:53 +0000 (11:13 +0000)
ChangeLog.claws
configure.ac
src/compose.c

index 6d40cad..a9c5343 100644 (file)
@@ -1,3 +1,8 @@
+2003-12-11 [paul]      0.9.7claws37
+
+       * src/compose.c
+               'anonymise' Message-Id: header string
+
 2003-12-11 [paul]      0.9.7claws36
 
        * src/plugins/clamav/clamav_plugin.c
index 978e9f7..9289a26 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=7
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=36
+EXTRA_VERSION=37
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
index 77c9b85..6fb8ce2 100644 (file)
@@ -258,8 +258,7 @@ static void compose_convert_header          (gchar          *dest,
                                                 gchar          *src,
                                                 gint            header_len,
                                                 gboolean        addr_field);
-static void compose_generate_msgid             (Compose        *compose,
-                                                gchar          *buf,
+static void compose_generate_msgid             (gchar          *buf,
                                                 gint            len);
 
 static void compose_attach_info_free           (AttachInfo     *ainfo);
@@ -3335,7 +3334,7 @@ static gint compose_redirect_write_headers(Compose *compose, FILE *fp)
 
        /* Resent-Message-ID */
        if (compose->account->gen_msgid) {
-               compose_generate_msgid(compose, buf, sizeof(buf));
+               compose_generate_msgid(buf, sizeof(buf));
                fprintf(fp, "Resent-Message-Id: <%s>\n", buf);
                compose->msgid = g_strdup(buf);
        }
@@ -4292,7 +4291,7 @@ static gint compose_write_headers(Compose *compose, FILE *fp,
 
        /* Message-ID */
        if (compose->account->gen_msgid) {
-               compose_generate_msgid(compose, buf, sizeof(buf));
+               compose_generate_msgid(buf, sizeof(buf));
                fprintf(fp, "Message-Id: <%s>\n", buf);
                compose->msgid = g_strdup(buf);
        }
@@ -4516,7 +4515,7 @@ static void compose_convert_header(gchar *dest, gint len, gchar *src,
        conv_encode_header(dest, len, src, header_len, addr_field);
 }
 
-static void compose_generate_msgid(Compose *compose, gchar *buf, gint len)
+static void compose_generate_msgid(gchar *buf, gint len)
 {
        struct tm *lt;
        time_t t;
@@ -4525,18 +4524,9 @@ static void compose_generate_msgid(Compose *compose, gchar *buf, gint len)
        t = time(NULL);
        lt = localtime(&t);
 
-       if (compose->account && compose->account->address &&
-           *compose->account->address) {
-               if (strchr(compose->account->address, '@'))
-                       addr = g_strdup(compose->account->address);
-               else
-                       addr = g_strconcat(compose->account->address, "@",
-                                          get_domain_name(), NULL);
-       } else
-               addr = g_strconcat(g_get_user_name(), "@", get_domain_name(),
-                                  NULL);
+       addr = g_strconcat("@", get_domain_name(), NULL);
 
-       g_snprintf(buf, len, "%04d%02d%02d%02d%02d%02d.%08x.%s",
+       g_snprintf(buf, len, "%04d%02d%02d%02d%02d%02d.%08x%s",
                   lt->tm_year + 1900, lt->tm_mon + 1,
                   lt->tm_mday, lt->tm_hour,
                   lt->tm_min, lt->tm_sec,