From 551f28f4ebc55dd1e9cc13a963b5ac57b4652f0f Mon Sep 17 00:00:00 2001 From: Marc Bradshaw Date: Wed, 23 Jun 2021 02:48:45 +0000 Subject: [PATCH] Make the RBLDNS config change mandatory --- Changes | 5 +++++ lib/Mail/Milter/Authentication/Handler/RBLDNS.pm | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index dacdee8b..210da242 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,10 @@ Revision history for Mail-Milter-Authentication + - RBLDNS: Config structure change is now mandatory + + [UPDATED Config Items for RBLDNS] + RBLDNS config items MUST be moved under a new rbls key + {{$NEXT}} - DNS: More consistent error logging on DNS lookup timeouts - RBLDNS: Config structure change diff --git a/lib/Mail/Milter/Authentication/Handler/RBLDNS.pm b/lib/Mail/Milter/Authentication/Handler/RBLDNS.pm index dddeceb0..3b5b9f48 100644 --- a/lib/Mail/Milter/Authentication/Handler/RBLDNS.pm +++ b/lib/Mail/Milter/Authentication/Handler/RBLDNS.pm @@ -50,8 +50,8 @@ sub register_metrics { sub setup_callback { my ($self) = @_; - my $config = $self->handler_config(); - $config = $config->{rbls} if exists $config->{rbls}; + my $handler_config = $self->handler_config(); + $config = $handler_config->{rbls} // {}; foreach my $rbl ( sort keys $config->%* ) { my $sanitize_header = $config->{$rbl}->{sanitize_header} // 'yes'; $self->add_header_to_sanitize_list(lc $config->{$rbl}->{add_header}, $sanitize_header eq 'silent') if $config->{$rbl}->{add_header} && $sanitize_header ne 'no'; @@ -61,8 +61,8 @@ sub setup_callback { sub connect_callback { my ( $self, $hostname, $ip ) = @_; - my $config = $self->handler_config(); - $config = $config->{rbls} if exists $config->{rbls}; + my $handler_config = $self->handler_config(); + $config = $handler_config->{rbls} // {}; my @states;