chiark / gitweb /
Use message number for reject publish filename if available
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 20 Apr 2010 16:58:26 +0000 (17:58 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 20 Apr 2010 16:58:26 +0000 (17:58 +0100)
xlog/bin/record

index 37a4236..7b6cf60 100755 (executable)
@@ -136,7 +136,7 @@ $f{Now}= time;
 
 if ($publish_rejections &&
     $f{Event} =~ m/^notify reject /) {
-    $f{CopyRef}= $f{MessageID};
+    $f{CopyRef}= $f{MessageNum} || $f{MessageID};
     $f{CopyRef} =~ s/\W/ sprintf '-%02x', ord($&) /ge;
     open I, ">$dir/public/nr-$f{CopyRef}.txt" or die $!;
     print I $message or die $!;