Support old-format message_id spoolfiles for mailq / -bp. Bug 3050
[exim.git] / src / src / queue.c
index deedcde6fb6de663af30673b7332bcd3412a076c..2c3d014f5638405404e06bacd0f2d7f73fcb4129 100644 (file)
@@ -961,7 +961,9 @@ each time. */
 
 if (option == QL_MSGID_ONLY)   /* Print only the message IDs from the chain */
   for (; qf; qf = qf->next)
-    fprintf(stdout, "%.*s\n", MESSAGE_ID_LENGTH, qf->text);
+    fprintf(stdout, "%.*s\n",
+      is_old_message_id(qf->text) ? MESSAGE_ID_LENGTH_OLD : MESSAGE_ID_LENGTH,
+      qf->text);
 
 else for (;
          qf && (reset_point = store_mark());
@@ -1021,7 +1023,9 @@ else for (;
     }
 
   fprintf(stdout, "%s %.*s",
-    string_format_size(size, big_buffer), MESSAGE_ID_LENGTH, qf->text);
+    string_format_size(size, big_buffer),
+    is_old_message_id(qf->text) ? MESSAGE_ID_LENGTH_OLD : MESSAGE_ID_LENGTH,
+    qf->text);
 
   if (env_read && sender_address)
     {