Re: [vchkpw] vdeluser isCatchall mysql segfault (was Re: [vchkpw] Decided to make the plunge today on late version of vpopmail)

2007-09-15 Thread Rick Widmer



Marcello Lupo wrote:

Hi,
i agree with your method to bybass the problem but in this way you will 
be able to delete a catch all account

for the domain without notice.


This is pretty much what I did for now...

I think the best is to fix this issue making possible that the default 
alias is inserted in the valias table like the others
(if you use aliases in database), or to let the function check both file 
and database.


Exactly.  It needs to check for a .qmail file first since that is how 
qmail itself handles the situation, and I don't want to mess with that. 
 For all aliases, valias needs to check for a file first and if it is 
found manage the alias in the file.  If there is no existing file then 
it can go to the database.


The work actually needs to be done in valias, but I don't want to do 
anything there until I have a nice stable release for people to stick 
with while I add some new features.


Rick


Re: [vchkpw] Decided to make the plunge today on late version of vpopmail

2007-09-07 Thread Rick Widmer



Quey wrote:

Rick on a kind of related note, did you see one of my posts in the thread:
adduser processing times CDB from 27th of the 7th ?


Looking at that thread...

slow loading of users:

I have added a note in the TODO to add an -O option to vadduser like the 
option in vadddomain, so it can only update the .cdb file once at the 
end of a batch of adds.  Right now I'm pretty sure the .cdb is updated 
for each one.



Missing some files in vdeldomain:

The current code uses unlink(),  I don't think I want to do anything 
more when deleting files.  Considering that you had to e2fsck the disk 
I'm not sure I could.  I don't believe vpopmail ever creates files or 
directories with a ? in the name and have no idea where they may have 
come from.



Learn-Password:

learn-password can be turned on at any time with /configure; make; make 
install.  Be sure to re-compile everything that uses vpopmail


Rick


[vchkpw] vdeluser isCatchall mysql segfault (was Re: [vchkpw] Decided to make the plunge today on late version of vpopmail)

2007-09-07 Thread Japheth Cleaver
 Hi Steve,

 i think the problem is related to something i posted some days ago but
 without any answer.

 Look at the post :

 Re: [vchkpw] vdeluser segfault posted on 19/08/2007 be my answering
 to a previous post.

 Let me know if it is the case.
 Bye,
 Marcello

 Steve Cole wrote:
 On two (low volume) machines with vpopmail interfaced with mysql as the
 data
 store, it seemed to work successfully.  I updated the database schema
 with no
 issues.  This is with v5.4.21

 However, when I do a vdeluser on either machine, the program
 segfaults.  On
 both systems.

 I tried various things like making sure my LDFLAGS= and CFLAGS=-O
 only to
 be sure it wasn't a compiler issue, without luck.

 So, to be clear, this is on two Debian Etch machines with GCC 4.1.1-15
 and
 MySQL 5.0.32-7etch1 installed.

 Going back to 5.4.17 seemed to be no issue at all and of course, it
 works as
 expected.



I would concur. From a cursory look at the logic, I don't see how this
really works when using MySQL aliases. I commented out the entire catchall
check when moving to 5.4.19 simply to keep things working.


Regards,
-jc


--- vpopmail.c.orig 2007-08-23 16:46:31.0 -0700
+++ vpopmail.c  2007-08-23 17:03:51.0 -0700
@@ -1733,9 +1733,9 @@
   }

   /* Make sure we are not the email address of the catchall account */
-  if ( isCatchall( user, domain, Dir )) {
-return(VA_CANNOT_DELETE_CATCHALL);
-}
+  // if ( isCatchall( user, domain, Dir )) {
+  //  return(VA_CANNOT_DELETE_CATCHALL);
+  //  }

 #ifdef ONCHANGE_SCRIPT
   /* tell other programs that data has changed */





Re: [vchkpw] Decided to make the plunge today on late version of vpopmail

