Re: [vchkpw] Strange error messages

2007-05-20 Thread Rick Widmer
I'm not sure what version you are trying this with.  I just tested it 
with the unreleased version in CVS and it is working.  I don't know that 
I fixed anything, but in the process I updated some of the error 
reporting, including the fact that vdeluser checked for the user before 
the domain.  Now if you try to attempt to delete a user from a 
non-existent domain it reports that the domain doesn't exist rather than 
the user.



#vadddomain test.domain password
ONCHANGE add_domain - test.domain

#vadddomain test.domain password
Error: Domain already exists

#vadduser [EMAIL PROTECTED] password
ONCHANGE add_user - [EMAIL PROTECTED]

#vadduser [EMAIL PROTECTED] password
Error: Username exists

#vdeluser [EMAIL PROTECTED] password
ONCHANGE del_user - [EMAIL PROTECTED]

#vdeluser [EMAIL PROTECTED] password
Error: User does not exist

#vdeldomain test.domain
ONCHANGE del_domain - test.domain

#vdeldomain test.domain
Error: Domain does not exist

#vdeluser [EMAIL PROTECTED] password
Error: Domain does not exist


This DOES NOT mean CVS is ready for use, or release, only that I don't 
see this bug in CVS.


What version are you using?

Rick



Jonathan wrote:
That's the strange thing. They're both removed from the vpopmail 
directory and the MySQL db.


16 maj 2007 kl. 02.32 skrev Remo Mattei:



Jonathan wrote:

This is the exact procedure:

# vadddomain test.domain
Please enter password for postmaster:
enter password again:
# vadduser [EMAIL PROTECTED]
Please enter password for [EMAIL PROTECTED]:
enter password again:
# vdeluser [EMAIL PROTECTED]
Failed to delete user from auth backend
Error: Illegal username
# vdeldomain test.domain
Warning: Failed while attempting to delete domain from auth backend




[vchkpw] Strange error messages

2007-05-16 Thread Jonathan

Hi,

When i try to vdeluser i get

Failed to delete user from auth backend
Error: Illegal username

and when i try to vdeldomain i get

Warning: Failed while attempting to delete domain from auth backend

However, both the user and the domain seem to be removed, and can be  
readded without trouble.


Should i care about these errors or can i let them be?


Re: [vchkpw] Strange error messages

2007-05-16 Thread Remo Mattei
you need to use the [EMAIL PROTECTED] otherwise it fails unless the user is 
part of
the default domain.

Remo

Jonathan wrote:
 Hi,

 When i try to vdeluser i get

 Failed to delete user from auth backend
 Error: Illegal username

 and when i try to vdeldomain i get

 Warning: Failed while attempting to delete domain from auth backend

 However, both the user and the domain seem to be removed, and can be
 readded without trouble.

 Should i care about these errors or can i let them be?

 !DSPAM:464adf3b88131740420799!




-- 
Remo Mattei


Re: [vchkpw] Strange error messages

2007-05-16 Thread Jonathan

This is the exact procedure:

# vadddomain test.domain
Please enter password for postmaster:
enter password again:
# vadduser [EMAIL PROTECTED]
Please enter password for [EMAIL PROTECTED]:
enter password again:
# vdeluser [EMAIL PROTECTED]
Failed to delete user from auth backend
Error: Illegal username
# vdeldomain test.domain
Warning: Failed while attempting to delete domain from auth backend


16 maj 2007 kl. 00.51 skrev Remo Mattei:

you need to use the [EMAIL PROTECTED] otherwise it fails unless the user  
is part of

the default domain.

Remo

Jonathan wrote:

Hi,

When i try to vdeluser i get

Failed to delete user from auth backend
Error: Illegal username

and when i try to vdeldomain i get

Warning: Failed while attempting to delete domain from auth backend

However, both the user and the domain seem to be removed, and can be
readded without trouble.

Should i care about these errors or can i let them be?

!DSPAM:464adf3b88131740420799!





--
Remo Mattei


Re: [vchkpw] Strange error messages

2007-05-16 Thread Remo Mattei

