https://issues.apache.org/SpamAssassin/show_bug.cgi?id=7070

--- Comment #13 from Quanah Gibson-Mount <[email protected]> ---
(In reply to Kevin A. McGrail from comment #12)
> $settings is only configured if in a zone, i.e. $settings =
> $conf_by_zone->{$zone};
> 
> At which point you will see:
> 
>   dbg("async: applying by_zone settings for %s", $zone)  if $settings;
> 
> At which point, these will have values:
> 
>  $t_init = $settings->{rbl_timeout}  if $settings && !defined $t_init;
>  $t_end = $settings->{rbl_timeout_min}  if $settings && !defined $t_end;
> 
> At which point, you won't get all the uninitialized errors...

Ah, I found the bug.  For rbl_timeout, we correctly fall back to the config
setting, if it isn't set with $ent or $settings:

  my $t_init = $ent->{timeout_initial};  # application-specified has precedence
  $t_init = $settings->{rbl_timeout}  if $settings && !defined $t_init;
  $t_init = $self->{main}->{conf}->{rbl_timeout}  if !defined $t_init;
  $t_init = 0  if !defined $t_init;      # last-resort default, just in case

This is missing for rbl_timeout_min.

Here's the fix:
quanah@zre-ldap001:~/p4/zimbra/main/ThirdParty/Perl/q/Mail-SpamAssassin-3.4.0/lib/Mail/SpamAssassin$
diff -u AsyncLoop.pm.orig AsyncLoop.pm
--- AsyncLoop.pm.orig   2014-07-15 18:27:48.865639419 -0500
+++ AsyncLoop.pm        2014-07-15 18:28:55.597637294 -0500
@@ -212,6 +212,7 @@

   my $t_end = $ent->{timeout_min};       # application-specified has
precedence
   $t_end = $settings->{rbl_timeout_min}  if $settings && !defined $t_end;
+  $t_end = $self->{main}->{conf}->{rbl_timeout_min}  if !defined $t_end;
   $t_end = 0.2 * $t_init  if !defined $t_end;
   $t_end = 0  if $t_end < 0;  # just in case
   $t_init = $t_end  if $t_init < $t_end;

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to