2007-09-07 Thread Marcello Lupo

Hi Steve,

i think the problem is related to something i posted some days ago but 
without any answer.


Look at the post :

Re: [vchkpw] vdeluser segfault posted on 19/08/2007 be my answering 
to a previous post.


Let me know if it is the case.
Bye,
Marcello

Steve Cole wrote:
On two (low volume) machines with vpopmail interfaced with mysql as the data 
store, it seemed to work successfully.  I updated the database schema with no 
issues.  This is with v5.4.21


However, when I do a vdeluser on either machine, the program segfaults.  On 
both systems.


I tried various things like making sure my LDFLAGS= and CFLAGS=-O only to 
be sure it wasn't a compiler issue, without luck.


So, to be clear, this is on two Debian Etch machines with GCC 4.1.1-15 and 
MySQL 5.0.32-7etch1 installed.  

Going back to 5.4.17 seemed to be no issue at all and of course, it works as 
expected.


  




Re: [vchkpw] vdeluser isCatchall mysql segfault (was Re: [vchkpw] Decided to make the plunge today on late version of vpopmail)

2007-09-07 Thread Rick Widmer
Can someone who can see it fail please send me your ./configure options 
so maybe I can make it fail here?



Rick

Marcello Lupo wrote:

Hi,
i agree with your method to bybass the problem but in this way you will 
be able to delete a catch all account

for the domain without notice.
I think the best is to fix this issue making possible that the default 
alias is inserted in the valias table like the others
(if you use aliases in database), or to let the function check both file 
and database.
Moreover if it don't found the default alias in the database (this is 
what happen now) it should segfault but assume

that the account is not catchall.
I'm not a coder and i'm not able to do it.

Bye,
Marcello


Japheth Cleaver wrote:

Hi Steve,

i think the problem is related to something i posted some days ago but
without any answer.

Look at the post :

Re: [vchkpw] vdeluser segfault posted on 19/08/2007 be my answering
to a previous post.

Let me know if it is the case.
Bye,
Marcello

Steve Cole wrote:
   

On two (low volume) machines with vpopmail interfaced with mysql as the
data
store, it seemed to work successfully.  I updated the database schema
with no
issues.  This is with v5.4.21

However, when I do a vdeluser on either machine, the program
segfaults.  On
both systems.

I tried various things like making sure my LDFLAGS= and CFLAGS=-O
only to
be sure it wasn't a compiler issue, without luck.

So, to be clear, this is on two Debian Etch machines with GCC 4.1.1-15
and
MySQL 5.0.32-7etch1 installed.

Going back to 5.4.17 seemed to be no issue at all and of course, it
works as
expected.

  



I would concur. From a cursory look at the logic, I don't see how this
really works when using MySQL aliases. I commented out the entire 
catchall

check when moving to 5.4.19 simply to keep things working.


Regards,
-jc


--- vpopmail.c.orig 2007-08-23 16:46:31.0 -0700
+++ vpopmail.c  2007-08-23 17:03:51.0 -0700
@@ -1733,9 +1733,9 @@
   }

   /* Make sure we are not the email address of the catchall account */
-  if ( isCatchall( user, domain, Dir )) {
-return(VA_CANNOT_DELETE_CATCHALL);
-}
+  // if ( isCatchall( user, domain, Dir )) {
+  //  return(VA_CANNOT_DELETE_CATCHALL);
+  //  }

 #ifdef ONCHANGE_SCRIPT
   /* tell other programs that data has changed */

  





Re: [vchkpw] Decided to make the plunge today on late version of vpopmail

2007-09-07 Thread Quey

Rick Widmer wrote:



Quey wrote:
Rick on a kind of related note, did you see one of my posts in the 
thread:

adduser processing times CDB from 27th of the 7th ?


Looking at that thread...

slow loading of users:

I have added a note in the TODO to add an -O option to vadduser like 
the option in vadddomain, so it can only update the .cdb file once at 
the end of a batch of adds.  Right now I'm pretty sure the .cdb is 
updated for each one.




