From 77272ba095e1795bc0d18a2c1e4d13a1f6aadabe Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Sat, 23 Mar 2013 02:12:06 -0400 Subject: [PATCH] whitelist: add +5 karma to whitelisted IPs --- plugins/whitelist | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/whitelist b/plugins/whitelist index 549dea1..76797ce 100644 --- a/plugins/whitelist +++ b/plugins/whitelist @@ -1,3 +1,4 @@ +#!perl -w =head1 NAME @@ -97,7 +98,6 @@ automatically allow relaying from that IP. use strict; use warnings; -use lib 'lib'; use Qpsmtpd::Constants; my $VERSION = 0.02; @@ -138,7 +138,8 @@ sub check_host { # From tcpserver if (exists $ENV{WHITELISTCLIENT}) { $self->qp->connection->notes('whitelistclient', 1); - $self->log(2, "pass, host $ip is a whitelisted client"); + $self->log(2, "pass, is whitelisted client"); + $self->adjust_karma( 5 ); return OK; } @@ -146,7 +147,8 @@ sub check_host { for my $h ($self->qp->config('whitelisthosts', $config_arg)) { if ($h eq $ip or $ip =~ /^\Q$h\E/) { $self->qp->connection->notes('whitelisthost', 1); - $self->log(2, "pass, host $ip is a whitelisted host"); + $self->log(2, "pass, is a whitelisted host"); + $self->adjust_karma( 5 ); return OK; } }