Jonathan wrote:
 This is the exact procedure:

 # vadddomain test.domain
 Please enter password for postmaster:
 enter password again:
 # vadduser [EMAIL PROTECTED]
 Please enter password for [EMAIL PROTECTED]:
 enter password again:
 # vdeluser [EMAIL PROTECTED]
 Failed to delete user from auth backend
 Error: Illegal username
 # vdeldomain test.domain
 Warning: Failed while attempting to delete domain from auth backend


 16 maj 2007 kl. 00.51 skrev Remo Mattei:

 you need to use the [EMAIL PROTECTED] otherwise it fails unless the user
 is part of
 the default domain.

 Remo

 Jonathan wrote:
 Hi,

 When i try to vdeluser i get

 Failed to delete user from auth backend
 Error: Illegal username

 and when i try to vdeldomain i get

 Warning: Failed while attempting to delete domain from auth backend

 However, both the user and the domain seem to be removed, and can be
 readded without trouble.

 Should i care about these errors or can i let them be?






 --
 Remo Mattei

 !DSPAM:464af030215971336712104!



did you check your MYSQL if the user still exist or if it's created? By just
checking this I would guess you may not have the right permission on MYSQL for
the user settings.


-- 
Remo Mattei


Re: [vchkpw] Strange error messages

2007-05-16 Thread Jonathan
That's the strange thing. They're both removed from the vpopmail  
directory and the MySQL db.


16 maj 2007 kl. 02.32 skrev Remo Mattei:



Jonathan wrote:

This is the exact procedure:

# vadddomain test.domain
Please enter password for postmaster:
enter password again:
# vadduser [EMAIL PROTECTED]
Please enter password for [EMAIL PROTECTED]:
enter password again:
# vdeluser [EMAIL PROTECTED]
Failed to delete user from auth backend
Error: Illegal username
# vdeldomain test.domain
Warning: Failed while attempting to delete domain from auth backend


16 maj 2007 kl. 00.51 skrev Remo Mattei:


you need to use the [EMAIL PROTECTED] otherwise it fails unless the user
is part of
the default domain.

Remo

Jonathan wrote:

Hi,

When i try to vdeluser i get

Failed to delete user from auth backend
Error: Illegal username

and when i try to vdeldomain i get

Warning: Failed while attempting to delete domain from auth  
backend


However, both the user and the domain seem to be removed, and  
can be

readded without trouble.

Should i care about these errors or can i let them be?







--
Remo Mattei


!DSPAM:464af030215971336712104!




did you check your MYSQL if the user still exist or if it's  
created? By just
checking this I would guess you may not have the right permission  
on MYSQL for

the user settings.


--
Remo Mattei


Re: [vchkpw] Strange Error

2004-06-07 Thread Rick Widmer

François Wautier wrote:
Hi,
Duly noting the near absolute lack of interest in my previous email (Only 
Devendra Singh  responded indicating he had the same problem),  I decided to 
go and figure out things my way.
Good job.  I use CDB, and don't know enough about using MySQL with 
vpopmail to find something like that.  Unless someone objects I plan to 
put this in HEAD, and suggest it go into the stable branch too.

I like the fact that this patch separates hard errors from soft errors, 
checking first if it can open the database connection at all and 
aborting on failure.  It works well with the changes in error handling 
that I am working on.

I wish I understood the base problem better, I don't know if we are just 
covering up a database problem.  You are sure you aren't running out of 
MySQL children at peak loads, right?  Being on the border of having too 
many requests for the number of MySQL children allowed could cause what 
you are seeing.

Even if that turns out to be your real problem I think this is a better 
way to handle opening the database.  I have posted the patch on 
SourceFORGE.  [967994]

Rick


Re: [vchkpw] Strange Error

2004-06-07 Thread François Wautier
Rick,

 François Wautier wrote:
  Hi,
 
  Duly noting the near absolute lack of interest in my previous email (Only
  Devendra Singh  responded indicating he had the same problem),  I decided
  to go and figure out things my way.

 Good job.  I use CDB, and don't know enough about using MySQL with
 vpopmail to find something like that.  Unless someone objects I plan to
 put this in HEAD, and suggest it go into the stable branch too.

 I like the fact that this patch separates hard errors from soft errors,
 checking first if it can open the database connection at all and
 aborting on failure.  It works well with the changes in error handling
 that I am working on.


I thought it made sense too.

 I wish I understood the base problem better, I don't know if we are just
 covering up a database problem.  

Could be... but is unlikely.

 You are sure you aren't running out of 
 MySQL children at peak loads, right?  Being on the border of having too
 many requests for the number of MySQL children allowed could cause what
 you are seeing.


