From 2c7b4621db111d65ce8831428e37300351fd6a1d Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Sat, 30 Apr 2011 14:42:18 -0400 Subject: [PATCH] Generate Message-ID's that will not be reused/repeated if Citadel server is reinstalled on the same host. --- citadel/msgbase.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/citadel/msgbase.c b/citadel/msgbase.c index 17b440db6..e9c5c338d 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -2755,7 +2755,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) { -- 2.39.2