diff --git a/plugins/check_badmailfrom b/plugins/check_badmailfrom index 2d0e3e1..70e8292 100644 --- a/plugins/check_badmailfrom +++ b/plugins/check_badmailfrom @@ -7,10 +7,10 @@ sub register { } sub mail_handler { - my ($self, $transaction, $recipient) = @_; - return (DECLINED) unless $recipient->host && $recipient->user; - my $host = lc $recipient->host; - my $from = $recipient->user . '@' . $host; + my ($self, $transaction, $sender) = @_; + return (DECLINED) unless $sender->host && $sender->user; + my $host = lc $sender->host; + my $from = $sender->user . '@' . $host; my @badmailfrom = $self->qp->config("badmailfrom"); for my $bad (@badmailfrom) { $bad =~ s/^\s*(\S+)/$1/;