[Exim] Bug in exiqsumm

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: exim-users
Sujet: [Exim] Bug in exiqsumm
A bug has been reported in exiqsumm which seems worth of a posted patch
(which also fixes another minor problem). The changelog is as follows:

44. Nasty bug in exiqsumm: the regex to skip already-delivered addresses was
    buggy, causing it to skip the first lines of messages whose message ID
    ended in 'D'. This would not have bitten before Exim release 4.14, because
    message IDs were unlikely to end in 'D' before then. The effect was to have
    incorrect size information for certain domains.


--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.



*** exim-4.20/src/exiqsumm.src        Mon May 12 14:39:19 2003
--- ../src/exiqsumm.src Fri Jul 11 16:10:35 2003
***************
*** 17,22 ****
--- 17,30 ----
  #   Fix provided by Randy Banks
  # Added summary line: September 2002 by Philip Hazel
  #   Code provided by Joachim Wieland
+ # June 2003 by Philip Hazel
+ #   Initialize $size, $age, $id to avoid warnings when bad
+ #   data is provided
+ # Bug fix: July 2003 by Philip Hazel
+ #   Incorrectly skipping the first lines of messages whose
+ #   message ID ends in 'D'! Before Exim 4.14 this didn't
+ #   matter because they never did. Looks like an original
+ #   typo. Fix provided by Chris Liddiard.
  #
  # Usage: mailq | exiqsumm [-a] [-c]
  #   Default sorting is by domain name
***************
*** 66,71 ****
--- 74,84 ----
  $sort_by_count = 0;
  $sort_by_age = 0;


+ $size = "0";
+ $age = "0d";
+ $id = "";
+
+
  while (@ARGV > 0 && substr($ARGV[0], 0, 1) eq "-")
    {
    if ($ARGV[0] eq "-a") { $sort_by_age = 1; }
***************
*** 77,83 ****
  {
  # Skip already delivered lines


! if (/\s*D\s\S+/) { next; }

# If it's the first line of a message, pick out the data. Note: it may
# have text after the final > (e.g. frozen) so don't insist that it ends >.
--- 90,96 ----
{
# Skip already delivered lines

! if (/^\s*D\s\S+/) { next; }

# If it's the first line of a message, pick out the data. Note: it may
# have text after the final > (e.g. frozen) so don't insist that it ends >.