Generate Message-ID's that will not be reused/repeated if Citadel server is reinstall...
authorArt Cancro <ajc@uncensored.citadel.org>
Sat, 30 Apr 2011 18:42:18 +0000 (14:42 -0400)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 4 Sep 2011 20:13:41 +0000 (20:13 +0000)
citadel/msgbase.c

index 4ff8b55103be072814267dd7c0d45b0fb2e612c4..304023bc6aa71c900de422b5f7b81bd2690a2695 100644 (file)
@@ -2796,7 +2796,11 @@ long send_message(struct CtdlMessage *msg) {
 
        /* Get a new message number */
        newmsgid = get_new_message_number();
-       snprintf(msgidbuf, sizeof msgidbuf, "%010ld@%s", newmsgid, config.c_fqdn);
+       snprintf(msgidbuf, sizeof msgidbuf, "%08lX-%08lX@%s",
+               (long unsigned int) time(NULL),
+               (long unsigned int) newmsgid,
+               config.c_fqdn
+       );
 
        /* Generate an ID if we don't have one already */
        if (msg->cm_fields['I']==NULL) {