From 0d911852ad04970ef93f08f772622f8d4c27e837 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Wed, 27 Jun 2012 03:21:22 -0400 Subject: [PATCH] rhsbl: make sure $transaction->sender defined before accessing it --- plugins/rhsbl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/rhsbl b/plugins/rhsbl index a8708a2..6f0a43a 100644 --- a/plugins/rhsbl +++ b/plugins/rhsbl @@ -103,9 +103,11 @@ sub hook_mail { $self->log(LOGINFO, "fail, $result"); - my $host = $transaction->sender->host; - if ($result =~ /^$host\./ ) { - return $self->get_reject( "Mail from $host rejected because it $result" ); + if ( $transaction->sender ) { + my $host = $transaction->sender->host; + if ($result =~ /^$host\./ ) { + return $self->get_reject( "Mail from $host rejected because it $result" ); + }; }; my $hello = $self->qp->connection->hello_host;