Generate a Message-Id if the an email did not include one, to prevent crashing the store on import.

This commit is contained in:
trisk
2007-07-08 12:30:04 +00:00
parent 8826f58c02
commit 1e573957ef
+5
View File
@@ -300,6 +300,11 @@ StoreProcessIncomingMail(StoreClient *client,
if (data.messageId) {
info->data.mail.messageId =
BongoMemStackPushStr(&client->memstack, data.messageId);
} else {
info->data.mail.messageId =
BONGO_MEMSTACK_ALLOC(&client->memstack, MAXEMAILNAMESIZE + 1);
snprintf(info->data.mail.messageId, MAXEMAILNAMESIZE + 1, "%u.%llu@%s",
info->timeCreatedUTC, info->guid, StoreAgent.agent.officialName);
}
if (data.parentMessageId) {
info->data.mail.parentMessageId =