Use mh_create_message_id().
Showing
1 changed file
with
1 additions
and
11 deletions
... | @@ -317,17 +317,7 @@ open_mailer () | ... | @@ -317,17 +317,7 @@ open_mailer () |
317 | static void | 317 | static void |
318 | create_message_id (header_t hdr) | 318 | create_message_id (header_t hdr) |
319 | { | 319 | { |
320 | char date[4+2+2+2+2+2+1]; | 320 | char *p = mh_create_message_id (0); |
321 | time_t t = time (NULL); | ||
322 | struct tm *tm = localtime (&t); | ||
323 | char *host; | ||
324 | char *p; | ||
325 | |||
326 | strftime (date, sizeof date, "%Y%m%d%H%M%S", tm); | ||
327 | mu_get_host_name (&host); | ||
328 | |||
329 | asprintf (&p, "<%s.%lu@%s>", date, (unsigned long) getpid (), host); | ||
330 | free (host); | ||
331 | header_set_value (hdr, MU_HEADER_MESSAGE_ID, p, 1); | 321 | header_set_value (hdr, MU_HEADER_MESSAGE_ID, p, 1); |
332 | free (p); | 322 | free (p); |
333 | } | 323 | } | ... | ... |
-
Please register or sign in to post a comment