Re: [exim-dev] exiqsumm edge case

Góra strony
Delete this message
Reply to this message
Autor: Todd Lyons
Data:  
Dla: Richard.Hall
CC: exim-dev
Temat: Re: [exim-dev] exiqsumm edge case
On Fri, Oct 4, 2013 at 1:15 PM, Richard.Hall
<Richard.Hall@???> wrote:
> I sent the following to exim-users back in ... yikes, November 2012 ...
> and AFAICS there was no reaction. With talk of a new release coming up, I
> hope it isn't too late to re-raise it.


Nope, not too late. Commited and pushed, will be part of RC3 when it gets cut.

> Can be found in the archives at
> https://lists.exim.org/lurker/message/20121120.202727.ca031448.en.html
>
> The following patch fixes it for me
>
> --- exiqsumm.old Thu May 31 00:40:15 2012
> +++ exiqsumm.new Mon Nov 19 13:40:59 2012
> @@ -139,7 +139,7 @@
> print "\nCount Volume Oldest Newest Domain";
> print "\n----- ------ ------ ------ ------\n\n";
>
> -my ($count, $volume, $max_age, $min_age) = (0, 0, "0m", "0000d");
> +my ($count, $volume, $max_age, $min_age) = (0, 0, "0m", undef);
>
>  foreach $id (sort
>              {
> @@ -153,10 +153,12 @@
>      $queue{$id}, &print_volume_rounded($q_size{$id}), $q_oldest{$id},
>      $q_recent{$id}, $id);
>      $max_age = $q_oldest{$id} if &older($q_oldest{$id}, $max_age) > 0;
> -    $min_age = $q_recent{$id} if &older($min_age, $q_recent{$id}) > 0;
> +    $min_age = $q_recent{$id}
> +      if (!defined $min_age || &older($min_age, $q_recent{$id}) > 0);
>      $volume += $q_size{$id};
>      $count += $queue{$id};
>    }
> +$min_age = "0000d" if !defined $min_age;


I changed this to $min_age ||= "0000d"; but otherwise it's is exactly
the same as your patch.

>
>  printf("---------------------------------------------------------------\n");
>  printf("%5d  %.6s  %6s  %6s  %.80s\n",
>    $count, &print_volume_rounded($volume), $max_age, $min_age, "TOTAL");

>
> Regards,
> Richard


Many thanks Richard!

...Todd
--
The total budget at all receivers for solving senders' problems is $0.
If you want them to accept your mail and manage it the way you want,
send it the way the spec says to. --John Levine