diff --git a/plugins/rcpt_mysql b/plugins/rcpt_mysql index a489898..caa23fc 100644 --- a/plugins/rcpt_mysql +++ b/plugins/rcpt_mysql @@ -196,7 +196,9 @@ sub askDatabase return DECLINED; } - my $dbh = DBI::connect($self->{dsn}, $self->{user}, $self->{pass}); + my $dsn = $self->{dsn}; + + my $dbh = DBI::connect($dsn, $self->{user}, $self->{pass},{ RaiseError => 1, PrintError => 0 }); if ($dbh->err()) { @@ -208,7 +210,7 @@ sub askDatabase if ($sth->err()) { $self->log(LOGERROR, "error preparing query: " . $sth->errstr()); - return DECLINED; + return DECLINED ; } $sth->execute($self->prepareParams($recipient));