[svn:qpsmtpd] r608 - trunk/plugins/auth
[email protected] 27 Jan 2006 21:13:44 -0000
| Newsgroups | perl.cvs.qpsmtpd |
|---|---|
| Message-ID | <[email protected]> |
Author: jpeacock
Date: Fri Jan 27 13:13:43 2006
New Revision: 608
Modified:
trunk/plugins/auth/auth_vpopmail_sql
Log:
Make DBI->connect() failure more obvious, but don't prevent mail
being sent by other rules (if the client will fall back).
Modified: trunk/plugins/auth/auth_vpopmail_sql
==============================================================================
--- trunk/plugins/auth/auth_vpopmail_sql (original)
+++ trunk/plugins/auth/auth_vpopmail_sql Fri Jan 27 13:13:43 2006
@@ -60,7 +60,8 @@ sub authsql {
use DBI;
use Qpsmtpd::Constants;
use Digest::HMAC_MD5 qw(hmac_md5_hex);
-
+ my ( $self, $transaction, $method, $user, $passClear, $passHash, $ticket )
+ = @_;
# $DB::single = 1;
my $connect = "dbi:mysql:dbname=vpopmail";
@@ -69,10 +70,11 @@ sub authsql {
my $dbh = DBI->connect( $connect, $dbuser, $dbpasswd,
{ PrintError => 0, } )
- or return DECLINED;
+ or (
+ $self->log(LOGERROR, $DBI::errstr)
+ and return DECLINED
+ );
- my ( $self, $transaction, $method, $user, $passClear, $passHash, $ticket ) =
- @_;
my ( $pw_name, $pw_domain ) = split "@", lc($user);
unless ( defined $pw_domain ) {