Copyright updates:
[exim.git] / src / src / exipick.src
index e121c99c805af746a0b8827b2d2b5cf7cc9209fc..991128c1db768d705fb14341a6cf42bd097872ed 100644 (file)
@@ -1,5 +1,8 @@
 #!PERL_COMMAND
+
+# Copyright (c) The Exim Maintainers 2023
 # Copyright (c) 1995 - 2018 University of Cambridge.
+# SPDX-License-Identifier: GPL-2.0-or-later
 # See the file NOTICE for conditions of use and distribution.
 
 
@@ -25,6 +28,7 @@ my $p_version = "20100323.0";
 my $p_usage   = "Usage: $p_name [--help|--man|--version] (see --help for details)";
 my $p_cp      = <<EOM;
         Copyright (c) 2003-2010 John Jetmore <jj33\@pobox.com>
+        Copyright (c) 2019 The Exim Maintainers
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -88,7 +92,7 @@ GetOptions(
   'show-tests'  => \$G::show_tests, # display tests as applied to each message
   'man'         => sub { pod2usage(-verbose => 2, -exit => 0, -noperldoc => system('perldoc -V >/dev/null 2>&1')) },
   'help'        => sub { pod2usage(-verbose => 1, -exit => 0) },
-  'version'     => sub {
+  'v|version'     => sub {
         print "$p_name: $0\n",
             "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION\n",
             "perl(runtime): $]\n";
@@ -432,10 +436,10 @@ sub get_all_msgs {
     if ($e =~ /^[a-zA-Z0-9]$/) {
       opendir(DD, "$d/$e") || next;
       foreach my $f (grep !/^\./, readdir(DD)) {
-        push(@m, { message => $1, path => "$d/$e" }) if ($f =~ /^(.{16})-H$/);
+        push(@m, { message => $1, path => "$d/$e" }) if ($f =~ /^(.{23}|.{16})-H$/);
       }
       closedir(DD);
-    } elsif ($e =~ /^(.{16})-H$/) {
+    } elsif ($e =~ /^(.{23}|.{16})-H$/) {
       push(@m, { message => $1, path => $d });
     }
   }
@@ -903,8 +907,8 @@ sub _parse_header {
   $self->{_vars}{message_age}      = time() - $self->{_vars}{received_time};
 
   TAGGED: while (<I>) {
-    chomp;
     my ($tag, $arg) = /^-?(-\S+)(?:\s+(.*))?$/ or last TAGGED;
+    chomp;
 
     if ($tag eq '-acl') {
       my $t;
@@ -1007,6 +1011,7 @@ sub _parse_header {
   # when we drop out of the while loop, we have the first line of the
   # delivered tree in $_
   do {
+    chomp;
     if ($_ eq 'XX') {
       ; # noop
     } elsif ($_ =~ s/^[YN][YN]\s+//) {
@@ -1014,7 +1019,7 @@ sub _parse_header {
     } else {
       return(0);
     }
-    chomp($_ = <I>);
+    $_ = <I>;
   } while ($_ !~ /^\d+$/);
 
   $self->{_numrecips} = $_;