I don't really have any load to speak of. And if the problem was that, I think 
the client would not connect, not report Lost connection to MySQL server 
during query. 

I would also get more complains from the websites not being able to get the 
data.

In any case, my simplistic patch  does handle that type of problem better.

Cheers,
François

 Even if that turns out to be your real problem I think this is a better
 way to handle opening the database.  I have posted the patch on
 SourceFORGE.  [967994]

 Rick


Re: [vchkpw] Strange Error

2004-06-06 Thread François Wautier
Hi,

Duly noting the near absolute lack of interest in my previous email (Only 
Devendra Singh  responded indicating he had the same problem),  I decided to 
go and figure out things my way.

At first, I wrote a small script that would look for the Delivered-To line 
emails found in the catch-all account and would redirect them 
appropriately.

But that was too much of a hack, so I did look at the problem itself.

And now, the end is near and so I face the final problem. My Friends, I'll say 
it clear, I'll state my case, I'm almost certain. I've looked the source in 
full, I've followed each and every pathway. But more, I found the bug and 
killed it my way.

In vmysql.c, the function vauth_open_update works like this

If (NOT OK(Connect to given Host/Database) {
   If( OK (Connect to given Host)
Create the Database;
} else Complain
   } else Use it.

The initial test is done using the 
mysql_real_connect function

When given both a Host and a Database (+ user name, password and so on) It 
sometimes fails. The reason stated being Lost connection to MySQL server 
during query. The subsequent connect, without a DB name, succeeding, the 
system tries to create the (already existing) database... and it's all 
downhill from there.

The change I made was to to change the logic to

If(Not OK(Connect to given host)
Complain and return

If(Not OK (Select given Database)
Created it and select it

Use it.


And, in my case at leat, it solved the problem.

I do not know why the problem occurred with the apparently correct original 
code, all I can say is that I now longer have the problem I described before.

I attache a patch in case someone is foolhardy enough to try it.


Cheers,
François

 Hi,

 I am new to this list.

 I recently installed on a Gentoo linux

   qmail  1.03 (r13)
   vpopmail 5.4.0
   maildrop 1.5.3
   qmail-scanner 1.16  ( With some modifs)


 Everything was working well until today.

 Today, I took my local domain and made it a virtual domain on my hosts.

 Things are mostly working, but every now and then I get the following error
 message

 @400040b3436602b4f094 delivery 2035: success:
 vmysql:_sql_error[1]:_Can't_create_database_'vpopmail'._Database_exists/vmy
sql:_sql_error[3]:
 _No_Database_Selected/could_not_create_limits_table_CREATE_TABLE_limits_(_d
  The whole SQL query..
 _No_Database_Selected/user_does_not_exist,but_will_deliver_to_/var/vpopmail
/domains/mydomain/mycatchall/


 Because I have a catchall account, the emails get delivered there instead
 of the correct mailbox. I can see that the Delivered-To header is set to
 the correct user.   I can't seem to find a pattern in the occurrence of the
 problem  The only thing is that I get the feeling it is related to the use
 of aliases  ( .qmaol-myalias)  but I am not sure.

 Has anyone experienced the same problem? Has anyone found a solution?

 Thanks
   François Wautier
diff -ru vpopmail-5.4.0/vmysql.c vpopmail-5.4.0-fw1/vmysql.c
--- vpopmail-5.4.0/vmysql.c	2004-01-14 06:56:41.0 +0700
+++ vpopmail-5.4.0-fw1/vmysql.c	2004-06-06 16:10:54.848660760 +0700
@@ -203,41 +203,36 @@
 mysql_init(mysql_update);
 mysql_options(mysql_update, MYSQL_OPT_CONNECT_TIMEOUT, (char *)timeout);
 
-/* Try to connect to the mysql update server with the specified database. */
+/* Try to connect to the mysql update server */
 if (!(mysql_real_connect(mysql_update, MYSQL_UPDATE_SERVER,
-MYSQL_UPDATE_USER, MYSQL_UPDATE_PASSWD,
-MYSQL_UPDATE_DATABASE, MYSQL_UPDATE_PORT, NULL, 0))) {
-
-/* Could not connect to the update mysql server with the database
- * so try to connect with no database specified
- */
-if (!(mysql_real_connect(mysql_update, MYSQL_UPDATE_SERVER,
-MYSQL_UPDATE_USER, MYSQL_UPDATE_PASSWD, NULL, MYSQL_UPDATE_PORT,
-NULL, 0))) {
-
-/* if we can not connect, report a error and return */
-verrori = VA_NO_AUTH_CONNECTION;
-return(VA_NO_AUTH_CONNECTION);
-}
-
-/* we were able to connect, so create the database */ 
-snprintf( SqlBufUpdate, SQL_BUF_SIZE, 
-create database %s, MYSQL_UPDATE_DATABASE );
-if (mysql_query(mysql_update,SqlBufUpdate)) {
-
-/* we could not create the database
- * so report the error and return 
- */
-fprintf(stderr, vmysql: sql error[1]: %s\n, mysql_error(mysql_update));
-return(-1);
-} 
-
-/* set the database */ 
-if (mysql_select_db(mysql_update, MYSQL_UPDATE_DATABASE)) {
-fprintf(stderr, could not enter %s database\n, MYSQL_UPDATE_DATABASE);
-return(-1);
-}
+			 MYSQL_UPDATE_USER, MYSQL_UPDATE_PASSWD, NULL, 

Re: [vchkpw] Strange Error

2004-05-27 Thread Devendra Singh
At 25/05/04 18:44 (), François Wautier wrote:
Hi,
I am new to this list.
I recently installed on a Gentoo linux
qmail  1.03 (r13)
vpopmail 5.4.0
maildrop 1.5.3
qmail-scanner 1.16  ( With some modifs)
Everything was working well until today.
Today, I took my local domain and made it a virtual domain on my hosts.
Things are mostly working, but every now and then I get the following error
message
@400040b3436602b4f094 delivery 2035: success:
vmysql:_sql_error[1]:_Can't_create_database_'vpopmail'._Database_exists/vmysql:_sql_error[3]:
_No_Database_Selected/could_not_create_limits_table_CREATE_TABLE_limits_(_d
 The whole SQL query..
_No_Database_Selected/user_does_not_exist,but_will_deliver_to_/var/vpopmail/domains/mydomain/mycatchall/
Because I have a catchall account, the emails get delivered there 
instead of
the correct mailbox. I can see that the Delivered-To header is set to the
correct user.   I can't seem to find a pattern in the occurrence of the
problem  The only thing is that I get the feeling it is related to the use of
aliases  ( .qmaol-myalias)  but I am not sure.

Has anyone experienced the same problem? Has anyone found a solution?
Thanks
François Wautier
I too see this problem from time to time on two different Servers. But, to 
date I have not been able to understand the Problem.

Devendra Singh

__
Devendra Singh
IndiaMART InterMESH Limited
(Global Gateway to Indian Market Place)
B-1, Sector 8, Noida, UP - 201301, India
EPABX : +91-120-2424945, +91-120-3094634, +91-9810646342
Fax: +91-120-2424943
http://www.indiamart.com
http://www.indiangiftsportal.com
http://www.indiantravelportal.com
__ 



[vchkpw] Strange Error

2004-05-25 Thread François Wautier

Hi,

I am new to this list.

I recently installed on a Gentoo linux

qmail  1.03 (r13)
vpopmail 5.4.0
maildrop 1.5.3
qmail-scanner 1.16  ( With some modifs)


Everything was working well until today.  

Today, I took my local domain and made it a virtual domain on my hosts.

Things are mostly working, but every now and then I get the following error 
message

@400040b3436602b4f094 delivery 2035: success: 
vmysql:_sql_error[1]:_Can't_create_database_'vpopmail'._Database_exists/vmysql:_sql_error[3]:
_No_Database_Selected/could_not_create_limits_table_CREATE_TABLE_limits_(_d
 The whole SQL query..
_No_Database_Selected/user_does_not_exist,but_will_deliver_to_/var/vpopmail/domains/mydomain/mycatchall/


Because I have a catchall account, the emails get delivered there instead of 
the correct mailbox. I can see that the Delivered-To header is set to the 
correct user.   I can't seem to find a pattern in the occurrence of the 
problem  The only thing is that I get the feeling it is related to the use of 
aliases  ( .qmaol-myalias)  but I am not sure.

Has anyone experienced the same problem? Has anyone found a solution?

Thanks
François Wautier