microoptimizations - replace regex with lc eq
This commit is contained in:
parent
1002d0dd56
commit
e37f14b9a6
@ -88,7 +88,7 @@ sub hook_data_post {
|
|||||||
# Find the sender, and return unless it wasn't a bounce.
|
# Find the sender, and return unless it wasn't a bounce.
|
||||||
#
|
#
|
||||||
my $sender = $transaction->sender->address || undef;
|
my $sender = $transaction->sender->address || undef;
|
||||||
return DECLINED unless ($sender =~ /^<>$/);
|
return DECLINED unless ($sender eq "<>");
|
||||||
|
|
||||||
#
|
#
|
||||||
# Get the recipients.
|
# Get the recipients.
|
||||||
@ -102,15 +102,15 @@ sub hook_data_post {
|
|||||||
# 1. It is a bounce, via the null-envelope.
|
# 1. It is a bounce, via the null-envelope.
|
||||||
# 2. It is a bogus bounce, because there are more than one recipients.
|
# 2. It is a bogus bounce, because there are more than one recipients.
|
||||||
#
|
#
|
||||||
if ($self->{_action} =~ /^log$/i) {
|
if (lc $self->{_action} eq "log") {
|
||||||
$self->log(LOGWARN,
|
$self->log(LOGWARN,
|
||||||
$self->plugin_name() . " bogus bounce for :" . join(",", @to));
|
$self->plugin_name() . " bogus bounce for :" . join(",", @to));
|
||||||
}
|
}
|
||||||
elsif ($self->{_action} =~ /^deny$/i) {
|
elsif (lc $self->{_action} eq "deny") {
|
||||||
return (DENY,
|
return (DENY,
|
||||||
$self->plugin_name() . " determined this to be a bogus bounce");
|
$self->plugin_name() . " determined this to be a bogus bounce");
|
||||||
}
|
}
|
||||||
elsif ($self->{_action} =~ /^denysoft$/i) {
|
elsif (lc $self->{_action} eq "denysoft") {
|
||||||
return (DENYSOFT,
|
return (DENYSOFT,
|
||||||
$self->plugin_name() . " determined this to be a bogus bounce");
|
$self->plugin_name() . " determined this to be a bogus bounce");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user