I have done this by using a global variable which is set to 1 in the
function vauth_getpw when there are no records found for this user
i.e.

if (mysql_num_rows(res) == 0)
        {
                permanent_error = 1;
                return (NULL);
        }

in the vdelivermail.c i then use this variable permanent_error to defer the
mail if the variable permanent_error is  not 1.

Regards Manny

----- Original Message -----
From: "Ken Jones" <[EMAIL PROTECTED]>
To: "Troy Settle" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, July 09, 2001 7:29 PM
Subject: Re: Deferral on database failure


> Troy Settle wrote:
> >
> > All,
> >
> > In searching through the archives, I found this posting from Ken last
> > October:
> >
> > > > We are thinking to upgrade to the new version of Vpopmail because
the
> > > > old one(currently installed vpopmail) has one critical bug in the
> > > > current version we are using needs to be addressed is that mail
> > > > bounces when vdelivermail can't connect to MySQL for whatever reason
> > > > (usually because MySQL is down or busy).
> > >
> > > Hmm.. That's an interesting point. If vdelivermail can't retrieve
> > > a users information because it can't connect to the database, it
> > > should cause a deferral. I'll put that on the TODO list.
> >
> > Has this been done?  I don't see it in the TODO list or Changelog
(4.9.10).
> > If not, what would it take to get it done?
>
> No it has not been done. The error return code from
> the function in questino, vauth_getpw only returns
> NULL (for use not found) and a value (for a user found)
> There is no other error types. If we changed it to
> return a -1, for example, it may break other code.
> It could return an OutOfBand error, in a global
> error variable.
>
> What would be the best way to do this?
> 1) Have vauth_getpw return -1 and review all the code
>    using vauth_getpw
> or
> 2) return an out of band error value?
>
> Ken Jones


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

Reply via email to