From c6918d10ca76fbf9ddde1eed62075d46f7cd32d4 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Sun, 4 Jan 2015 17:10:26 -0800 Subject: [PATCH] remove instances of: use lib 'lib' in lib/ and plugins/ --- lib/Qpsmtpd/Config.pm | 1 - lib/Qpsmtpd/Plugin.pm | 1 - lib/Qpsmtpd/SMTP.pm | 1 - plugins/dmarc | 7 ++++--- plugins/dspam | 2 -- plugins/ident/geoip | 1 - plugins/resolvable_fromhost | 1 - plugins/uribl | 1 - 8 files changed, 4 insertions(+), 11 deletions(-) diff --git a/lib/Qpsmtpd/Config.pm b/lib/Qpsmtpd/Config.pm index f628351..b918ed9 100644 --- a/lib/Qpsmtpd/Config.pm +++ b/lib/Qpsmtpd/Config.pm @@ -4,7 +4,6 @@ use warnings; use Sys::Hostname; -use lib 'lib'; use parent 'Qpsmtpd::Base'; use Qpsmtpd::Constants; diff --git a/lib/Qpsmtpd/Plugin.pm b/lib/Qpsmtpd/Plugin.pm index bce8d8e..72441d5 100644 --- a/lib/Qpsmtpd/Plugin.pm +++ b/lib/Qpsmtpd/Plugin.pm @@ -2,7 +2,6 @@ package Qpsmtpd::Plugin; use strict; use warnings; -use lib 'lib'; use parent 'Qpsmtpd::Base'; use Qpsmtpd::DB; use Qpsmtpd::Constants; diff --git a/lib/Qpsmtpd/SMTP.pm b/lib/Qpsmtpd/SMTP.pm index 1bee2ac..bf49fb2 100644 --- a/lib/Qpsmtpd/SMTP.pm +++ b/lib/Qpsmtpd/SMTP.pm @@ -1,7 +1,6 @@ package Qpsmtpd::SMTP; use strict; -#use lib 'lib'; use parent 'Qpsmtpd'; #use Data::Dumper; diff --git a/plugins/dmarc b/plugins/dmarc index fde40c2..196f76f 100644 --- a/plugins/dmarc +++ b/plugins/dmarc @@ -72,7 +72,6 @@ https://github.com/smtpd/qpsmtpd/wiki/DMARC-FAQ use strict; use warnings; -use Data::Dumper; use Qpsmtpd::Constants; sub register { @@ -85,7 +84,7 @@ sub register { $self->{_args}{reject_type} ||= 'perm'; $self->{_args}{p_vals} = {map { $_ => 1 } qw/ none reject quarantine /}; - eval "require Mail::DMARC::PurePerl"; + eval 'require Mail::DMARC::PurePerl'; if ( $@ ) { $self->log(LOGERROR, "failed to load Mail::DMARC::PurePerl" ); } @@ -120,7 +119,9 @@ sub data_post_handler { eval { $dmarc->envelope_from( $transaction->sender->host ); }; # may be <> $dmarc->spf( $transaction->notes('dmarc_spf') ); my $dkim = $self->connection->notes('dkim_verifier'); - if ( $dkim ) { $dmarc->dkim( $dkim ); }; + if ( $dkim ) { + eval { $dmarc->dkim( $dkim ); } + }; $dmarc->source_ip( $self->qp->connection->remote_ip ); eval { $dmarc->validate(); }; if ( $@ ) { diff --git a/plugins/dspam b/plugins/dspam index 295fcdf..d629bd4 100644 --- a/plugins/dspam +++ b/plugins/dspam @@ -200,8 +200,6 @@ ie, (Trust smtpd). use strict; use warnings; -use lib 'lib'; - use Qpsmtpd::Constants; use Qpsmtpd::DSN; use IO::Handle; diff --git a/plugins/ident/geoip b/plugins/ident/geoip index 53e81fe..ea8df11 100644 --- a/plugins/ident/geoip +++ b/plugins/ident/geoip @@ -123,7 +123,6 @@ http://smartech.gatech.edu/bitstream/handle/1853/25135/GT-CSE-08-02.pdf use strict; use warnings; -use lib 'lib'; use Qpsmtpd::Constants; #use GeoIP2; # eval'ed in register() diff --git a/plugins/resolvable_fromhost b/plugins/resolvable_fromhost index 8bc610e..c9bafff 100644 --- a/plugins/resolvable_fromhost +++ b/plugins/resolvable_fromhost @@ -70,7 +70,6 @@ Default: temp (temporary, aka soft, aka 4xx). use strict; use warnings; -use lib 'lib'; use Qpsmtpd::Constants; use Qpsmtpd::DSN; use Qpsmtpd::TcpServer; diff --git a/plugins/uribl b/plugins/uribl index 02fbc9d..43ba696 100644 --- a/plugins/uribl +++ b/plugins/uribl @@ -92,7 +92,6 @@ may be used and redistributed under the same terms as qpsmtpd itself. use strict; use warnings; -use lib 'lib'; use Qpsmtpd::Constants; use Time::HiRes qw(time);