That would be good, however we have since moved to mysql and it flies, 
but it would still be a good idea ofr those still using cdb for sure.


Missing some files in vdeldomain:

The current code uses unlink(),  I don't think I want to do anything 
more when deleting files.  Considering that you had to e2fsck the disk 
I'm not sure I could.  I don't believe vpopmail ever creates files or 
directories with a ? in the name and have no idea where they may have 
come from.




They were whats left after vdeldomain, they were directory names and 
stuff like what was there before named correctly, after i deleted the 
domain something must have had a  hissy somewhere  and was unable to 
remove them so renamed them with a preceeding ?, that  must have 
something to do with unlinks work I guess, when I next have to build 
another box I'll do a dummy run and delete it and see what happens, 
maybe it was coincidence and was purely a one-off case, I wouldnt 
suggest doing it yourself on anything production :)



Cheers
Q



Re: [vchkpw] vdeluser isCatchall mysql segfault (was Re: [vchkpw] Decided to make the plunge today on late version of vpopmail)

2007-09-07 Thread Marcello Lupo

Hi,
i agree with your method to bybass the problem but in this way you will 
be able to delete a catch all account

for the domain without notice.
I think the best is to fix this issue making possible that the default 
alias is inserted in the valias table like the others
(if you use aliases in database), or to let the function check both file 
and database.
Moreover if it don't found the default alias in the database (this is 
what happen now) it should segfault but assume

that the account is not catchall.
I'm not a coder and i'm not able to do it.

Bye,
Marcello


Japheth Cleaver wrote:

Hi Steve,

i think the problem is related to something i posted some days ago but
without any answer.

Look at the post :

Re: [vchkpw] vdeluser segfault posted on 19/08/2007 be my answering
to a previous post.

Let me know if it is the case.
Bye,
Marcello

Steve Cole wrote:


On two (low volume) machines with vpopmail interfaced with mysql as the
data
store, it seemed to work successfully.  I updated the database schema
with no
issues.  This is with v5.4.21

However, when I do a vdeluser on either machine, the program
segfaults.  On
both systems.

I tried various things like making sure my LDFLAGS= and CFLAGS=-O
only to
be sure it wasn't a compiler issue, without luck.

So, to be clear, this is on two Debian Etch machines with GCC 4.1.1-15
and
MySQL 5.0.32-7etch1 installed.

Going back to 5.4.17 seemed to be no issue at all and of course, it
works as
expected.

  



I would concur. From a cursory look at the logic, I don't see how this
really works when using MySQL aliases. I commented out the entire catchall
check when moving to 5.4.19 simply to keep things working.


Regards,
-jc


--- vpopmail.c.orig 2007-08-23 16:46:31.0 -0700
+++ vpopmail.c  2007-08-23 17:03:51.0 -0700
@@ -1733,9 +1733,9 @@
   }

   /* Make sure we are not the email address of the catchall account */
-  if ( isCatchall( user, domain, Dir )) {
-return(VA_CANNOT_DELETE_CATCHALL);
-}
+  // if ( isCatchall( user, domain, Dir )) {
+  //  return(VA_CANNOT_DELETE_CATCHALL);
+  //  }

 #ifdef ONCHANGE_SCRIPT
   /* tell other programs that data has changed */

  


Re: [vchkpw] vdeluser isCatchall mysql segfault (was Re: [vchkpw] Decided to make the plunge today on late version of vpopmail)

2007-09-07 Thread Marcello Lupo

Hi Rick,
this is my configure options with vpopmail-5.4.19 :

./configure --enable-roaming-users 
--enable-tcpserver-file=/home/vpopmail/etc/tcp.smtp 
--enable-relay-clear-minutes=15 \
--enable-onchange-script --enable-auth-module=mysql --enable-logging=p 
--enable-mysql-limits --enable-valias  \
--enable-incdir=/usr/include/mysql --enable-libdir=/usr/lib64/mysql 
--disable-clear-passwd


