New format for exim_message_id
[exim.git] / src / src / exigrep.src
index d7f15239b835bda032e87b8bdc732b8cfdc42ac2..9eb9c454a2ae1bab00484a04bf8648c04f05917a 100644 (file)
@@ -9,7 +9,7 @@ use Getopt::Long qw(:config no_ignore_case);
 use File::Basename;
 
 # Copyright (c) 2007-2017 University of Cambridge.
-# Copyright (c) The Exim Maintainers 2020
+# Copyright (c) The Exim Maintainers 2020 - 2021
 # See the file NOTICE for conditions of use and distribution.
 
 # Except when they appear in comments, the following placeholders in this
@@ -87,7 +87,7 @@ sub do_line
   if (!/^\d{4}-/o) { $_ =~ s/^.*? exim\b.*?: //o; }
 
   return unless
-    my($date,$id) = /^(\d{4}-\d\d-\d\d \d\d:\d\d:\d\d(?:\.\d+)? (?:[+-]\d{4} )?)(?:\[\d+\] )?(\w{6}\-\w{6}\-\w{2})?/o;
+    my($date,$id) = /^(\d{4}-\d\d-\d\d \d\d:\d\d:\d\d(?:\.\d+)? (?:[+-]\d{4} )?)(?:\[\d+\] )?(\w{6}\-\w{6}\-\w{2}|\w{6}-\w{11}-\w{4})?/o;
 
   # Handle the case when the log line belongs to a specific message. We save
   # lines for specific messages until the message is complete. Then either print
@@ -128,7 +128,7 @@ sub do_line
     if (index($_, 'Completed') != -1 ||
        index($_, 'SMTP data timeout') != -1 ||
          (index($_, 'rejected') != -1 &&
-           /^(\d{4}-\d\d-\d\d \d\d:\d\d:\d\d(?:\.\d+)? (?:[+-]\d{4} )?)(?:\[\d+\] )?\w{6}\-\w{6}\-\w{2} rejected/o))
+           /^(\d{4}-\d\d-\d\d \d\d:\d\d:\d\d(?:\.\d+)? (?:[+-]\d{4} )?)(?:\[\d+\] )?(?:\w{6}\-\w{6}\-\w{2}|\w{6}-\w{11}-\w{4}) rejected/o))
       {
       if ($queue_time != -1 &&
          $saved{$id} =~ /^(\d{4}-\d\d-\d\d \d\d:\d\d:\d\d ([+-]\d{4} )?)/o)