From aee624bbc083762e6c9cce724b08cb89b73a3741 Mon Sep 17 00:00:00 2001 From: Dominik Meyer Date: Tue, 2 Jan 2024 23:53:41 +0100 Subject: [PATCH] ADD: more tests --- plugins/rcpt_mysql | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/plugins/rcpt_mysql b/plugins/rcpt_mysql index 6da140e..4251eb9 100644 --- a/plugins/rcpt_mysql +++ b/plugins/rcpt_mysql @@ -29,7 +29,6 @@ sub init { $self->createQuery(); $self->createDSN(); - $self->tryToConnect(); } sub createDSN @@ -85,27 +84,6 @@ sub createQuery $self->log(LOGDEBUG, "created query " . $self->{sqlquery}); } -sub tryToConnect -{ - my $self = shift; - - my $dsn = $self->{dsn}; - my $user = $self->{user}; - my $pass = $self->{pass}; - - $self->log(LOGDEBUG, "DSN try:" . $dsn); - - my $dbh = DBI->connect($dsn, $user , $pass ); - - if ($dbh->err()) - { - $self->log(LOGERROR, "error connecting to DB: " . $dbh->errstr()); - return DECLINED; - } - - $dbh->disconnect; -} - sub prepareParams { my $self = shift;