It is making the problem on this installation.
Thanks,
Bye,
Marcello




Rick Widmer wrote:
Can someone who can see it fail please send me your ./configure 
options so maybe I can make it fail here?



Rick

Marcello Lupo wrote:

Hi,
i agree with your method to bybass the problem but in this way you 
will be able to delete a catch all account

for the domain without notice.
I think the best is to fix this issue making possible that the 
default alias is inserted in the valias table like the others
(if you use aliases in database), or to let the function check both 
file and database.
Moreover if it don't found the default alias in the database (this is 
what happen now) it should segfault but assume

that the account is not catchall.
I'm not a coder and i'm not able to do it.

Bye,
Marcello


Japheth Cleaver wrote:

Hi Steve,

i think the problem is related to something i posted some days ago but
without any answer.

Look at the post :

Re: [vchkpw] vdeluser segfault posted on 19/08/2007 be my 
answering

to a previous post.

Let me know if it is the case.
Bye,
Marcello

Steve Cole wrote:
  
On two (low volume) machines with vpopmail interfaced with mysql 
as the

data
store, it seemed to work successfully.  I updated the database schema
with no
issues.  This is with v5.4.21

However, when I do a vdeluser on either machine, the program
segfaults.  On
both systems.

I tried various things like making sure my LDFLAGS= and CFLAGS=-O
only to
be sure it wasn't a compiler issue, without luck.

So, to be clear, this is on two Debian Etch machines with GCC 
4.1.1-15

and
MySQL 5.0.32-7etch1 installed.

Going back to 5.4.17 seemed to be no issue at all and of course, it
works as
expected.

  



I would concur. From a cursory look at the logic, I don't see how this
really works when using MySQL aliases. I commented out the entire 
catchall

check when moving to 5.4.19 simply to keep things working.


Regards,
-jc


--- vpopmail.c.orig 2007-08-23 16:46:31.0 -0700
+++ vpopmail.c  2007-08-23 17:03:51.0 -0700
@@ -1733,9 +1733,9 @@
   }

   /* Make sure we are not the email address of the catchall account */
-  if ( isCatchall( user, domain, Dir )) {
-return(VA_CANNOT_DELETE_CATCHALL);
-}
+  // if ( isCatchall( user, domain, Dir )) {
+  //  return(VA_CANNOT_DELETE_CATCHALL);
+  //  }

 #ifdef ONCHANGE_SCRIPT
   /* tell other programs that data has changed */

  










Re: [vchkpw] vdeluser isCatchall mysql segfault (was Re: [vchkpw] Decided to make the plunge today on late version of vpopmail)

2007-09-07 Thread Rick Widmer



Marcello Lupo wrote:

Hi Rick,
this is my configure options with vpopmail-5.4.19 :

./configure --enable-roaming-users 
--enable-tcpserver-file=/home/vpopmail/etc/tcp.smtp 
--enable-relay-clear-minutes=15 \
--enable-onchange-script --enable-auth-module=mysql --enable-logging=p 
--enable-mysql-limits --enable-valias  \
--enable-incdir=/usr/include/mysql --enable-libdir=/usr/lib64/mysql 
--disable-clear-passwd


Cool!  It failed.  Now on to a fix...


Re: [vchkpw] Decided to make the plunge today on late version of vpopmail

2007-09-06 Thread Joshua Megerman

 On two (low volume) machines with vpopmail interfaced with mysql as the
 data
 store, it seemed to work successfully.  I updated the database schema with
 no
 issues.  This is with v5.4.21

Did you follow the UPGRADE document in 5.4.21 exactly and rename the
'domain' columns to 'pw_domain'?  If so, then your DB is now wrong. 
Apparently the fix I posted about the UPGRADE document didn't make it into
5.4.21...

The vpopmail table, and ONLY the vpopmail table, has a column named
'pw_domain'.  Every other table should have a 'domain' column, as the
earlier UPGRADE document listed (which incorrectly listed vpopmail as
having a 'domain' column).

The other suggestion I can make is try stracing the new version and see
where it fails...

Josh

Joshua Megerman
SJGames MIB #5273 - OGRE AI Testing Division
You can't win; You can't break even; You can't even quit the game.
  - Layman's translation of the Laws of Thermodynamics
[EMAIL PROTECTED]



Re: [vchkpw] Decided to make the plunge today on late version of vpopmail

2007-09-06 Thread Steve Cole
On Thursday 06 September 2007, Joshua Megerman wrote:

 The vpopmail table, and ONLY the vpopmail table, has a column named
 'pw_domain'.  Every other table should have a 'domain' column, as the
 earlier UPGRADE document listed (which incorrectly listed vpopmail as
 having a 'domain' column).

No, thankfully.  I was the one who reported the inconsistency in the upgrade 
document when *.20 rolled.  I should have mentioned that this same thing 
happened to one of my test boxes when I tried *.20 but it didn't on another 
(which it turns out is CDB because it handles two personal domains).  So *.20 
likely has the problem as well, I didn't delve that deeply the first time.

I straced the command and it opens a MySQL connection, does a MySQL query and 
then segfaults immediately.

As I said, the behaviour doesn't occur in the CDB binary.

-- 
--
Cheers,
Steve


Re: [vchkpw] Decided to make the plunge today on late version of vpopmail

2007-09-06 Thread Quey

Rick Widmer wrote:



Steve Cole wrote:
On two (low volume) machines with vpopmail interfaced with mysql as 
the data store, it seemed to work successfully.  I updated the 
database schema with no issues.  This is with v5.4.21


However, when I do a vdeluser on either machine, the program 
segfaults.  On both systems.


I tried it here with --enable-auth-module=mysql but don't get the 
segfault.  So can you send me:


   The vpopmail ./configure options you are using

   The actual user/domain you are trying to delete

   The strace output

You can send it private if you wish...


Going back to 5.4.17 seemed to be no issue at all and of course, it 
works as expected.


Nothing within vdeluser changed between those versions, but there were 
changes in vpopmail.c, but nothing that stands out.



Rick Widmer wrote:



Steve Cole wrote:
On two (low volume) machines with vpopmail interfaced with mysql as 
the data store, it seemed to work successfully.  I updated the 
database schema with no issues.  This is with v5.4.21


However, when I do a vdeluser on either machine, the program 
segfaults.  On both systems.


I tried it here with --enable-auth-module=mysql but don't get the 
segfault.  So can you send me:


   The vpopmail ./configure options you are using

   The actual user/domain you are trying to delete

   The strace output

You can send it private if you wish...


Going back to 5.4.17 seemed to be no issue at all and of course, it 
works as expected.


Nothing within vdeluser changed between those versions, but there were 
changes in vpopmail.c, but nothing that stands out.



Rick on a kind of related note, did you see one of my posts in the thread:
adduser processing times CDB from 27th of the 7th ?



Re: [vchkpw] Decided to make the plunge today on late version of vpopmail

2007-09-06 Thread Rick Widmer



Steve Cole wrote:
On two (low volume) machines with vpopmail interfaced with mysql as the data 
store, it seemed to work successfully.  I updated the database schema with no 
issues.  This is with v5.4.21


However, when I do a vdeluser on either machine, the program segfaults.  On 
both systems.


I tried it here with --enable-auth-module=mysql but don't get the 
segfault.  So can you send me:


   The vpopmail ./configure options you are using

   The actual user/domain you are trying to delete

   The strace output

You can send it private if you wish...


Going back to 5.4.17 seemed to be no issue at all and of course, it works as 
expected.


Nothing within vdeluser changed between those versions, but there were 
changes in vpopmail.c, but nothing that stands out.