Re: [vchkpw] mysql auth

2009-02-25 Thread Remo Mattei
2nd graffitiist: Why?

Use bill shupp toaster you will have not problem with this.

Just my 2 cents.

Remo


> From: Mohsen Pahlevanzadeh 
> Reply-To: 
> Date: Wed, 25 Feb 2009 20:14:27 +0330
> To: 
> Subject: [vchkpw] mysql auth
> 
> Dear all,
> At first i installed qmail from LWQ on Debian.Then i installed
> courier-imap & courier-pop & their core.
> Then i installed vpopmail with  mysql auth module.Even i tested it & it
> read & write to mysql.
> Now, When i use following command,i give error:
> --
> localhost:/home/mohsen# telnet 0 110
> Trying 0.0.0.0...
> Connected to 0.
> Escape character is '^]'.
> +OK Hello there.
> user postmas...@mohsenjan
> +OK Password required.
> pass 123456
> -ERR Login failed.
> Connection closed by foreign host.
> localhost:/home/mohsen# cd vpopmail-5.4.27
> --
> mohsenjan is my domain that i inserted to my db.
> When i saw my /var/log/mail.log, i see follow line:
> 
> Feb 25 19:17:20 localhost authdaemond: SQL query: SELECT pw_name,
> pw_passwd, pw_clear_passwd, pw_uid, pw_gid, pw_dir , "", "", "", "" FROM
> vpopmail WHERE pw_name = 'postmas...@mohsenjan'
> Feb 25 19:17:20 localhost authdaemond: zero rows returned
> Feb 25 19:17:20 localhost authdaemond: no password available to compare
> Feb 25 19:17:20 localhost authdaemond: authmysql: REJECT - try next
> module
> Feb 25 19:17:20 localhost authdaemond: FAIL, all modules rejected
> Feb 25 19:18:01 localhost pop3d: LOGOUT, ip=[:::127.0.0.1]
> Feb 25 19:18:01 localhost pop3d: Disconnected, ip=[:::127.0.0.1]
> ---
> My question: 
> How i tell to courier to pw_name is just is my username from email?.It
> doesn't contain domain name
> I have attached my /etc/courier/authmysqlrc file.
> Yours,
> Mohsen
> 
> 
> 
> 
> 
> 


!DSPAM:49a5792132687773844569!



Re: [vchkpw] MySQL server has gone away

2008-09-25 Thread Jordi Prats
On Thu, Sep 25, 2008 at 6:24 PM, Rick Macdougall <[EMAIL PROTECTED]> wrote:
>
> Have a network monitor login to IMAP every half hour to keep the connection
> open ?

That's a good workaround because I can check it is dovecot alive while
I'm keeping the connection open. I like it :)

Anyway this is a problem that should be fixed, isn't it? If I have
enough spare time I'm going to try to fix it, but I can't promise
anything ;)


> There really is no downside to increasing the timeout unless you also have
> user generated code that can do pconnects instead of connects.
>
> Rick
>
>
> 
>
>



-- 
Jordi

!DSPAM:48dbbe2f32311438796153!



Re: [vchkpw] MySQL server has gone away

2008-09-25 Thread Rick Macdougall

Jordi Prats wrote:

I'm using dovecot 1.1.3 with MySQL 5.0.67.

I think that disabling idle timeout it's not a good idea since MySQL
could die for too many useless idle conections too. There is not any
better solution? Any vpopmail parameter that I'm missing?

Thank you !



Have a network monitor login to IMAP every half hour to keep the 
connection open ?


There really is no downside to increasing the timeout unless you also 
have user generated code that can do pconnects instead of connects.


Rick


!DSPAM:48dbbb5b32311497813221!



Re: [vchkpw] MySQL server has gone away

2008-09-25 Thread Jordi Prats
Restarting dovecote solve the problem, yes. Also if I restart MySQL I
must restart dovecot too.

regards,

On Thu, Sep 25, 2008 at 6:01 PM, Jordi Prats <[EMAIL PROTECTED]> wrote:
> I'm using dovecot 1.1.3 with MySQL 5.0.67.
>
> I think that disabling idle timeout it's not a good idea since MySQL
> could die for too many useless idle conections too. There is not any
> better solution? Any vpopmail parameter that I'm missing?
>
> Thank you !
>
>
> On Thu, Sep 25, 2008 at 5:57 PM, Evren Yurtesen <[EMAIL PROTECTED]> wrote:
>> Jordi Prats wrote:
>>>
>>> Hi all,
>>> I'm facing this error:
>>>
>>> dovecot: auth(default): vmysql: sql error[3]: MySQL server has gone away
>>>
>>> I've been googling about this but it seems to be a resolved
>>> issuem(back to 2005), so it should just reconnect but it does not so.
>>> If I just restart dovecot (my IMAP server) it works OK.
>>>
>>> I'm using vpopmail 5.4.25
>>>
>>>
>>> Any ideas why it's not reconnecting?
>>>
>>> Thanks you!
>>>
>>
>> Maybe dovecot was compiled with pre 2005 libraries? Did you check when was
>> the version you are using updated last time? Does restarting dovecot fix the
>> problem?
>>
>> Thanks,
>> Evren
>>
>> 
>>
>>
>
>
>
> --
> Jordi
>



-- 
Jordi

!DSPAM:48dbb83332311147716080!



Re: [vchkpw] MySQL server has gone away

2008-09-25 Thread Jordi Prats
I'm using dovecot 1.1.3 with MySQL 5.0.67.

I think that disabling idle timeout it's not a good idea since MySQL
could die for too many useless idle conections too. There is not any
better solution? Any vpopmail parameter that I'm missing?

Thank you !


On Thu, Sep 25, 2008 at 5:57 PM, Evren Yurtesen <[EMAIL PROTECTED]> wrote:
> Jordi Prats wrote:
>>
>> Hi all,
>> I'm facing this error:
>>
>> dovecot: auth(default): vmysql: sql error[3]: MySQL server has gone away
>>
>> I've been googling about this but it seems to be a resolved
>> issuem(back to 2005), so it should just reconnect but it does not so.
>> If I just restart dovecot (my IMAP server) it works OK.
>>
>> I'm using vpopmail 5.4.25
>>
>>
>> Any ideas why it's not reconnecting?
>>
>> Thanks you!
>>
>
> Maybe dovecot was compiled with pre 2005 libraries? Did you check when was
> the version you are using updated last time? Does restarting dovecot fix the
> problem?
>
> Thanks,
> Evren
>
> 
>
>



-- 
Jordi

!DSPAM:48dbb5ce32317541862933!



Re: [vchkpw] MySQL server has gone away

2008-09-25 Thread Evren Yurtesen

Jordi Prats wrote:

Hi all,
I'm facing this error:

dovecot: auth(default): vmysql: sql error[3]: MySQL server has gone away

I've been googling about this but it seems to be a resolved
issuem(back to 2005), so it should just reconnect but it does not so.
If I just restart dovecot (my IMAP server) it works OK.

I'm using vpopmail 5.4.25


Any ideas why it's not reconnecting?

Thanks you!



Maybe dovecot was compiled with pre 2005 libraries? Did you check when 
was the version you are using updated last time? Does restarting dovecot 
fix the problem?


Thanks,
Evren

!DSPAM:48dbb22d32315313413817!



Re: [vchkpw] MySQL server has gone away

2008-09-25 Thread Rick Macdougall

Jordi Prats wrote:

Hi all,
I'm facing this error:

dovecot: auth(default): vmysql: sql error[3]: MySQL server has gone away

I've been googling about this but it seems to be a resolved
issuem(back to 2005), so it should just reconnect but it does not so.
If I just restart dovecot (my IMAP server) it works OK.

I'm using vpopmail 5.4.25


Any ideas why it's not reconnecting?

Thanks you!



Mysql 5 ?

If so it may be that MySQL is closing the connection after a period of 
inactivity.  If that's the case you need to increase the idle timeout or 
eliminate it completely.


We set ours at 4 days to allow for long weekends etc.

Regards,

Rick


!DSPAM:48dbae0d32311477465604!



Re: [vchkpw] Mysql, vlog entries (or table) not being created

2008-02-26 Thread Steve

Steve wrote:
Anyone know why no vlog entries, or even table when using MySQL5 and 
vpopmail? Using vpopmail 5.4.25, courier-authlib 0.60.2,


Looking in the courier-authlib code, it appears to be a courier-authlib 
issue. At least the way I read it.



!DSPAM:47c516ce310548528217500!



Re: [vchkpw] mysql sourcing read/update server config file

2007-12-06 Thread Hartmut Wernisch
On 05 Dec 07, Tom Collins wrote:
> On Dec 5, 2007, at 2:51 AM, Hartmut Wernisch wrote:
> >So now I am wondering why line 197-202 is setting the values to
> >MYSQL_READ_SOCKET and MYSQL_READ_PORT instead of MYSQL_UPDATE_SOCKET
> >and MYSQL_UPDATE_PORT?
> >
> >In my opinion these values should be set to MYSQL_UPDATE_SOCKET and
> >MYSQL_UPDATE_PORT?
> 
> 
> You are correct, and that probably fixes an outstanding bug report on  
> SourceForge.  Most people use the same info for read and update, so  
> no one has fixed the problem before.


In the current vpopmail version with mysql support tries to reconnect to
the update server for database queries if an update server was
configured in the vpopmail.mysql.

I have extended vpopmail to do the same with updates to the update
database server. This was realy hard work ;)

vpopmail.mysql is extended by a third server configuration line and also
the parser in vmysql.c is.
It is not a beautiful but a simple patch which works well for me. I have
a fully automated setup where also updates happens to non office times.
Therefor "failover" for update server queries are good for my sleep ;)

Maybe you are interessed in it for an upcoming release? (Or do a better
solution)

Best,
Hartmut

> 
> Rick, another fix for the next release.
> 
> --
> Tom Collins  -  [EMAIL PROTECTED]
> Vpopmail - virtual domains for qmail: http://vpopmail.sf.net/
> QmailAdmin - web interface for Vpopmail: http://qmailadmin.sf.net/
> 
> 
> 
> 
> 


!DSPAM:4758040732004317911302!



Re: [vchkpw] mysql sourcing read/update server config file

2007-12-05 Thread Tom Collins

On Dec 5, 2007, at 5:49 PM, Rick Widmer wrote:
Tom:  Do you have the tracker number?  I did not see anything that  
jumped out at me from the open reports, or even the first 50 any  
entries.



Maybe it was something that I saw on the list.  I went in and looked  
at the trackers and didn't see anything.


-Tom



!DSPAM:4757804532001552416675!



Re: [vchkpw] mysql sourcing read/update server config file

2007-12-05 Thread Rick Widmer



Tom Collins wrote:

On Dec 5, 2007, at 2:51 AM, Hartmut Wernisch wrote:

So now I am wondering why line 197-202 is setting the values to
MYSQL_READ_SOCKET and MYSQL_READ_PORT instead of MYSQL_UPDATE_SOCKET
and MYSQL_UPDATE_PORT?

In my opinion these values should be set to MYSQL_UPDATE_SOCKET and
MYSQL_UPDATE_PORT?



You are correct, and that probably fixes an outstanding bug report on 
SourceForge.  Most people use the same info for read and update, so no 
one has fixed the problem before.


Added to cvs.

Tom:  Do you have the tracker number?  I did not see anything that 
jumped out at me from the open reports, or even the first 50 any entries.


Rick

!DSPAM:4757551332001174195099!



Re: [vchkpw] mysql sourcing read/update server config file

2007-12-05 Thread Tom Collins

On Dec 5, 2007, at 2:51 AM, Hartmut Wernisch wrote:

So now I am wondering why line 197-202 is setting the values to
MYSQL_READ_SOCKET and MYSQL_READ_PORT instead of MYSQL_UPDATE_SOCKET
and MYSQL_UPDATE_PORT?

In my opinion these values should be set to MYSQL_UPDATE_SOCKET and
MYSQL_UPDATE_PORT?



You are correct, and that probably fixes an outstanding bug report on  
SourceForge.  Most people use the same info for read and update, so  
no one has fixed the problem before.


Rick, another fix for the next release.

--
Tom Collins  -  [EMAIL PROTECTED]
Vpopmail - virtual domains for qmail: http://vpopmail.sf.net/
QmailAdmin - web interface for Vpopmail: http://qmailadmin.sf.net/



!DSPAM:4756f8ce32009276917098!



Re: [vchkpw] Mysql table

2007-09-21 Thread Tom Collins

On Sep 20, 2007, at 12:56 PM, Rick Widmer wrote:
If I remember right, speed was the reason for separate tables, but  
testing showed it was not faster.  I think the single table works  
better because all your mail users are accessing the same table,  
and its indexes so they stay loaded all the time.  If you use  
separate tables it is always thrashing the cache as different files  
need to be accessed.


If we were really looking for speed, we could move to a "ng" (next  
generation) table format that was more relational.  Provide tools to  
migrate from the old to the new for those people who only access the  
data through vpopmail's APIs.  Continue to support the old method for  
people who have home-grown apps that access the data.


The domains should be in a table of their own, and the users table  
should index the domains table.  Having an index in the users table  
on an int (and the resulting size savings) would be measurable.


The biggest change would be updating the selects and inserts in the  
code.  Not a huge change -- just a join between the tables.


Something to consider, and perhaps discuss further (on this list or  
vpopmail-devel).


--
Tom Collins  -  [EMAIL PROTECTED]
Vpopmail - virtual domains for qmail: http://vpopmail.sf.net/
QmailAdmin - web interface for Vpopmail: http://qmailadmin.sf.net/




Re: [vchkpw] Mysql table

2007-09-20 Thread Ken Jones

Rick Widmer wrote:



mlist wrote:

John Simpson wrote:
and since mysql has a limit of 64 bytes for a table name, you have 
a... maybe not a bug, but a design flaw. the name "a(63 
times).com" IS a valid domain name, but "a(63 times)_com" is NOT 
a valid table name.


Definitely a design flaw, even before the domain name length increase.

I believe Ken once told me it was a mistake, but he never removed it 
because people were using it.  I think the name length issue is a good 
reason to depreciate the feature.  I'm looking to reduce the number of 
options to ./configure, and this looks like a good candidate.



perhaps you shouldn't store each domain's data in a separate table? 
i've never understood the reason for creating separate tables for 
each domain anyway- but since i don't normally use a SQL back-end for 
mailbox information, it's not something i really worry about.


Well then . . . that explains it.  Thanks Rick, Joshua, and John.  I'm 
no full-time DBA wouldn't it take less time to query through a 
specific table looking for data than it would to query one massive 
table?  Any one else have any thoughts?  I'm curious to know which 
would perform better.


If I remember right, speed was the reason for separate tables, but 
testing showed it was not faster.  I think the single table works better 
because all your mail users are accessing the same table, and its 
indexes so they stay loaded all the time.  If you use separate tables it 
is always thrashing the cache as different files need to be accessed.




I vote we depreciate the feature if we can provide a script to help
people migrate from the multi table method to the single table
method.

The feature was only intended for sites with one or two domains
and large numbers of users. In that case the database would not
thrash since there would  only be a few tables involved. And the
database could save space by not storing the pw_domain field.
As a DBA on large databases I could not resist optimizing this
redundant data.

The space saved on 100,000 users would be 6.4Mbytes
for pw_domain of 64 chars or 12.4Mbytes for pw_domain of 128 chars.

With the amount of RAM and disk space of modern servers the
space saved does not seem significant now.

Considering the confusion this feature generates and the relatively
small amount of space it saves I say it's worth depreciating
the feature.

It should be relatively straight forward to create a migration script
to move a site with many tables to the single table design.

Ken Jones



Re: [vchkpw] Mysql table

2007-09-20 Thread mlist

Rick Widmer wrote:



mlist wrote:

John Simpson wrote:
and since mysql has a limit of 64 bytes for a table name, you have 
a... maybe not a bug, but a design flaw. the name "a(63 
times).com" IS a valid domain name, but "a(63 times)_com" is NOT 
a valid table name.


Definitely a design flaw, even before the domain name length increase.

I believe Ken once told me it was a mistake, but he never removed it 
because people were using it.  I think the name length issue is a good 
reason to depreciate the feature.  I'm looking to reduce the number of 
options to ./configure, and this looks like a good candidate.



perhaps you shouldn't store each domain's data in a separate table? 
i've never understood the reason for creating separate tables for 
each domain anyway- but since i don't normally use a SQL back-end 
for mailbox information, it's not something i really worry about.


Well then . . . that explains it.  Thanks Rick, Joshua, and John.  
I'm no full-time DBA wouldn't it take less time to query through a 
specific table looking for data than it would to query one massive 
table?  Any one else have any thoughts?  I'm curious to know which 
would perform better.


If I remember right, speed was the reason for separate tables, but 
testing showed it was not faster.  I think the single table works 
better because all your mail users are accessing the same table, and 
its indexes so they stay loaded all the time.  If you use separate 
tables it is always thrashing the cache as different files need to be 
accessed.


I was going to ask about why that option was still available (seeing as 
how it's widely disliked) but I didn't want to seem ungrateful.


If in the future it is deprecated does anyone have an idea on how to 
convert many tables to one?  I'm sure I could piece together a shell 
script but I know there are a lot better scripters out there than me.


Matt


Re: [vchkpw] Mysql table

2007-09-20 Thread Rick Widmer



mlist wrote:

John Simpson wrote:
and since mysql has a limit of 64 bytes for a table name, you have 
a... maybe not a bug, but a design flaw. the name "a(63 
times).com" IS a valid domain name, but "a(63 times)_com" is NOT a 
valid table name.


Definitely a design flaw, even before the domain name length increase.

I believe Ken once told me it was a mistake, but he never removed it 
because people were using it.  I think the name length issue is a good 
reason to depreciate the feature.  I'm looking to reduce the number of 
options to ./configure, and this looks like a good candidate.



perhaps you shouldn't store each domain's data in a separate table? 
i've never understood the reason for creating separate tables for each 
domain anyway- but since i don't normally use a SQL back-end for 
mailbox information, it's not something i really worry about.


Well then . . . that explains it.  Thanks Rick, Joshua, and John.  I'm 
no full-time DBA wouldn't it take less time to query through a specific 
table looking for data than it would to query one massive table?  Any 
one else have any thoughts?  I'm curious to know which would perform 
better.


If I remember right, speed was the reason for separate tables, but 
testing showed it was not faster.  I think the single table works better 
because all your mail users are accessing the same table, and its 
indexes so they stay loaded all the time.  If you use separate tables it 
is always thrashing the cache as different files need to be accessed.




Re: [vchkpw] Mysql table

2007-09-20 Thread mlist

John Simpson wrote:

On 2007-09-19, at 1532, mlist wrote:


Please try creating a domain with a long name, up around 80-90 
characters long.

...


I did as you said and I recieved errors.  Here is the command I used 
and the errors returned.


...
vmysql: error creating table 
'a_com': 
Incorrect table name 
'a_com' 


Error. Failed while attempting to add domain to auth backend


you missed the other error message. mysql has a limit of 64 bytes for 
a table name (at least mysql versions 5.1, 5.0, and 5.1 do, i'm 
assuming earlier versions had the same limit.)


also see RFC 1035 section 2.3.4. each portion of a domain name (i.e. 
the "abc" in "abc.com") can be no longer than 63 bytes, and no full 
hostname (i.e. "www.abc.com") can be longer than 255 bytes.


and since mysql has a limit of 64 bytes for a table name, you have 
a... maybe not a bug, but a design flaw. the name "a(63 
times).com" IS a valid domain name, but "a(63 times)_com" is NOT a 
valid table name.


perhaps you shouldn't store each domain's data in a separate table? 
i've never understood the reason for creating separate tables for each 
domain anyway- but since i don't normally use a SQL back-end for 
mailbox information, it's not something i really worry about.


Well then . . . that explains it.  Thanks Rick, Joshua, and John.  I'm 
no full-time DBA wouldn't it take less time to query through a specific 
table looking for data than it would to query one massive table?  Any 
one else have any thoughts?  I'm curious to know which would perform better.


Matt


Re: [vchkpw] Mysql table

2007-09-19 Thread John Simpson

On 2007-09-19, at 1532, mlist wrote:


Please try creating a domain with a long name, up around 80-90  
characters long.

...


I did as you said and I recieved errors.  Here is the command I  
used and the errors returned.


...
vmysql: error creating table  
'a 
_com': Incorrect table name  
'a 
_com'

Error. Failed while attempting to add domain to auth backend


you missed the other error message. mysql has a limit of 64 bytes for  
a table name (at least mysql versions 5.1, 5.0, and 5.1 do, i'm  
assuming earlier versions had the same limit.)


also see RFC 1035 section 2.3.4. each portion of a domain name (i.e.  
the "abc" in "abc.com") can be no longer than 63 bytes, and no full  
hostname (i.e. "www.abc.com") can be longer than 255 bytes.


and since mysql has a limit of 64 bytes for a table name, you have  
a... maybe not a bug, but a design flaw. the name "a(63  
times).com" IS a valid domain name, but "a(63 times)_com" is NOT  
a valid table name.


perhaps you shouldn't store each domain's data in a separate table?  
i've never understood the reason for creating separate tables for  
each domain anyway- but since i don't normally use a SQL back-end for  
mailbox information, it's not something i really worry about.



| John M. Simpson---   KG4ZOW   ---Programmer At Large |
| http://www.jms1.net/ <[EMAIL PROTECTED]> |

| http://video.google.com/videoplay?docid=-1656880303867390173 |





PGP.sig
Description: This is a digitally signed message part


Re: [vchkpw] Mysql table

2007-09-19 Thread mlist

mlist wrote:


Please try creating a domain with a long name, up around 80-90 
characters long.  Then try to add a user, delete that user then 
delete that domain.  If it all works, you are in good shape and I'll 
change the note in INSTALL to say you don't have to do anything 
special if you are using --disable-many-domains.  If you have 
problems, let me know what happens and I'll figure something out.  I 
expect it will probably work.


Rick

Rick,

I did as you said and I recieved errors.  Here is the command I used 
and the errors returned.


mail:~ # vadddomain 
a.com 


Please enter password for postmaster:
enter password again:
qmail-newu: fatal: bad format in users/assign
vmysql: error creating table 
'a_com': 
Incorrect table name 
'a_com' 


Error. Failed while attempting to add domain to auth backend
qmail-newu: fatal: bad format in users/assign
Error: no authentication database connection


I'm not sure about that last error if it's refering to mysql database 
connectivity or not - the database is connected and I can establish 
authenticated smtp/pop3/imap connections.


I thought I'd try adding another, smaller domain:

mail:~ # vadddomain mytest.com
Please enter password for postmaster:
enter password again:
qmail-newu: fatal: bad format in users/assign
Error: (vadduser) Domain does not exist

However, the database table is created and the directory is created 
too.  I then tried to delete the domain:


mail:~ # vdeldomain mytest.com
Error: Domain does not exist

Again, however the table is still in the DB.  I'm not sure where to 
proceed.  I'm running SLES10 2.6.16-21.  I appreciate the help.


Matt
Well I made some slight progress.  Turns out that a. . . .com domains 
was still in my assign file.  I deleted it out (along with the dozen or 
so blank newlines after it) and then was able to add/delete "normal" 
size domains.  I tried again to add that a . . . .com domain and it gave 
me the same error and proceeded to break adding/deleting "normal" size 
domains.


Matt


Re: [vchkpw] Mysql table

2007-09-19 Thread Joshua Megerman
> qmail-newu: fatal: bad format in users/assign

Before pursuing anything else, check this out - qmail-newu (part of qmail,
and simply called by vpopmail) is telling you that your
/var/qmail/users/assign file is incorrect/corrupted, and that it can't
create the users.cdb file from it.  Vpopmail uses the users/assign file to
track what domains it owns, so if that file is bad you're in for problems.
 I don't know what field size restrictions are for that (neither the man
page nor qmail-newu.c list any), but while that may not be your root
cause, it's certainly a part of it...

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] Mysql table

2007-09-19 Thread mlist


Please try creating a domain with a long name, up around 80-90 
characters long.  Then try to add a user, delete that user then delete 
that domain.  If it all works, you are in good shape and I'll change 
the note in INSTALL to say you don't have to do anything special if 
you are using --disable-many-domains.  If you have problems, let me 
know what happens and I'll figure something out.  I expect it will 
probably work.


Rick

Rick,

I did as you said and I recieved errors.  Here is the command I used and 
the errors returned.


mail:~ # vadddomain 
a.com

Please enter password for postmaster:
enter password again:
qmail-newu: fatal: bad format in users/assign
vmysql: error creating table 
'a_com': 
Incorrect table name 
'a_com'

Error. Failed while attempting to add domain to auth backend
qmail-newu: fatal: bad format in users/assign
Error: no authentication database connection


I'm not sure about that last error if it's refering to mysql database 
connectivity or not - the database is connected and I can establish 
authenticated smtp/pop3/imap connections.


I thought I'd try adding another, smaller domain:

mail:~ # vadddomain mytest.com
Please enter password for postmaster:
enter password again:
qmail-newu: fatal: bad format in users/assign
Error: (vadduser) Domain does not exist

However, the database table is created and the directory is created 
too.  I then tried to delete the domain:


mail:~ # vdeldomain mytest.com
Error: Domain does not exist

Again, however the table is still in the DB.  I'm not sure where to 
proceed.  I'm running SLES10 2.6.16-21.  I appreciate the help.


Matt


Re: [vchkpw] Mysql table

2007-09-18 Thread Rick Widmer



mlist wrote:

Hello,

I'm upgrading vpopmail to version 5.4.21.  The documentation states that 
I need to alter some tables.



ALTER TABLE `dir_control` CHANGE `pw_domain` `pw_domain` CHAR(96) NOT NULL;
ALTER TABLE `ip_alias_map` CHANGE pw_domain pw_domain CHAR(96) NOT NULL;

...

I read on a previous post that I actually need to change the 'domain' 
columns (instead of 'pw_domain') - however, I'm running into one 
problem.  I compiled with --disable-many-domains and my domain tables do 
not have a 'pw_domain' nor a 'domain' column.  What am I missing here?  
Any help is appreciated.



If you were starting from scratch, I would recommend not using 
--disable-many-domains, as I believe it is more efficient to have a 
single table with all data, and don't really like the idea of vpopmail 
adding tables when domains are created or having to delete them when the 
domain is removed.  Its probably too late for that now...


Please try creating a domain with a long name, up around 80-90 
characters long.  Then try to add a user, delete that user then delete 
that domain.  If it all works, you are in good shape and I'll change the 
note in INSTALL to say you don't have to do anything special if you are 
using --disable-many-domains.  If you have problems, let me know what 
happens and I'll figure something out.  I expect it will probably work.


Rick


RE: [vchkpw] MySQL going down results in 5xx error

2006-02-09 Thread Ed McLain
Does vuserinfo return a different exit code on database failure?  If so
then you can catch this in your vpopmail_user_check.pl and thus exit
back a different code or whatever to check_delivery.  In check_delivery
you can catch that and return a DENY_SOFT instead of DENY.  This will
issue a 4xx code back to the smtp sender and thus cause then to resend
the message, that is unless it is Groupwise or a number of other broken
smtp servers which take 4xx messages as fatal.


On Thu, 2006-02-09 at 16:33 -0500, Jennifer Abel wrote:
> > -Original Message-
> > From: Tonix [mailto:[EMAIL PROTECTED] 
> > Sent: Wednesday, January 25, 2006 3:48 AM
> > To: vchkpw@inter7.com
> > Subject: Re: [vchkpw] MySQL going down results in 5xx error
> > 
> > 
> > > Hello,
> > >
> > > I have recently inherited a qmail server. This server is utilizing
> > > vpopmail version: 5.4.6 and MySQL Ver 4.0.25. We are 
> > currently suffering
> > > from the problem mentioned here:
> > > http://marc.theaimsgroup.com/?l=vchkpw&m=108925077224259&w=2 and
> > > 
> > https://sourceforge.net/tracker/index.php?func=detail&aid=1043
> 549&group_
> > id=85937&atid=577798. The problem is that a 550 is being returned if
> the
> > database is inaccessible. I have modified the my.cnf so that this
> rarely
> > happens now. However I do not want to send a 550 when the database is
> > unavailable. I see in many posts that there is a fix. I have looked
> > through the changelogs for each of the releases and have not seen
> > anything that says that it fixes this issue specifically. Can someone
> > let me know if this issue has been resolved, and if so, in which very
> > was it fixed.
> >
> >If you are using chkuser, there is a small change you can do (I'm going
> to
> >publish nextly this change with next version of chkuser).
> >
> >If you are interested I'll anticipate this small change so it may help
> >people to handle this error.
> >
> >Tonino
> >
> >>
> >> Thank You!
> >> Jenn
> >
> >
> >
> >-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> > La tua posta elettronica senza virus su UfficioPostale.IT
> >   Your virus free electronic mail on UfficioPostale.IT
> 
> 
> Tonino,
> 
> Thank you, but I couldn't find anything on the system to make me think
> that it is using chkuser.
> 
> Its using qpsmtpd which uses plugin check_delivery.
> Check_delivery calls a script called vpopmail_user_check.pl which
> performs "vuserinfo -d $address 2>&1". This returns an error because it
> cannot talk to the database. I'm walking through all of the code now to
> see if I can work with or change the return codes.
> 
> I'm sorry if I sound clueless, but I'm still trying to figure this
> system out.
> 
> Thanks again for the quick reply! Looks like it helped others too.
> 
> 
> Jenn
-- 
Thanks,
Ed McLain



RE: [vchkpw] MySQL going down results in 5xx error

2006-02-09 Thread Jennifer Abel
> -Original Message-
> From: Tonix [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, January 25, 2006 3:48 AM
> To: vchkpw@inter7.com
> Subject: Re: [vchkpw] MySQL going down results in 5xx error
> 
> 
> > Hello,
> >
> > I have recently inherited a qmail server. This server is utilizing
> > vpopmail version: 5.4.6 and MySQL Ver 4.0.25. We are 
> currently suffering
> > from the problem mentioned here:
> > http://marc.theaimsgroup.com/?l=vchkpw&m=108925077224259&w=2 and
> > 
> https://sourceforge.net/tracker/index.php?func=detail&aid=1043
549&group_
> id=85937&atid=577798. The problem is that a 550 is being returned if
the
> database is inaccessible. I have modified the my.cnf so that this
rarely
> happens now. However I do not want to send a 550 when the database is
> unavailable. I see in many posts that there is a fix. I have looked
> through the changelogs for each of the releases and have not seen
> anything that says that it fixes this issue specifically. Can someone
> let me know if this issue has been resolved, and if so, in which very
> was it fixed.
>
>If you are using chkuser, there is a small change you can do (I'm going
to
>publish nextly this change with next version of chkuser).
>
>If you are interested I'll anticipate this small change so it may help
>people to handle this error.
>
>Tonino
>
>>
>> Thank You!
>> Jenn
>
>
>
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> La tua posta elettronica senza virus su UfficioPostale.IT
>   Your virus free electronic mail on UfficioPostale.IT


Tonino,

Thank you, but I couldn't find anything on the system to make me think
that it is using chkuser.

Its using qpsmtpd which uses plugin check_delivery.
Check_delivery calls a script called vpopmail_user_check.pl which
performs "vuserinfo -d $address 2>&1". This returns an error because it
cannot talk to the database. I'm walking through all of the code now to
see if I can work with or change the return codes.

I'm sorry if I sound clueless, but I'm still trying to figure this
system out.

Thanks again for the quick reply! Looks like it helped others too.


Jenn


Re: [vchkpw] MySQL going down results in 5xx error

2006-01-29 Thread Rick Widmer

Joshua Megerman wrote:

Yes, here are changes. I've already tried them and it works. Just

FYI - with MySQL it's vauth_open_read not vauth_open.  I'm thinking of
submitting a patch to vpopmail to unify the call, so that it can be
published globally.  It would be nice if vauth_open would work no matter
what the backend auth mechanism...


That and a number of other changes that unify the database back-ends are
already in 5.5.  It just needs some testing on various platforms before
it can be released.





Re: [vchkpw] MySQL going down results in 5xx error

2006-01-28 Thread tonix (Antonio Nati)

At 20.18 27/01/2006, you wrote:

> Yes, here are changes. I've already tried them and it works. Just
studying the name of calls it may be adapted to Postgres also (it should
be enough to use vauth_open() ).
>
> In chkuser_settings.h enable
> #define CHKUSER_ENABLE_VAUTH_OPEN
> and add one of the following lines:
> /* use this if you are using replicated MySQL, with read access */
#define CHKUSER_VAUTH_OPEN_CALL vauth_open
> or
> /* use this if you are using standalone MySQL, with readwrite access */
#define CHKUSER_VAUTH_OPEN_CALL vauth_open_update
>
FYI - with MySQL it's vauth_open_read not vauth_open.


Yes, sorry, the correct name is vauth_open_read with replica enabled 
and read access.

Just a memory problem (age starts to work :-) ).


I'm thinking of
submitting a patch to vpopmail to unify the call, so that it can be
published globally.  It would be nice if vauth_open would work no matter
what the backend auth mechanism...


That is what I was expecting for a while (as told here a lot of time 
ago), but probably priorities of development have been others (I do 
not blame them of course).


But, as different DB have different kind of calls (vauth_open would 
only work for read operation on one, while it would work for all the 
operations on the other) It could be enough simply adding a common 
#define for the routine opening the database (in read mode or the 
best equivalent mode).


So chkuser will simply call that define (better, will call that 
#define if that #define exists), simplifying any further operation.





> Another comment on side effects of restarting MySQL.
> Courier auth daemon must be restarted, because it does not try to reopen
any MySQL connection.
>
> It would be nice to have a simple perl script monitoring MySQL (an
attach every x minutes), and in case of problem:
>  - running a script for shutting down Courier and other mail
> services
>  - stopping/restarting MySQL
>  - running a script for restarting all mail services
>
Does authdaemon die if it loses its connection to MySQL?  If so why not
just run it under daemontools.  If not, perhaps it should...


No, authdaemon seems to be simply opening a connection when starting 
and then trying the same connection for all future operations. So, 
after MySQL has been stopped, that connection cannot work anymore.


Tonino



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] MySQL going down results in 5xx error

2006-01-28 Thread tonix (Antonio Nati)


At 21.30 27/01/2006, you wrote:
> #if defined
CHKUSER_ENABLE_VAUTH_OPEN
> 
if (db_already_open != 1) {
> 
if (CHKUSER_VAUTH_OPEN_CALL () == 0) {
> 
db_already_open == 1;
> 
} else {
> 
retstat = CHKUSER_ERR_AUTH_RESOURCE;
> 
}
> 
};
> #endif
Minor Bug: you nead a "break;" on the line after "retstat
= ...",
otherwise you keep testing on a failed resource...
Yes, you are right. Actually it would not give fake results, but it will
perform useless checks.
Code becomes: 

#if defined CHKUSER_ENABLE_VAUTH_OPEN 

   
if (db_already_open != 1) { 

   
if (CHKUSER_VAUTH_OPEN_CALL () == 0) { 

   
db_already_open == 1; 

   
} else { 

   
retstat = CHKUSER_ERR_AUTH_RESOURCE; 

   
break; 

   
} 

   
}; 
#endif 
Thanks,
Tonino
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] MySQL going down results in 5xx error

2006-01-27 Thread Joshua Megerman
> #if defined CHKUSER_ENABLE_VAUTH_OPEN
>  if (db_already_open != 1) {
>  if (CHKUSER_VAUTH_OPEN_CALL () == 0) {
>  db_already_open == 1;
>  } else {
>  retstat = CHKUSER_ERR_AUTH_RESOURCE;
>  }
>  };
> #endif
Minor Bug: you nead a "break;" on the line after "retstat = ...",
otherwise you keep testing on a failed resource...

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] MySQL going down results in 5xx error

2006-01-27 Thread Joshua Megerman
> Yes, here are changes. I've already tried them and it works. Just
studying the name of calls it may be adapted to Postgres also (it should
be enough to use vauth_open() ).
>
> In chkuser_settings.h enable
> #define CHKUSER_ENABLE_VAUTH_OPEN
> and add one of the following lines:
> /* use this if you are using replicated MySQL, with read access */
#define CHKUSER_VAUTH_OPEN_CALL vauth_open
> or
> /* use this if you are using standalone MySQL, with readwrite access */
#define CHKUSER_VAUTH_OPEN_CALL vauth_open_update
>
FYI - with MySQL it's vauth_open_read not vauth_open.  I'm thinking of
submitting a patch to vpopmail to unify the call, so that it can be
published globally.  It would be nice if vauth_open would work no matter
what the backend auth mechanism...



> Another comment on side effects of restarting MySQL.
> Courier auth daemon must be restarted, because it does not try to reopen
any MySQL connection.
>
> It would be nice to have a simple perl script monitoring MySQL (an
attach every x minutes), and in case of problem:
>  - running a script for shutting down Courier and other mail
> services
>  - stopping/restarting MySQL
>  - running a script for restarting all mail services
>
Does authdaemon die if it loses its connection to MySQL?  If so why not
just run it under daemontools.  If not, perhaps it should...

I haven't looked at authdaemon/courier-imap v4 lately, but I dislike the
mechanism somewhat because there's no way to get the TCPREMOTEIP info from
the imap daemon to vpopmail, which I use to determine if I even need to
update the relay table (I don't if it's in my permanently allowed subnet,
or from my local webmail server...) which saves time on heavily loaded
servers...

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] MySQL going down results in 5xx error

2006-01-27 Thread tonix (Antonio Nati)


At 15.15 25/01/2006, you wrote:
> If you are using chkuser,
there is a small change you can do (I'm going to
> publish nextly this change with next version of chkuser).
>
> If you are interested I'll anticipate this small change so it may
help
> people to handle this error.
>
Can you post the change here so that those of us who want to look at
it
and test it can?

Yes, here are changes. I've already tried them and it works. Just
studying the name of calls it may be adapted to Postgres also (it should
be enough to use vauth_open() ).
In chkuser_settings.h enable

#define CHKUSER_ENABLE_VAUTH_OPEN 
and add one of the following lines:

/* use this if you are using replicated MySQL, with read access */
#define CHKUSER_VAUTH_OPEN_CALL vauth_open
or

/* use this if you are using standalone MySQL, with readwrite access
*/
#define CHKUSER_VAUTH_OPEN_CALL vauth_open_update
In chkuser.c, just substitute the following lines:

#if defined CHKUSER_ENABLE_VAUTH_OPEN

   
if (db_already_open != 1) {

   
if (vauth_open () == 0) {

   
db_already_open == 1;

   
} else {

   
retstat = CHKUSER_ERR_AUTH_RESOURCE;

   
}

   
};
#endif
with:

#if defined CHKUSER_ENABLE_VAUTH_OPEN 

   
if (db_already_open != 1) { 

   
if (CHKUSER_VAUTH_OPEN_CALL () == 0) { 

   
db_already_open == 1; 

   
} else { 

   
retstat = CHKUSER_ERR_AUTH_RESOURCE; 

   
} 

   
}; 
#endif 
Any input/comment is welcome.
Another comment on side effects of restarting MySQL.
Courier auth daemon must be restarted, because it does not try to reopen
any MySQL connection.
It would be nice to have a simple perl script monitoring MySQL (an attach
every x minutes), and in case of problem:
- running
a script for shutting down Courier and other mail services
-
stopping/restarting MySQL
- running
a script for restarting all mail services
Tonino
Thanks,
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] MySQL going down results in 5xx error

2006-01-25 Thread Joshua Megerman
> If you are using chkuser, there is a small change you can do (I'm going to
> publish nextly this change with next version of chkuser).
>
> If you are interested I'll anticipate this small change so it may help
> people to handle this error.
>
Can you post the change here so that those of us who want to look at it
and test it can?

Thanks,
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] MySQL going down results in 5xx error

2006-01-25 Thread Tonix
> Hello,
>
> I have recently inherited a qmail server. This server is utilizing
> vpopmail version: 5.4.6 and MySQL Ver 4.0.25. We are currently suffering
> from the problem mentioned here:
> http://marc.theaimsgroup.com/?l=vchkpw&m=108925077224259&w=2 and
> https://sourceforge.net/tracker/index.php?func=detail&aid=1043549&group_
> id=85937&atid=577798. The problem is that a 550 is being returned if the
> database is inaccessible. I have modified the my.cnf so that this rarely
> happens now. However I do not want to send a 550 when the database is
> unavailable. I see in many posts that there is a fix. I have looked
> through the changelogs for each of the releases and have not seen
> anything that says that it fixes this issue specifically. Can someone
> let me know if this issue has been resolved, and if so, in which very
> was it fixed.

If you are using chkuser, there is a small change you can do (I'm going to
publish nextly this change with next version of chkuser).

If you are interested I'll anticipate this small change so it may help
people to handle this error.

Tonino

>
> Thank You!
> Jenn



-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 La tua posta elettronica senza virus su UfficioPostale.IT
   Your virus free electronic mail on UfficioPostale.IT




Re: [vchkpw] MySQL 4.0.x frequent database corruption?

2005-11-08 Thread Jimmy

Hello,

Jack Kerouac wrote:

I've got a Debian stable box (Sarge) with vpopmail-5.4.10 and MySQL
version 4.0.24-10serge1.  About 1,000 users and a few dozen domains.
The MySQL database is frequently (several times a month) getting
corrupted - which of course makes for very angry users.   I have run
Vpopmail and MySQL for years and never seen such problems; so my
suspicions are more hardware related than software, but to cover my
bases I shall ask here:

Has anyone else had similar problems, especially using debian stable
and the debian binaries of MySQL?


Type dmesg and make sure there are no drive errors that may show up. I 
have seen similar issues that resulted from a bad IDE kernel driver/hard 
drive combination. Once we updated the kernel the IDE driver was fixed 
and the system began to work perfectly without the database corruption.


I also started to use innodb so that I could recover more effectivly 
when the system came back online just in case.





Does anyone know of a good reason to recommend an upgrade to MySQL
4.1.x and/or 5.0.x?   Would this possibly fix my problems?

Thanks in advance for any thoughts you may have on the subject,

--
Jack




Re: [vchkpw] MySQL 4.0.x frequent database corruption?

2005-11-07 Thread Shane Chrisp
On Mon, 2005-11-07 at 16:04 -0700, Jack Kerouac wrote:
>   I've got a Debian stable box (Sarge) with vpopmail-5.4.10 and MySQL
> version 4.0.24-10serge1.  About 1,000 users and a few dozen domains.
> The MySQL database is frequently (several times a month) getting
> corrupted - which of course makes for very angry users.   I have run
> Vpopmail and MySQL for years and never seen such problems; so my
> suspicions are more hardware related than software, but to cover my
> bases I shall ask here:
> 
>   Has anyone else had similar problems, especially using debian stable
> and the debian binaries of MySQL?
> 
>   Does anyone know of a good reason to recommend an upgrade to MySQL
> 4.1.x and/or 5.0.x?   Would this possibly fix my problems?
> 
> Thanks in advance for any thoughts you may have on the subject,


I would be suspect of the hardware too. Ive been running this box with
similar sorts of loads as your describing without issue for ~ 12 months
and never had an issue. The database does nothing but vpopmail either. 

 dpkg --list mysql-server
||/ Name   VersionDescription
+++-==-==-
ii  mysql-server   4.0.24-10sarge mysql database server binaries

I run 4.1 on other boxes which are for user databases, but i see no
reason or need to update to 4.1 just for vpopmail which doesnt need any
of the new features which are in 4.1.

Shane



Re: [vchkpw] mysql - valias sequence?

2005-07-19 Thread Rick Widmer



John Simpson wrote:

i don't know that i'll have the free time, but i'm certainly willing  to 
look at it.


so what's actually needed would be:




That sounds about right...  I'll give it a closer look later tonight.


This is getting pretty close to off topic for this list.  Maybe we 
should move to  [EMAIL PROTECTED]  the official list 
for development of vpopmail.


Rick


Re: [vchkpw] mysql - valias sequence?

2005-07-19 Thread Tom Collins
This is a known limitation of valiases.  I've wanted to do something 
about it for a long time, but don't have the spare time to do so.  It 
would be great if John and perhaps others could pitch in to make it 
happen.


On Jul 19, 2005, at 3:57 PM, John Simpson wrote:
i don't know that i'll have the free time, but i'm certainly willing 
to look at it.


Excellent.


so what's actually needed would be:

- a sequence field in the table, integral type, 32-bit unsigned 
integer (i would say limit it to 8 or 16 bits, but you never know...)


- vdelivermail.c needs an ORDER BY clause. it may also need to be 
modified to treat exit code 99 from a program delivery the same way 
qmail-local does (i.e. treat it as a success but stop processing alias 
lines) unless i'm missing something and it already does this?


Actually, vdelivermail won't require changes.  Just update 
valias_select() in vmysql.c


- need a script to convert a non-sequence table into a sequence table. 
this involves creating a new table with the sequence field, copying 
the old table to the new one (manually creating the sequence for all 
entries), deleting the old table, and renaming the new one to the old 
name. it could also identify any "problem" mailboxes- those with 
multiple lines, at least one of which is a program delivery.


You could just add the column to the existing table and then populate 
it with 0.  I agree that a tool to identify problematic aliases would 
be good, but setting it to 0 would match current behavior.


- valias.c needs the same ORDER BY clause as vdelivermail.c (for use 
when listing aliases.) we may also want a "-n" command line flag which 
makes "-s" show the seqence numbers in addition to the current output 
(but don't change the output, that would break scripts which depend on 
this output.)


Sounds good.  You might need to modify linklist_add() in vpopmail.c and 
update the calls to it in vmysql.c to store the sequence number.


- the valias_insert() functions in vmysql.c, vpalias.c, and vpgsql.c 
need a fourth parameter, a sequence number (unsigned). technically 
it's how many lines to skip before adding the new entry- 0 means "add 
at the beginning", 1 means "skip the first line and then insert the 
new one", and so forth... anything >= number of lines in the file is 
treated as "add to the end". the functions need to be able to 
re-number the existing rules in the database as needed to maintain the 
correct sequence.


Like this?

update valias set seq = seq + 1 where alias = '[EMAIL PROTECTED]' and seq > 
4
insert into valias (alias, alias_line, seq) values ('[EMAIL PROTECTED]', 
'[EMAIL PROTECTED]', 4)


- dotqmail2valias.c needs to make all of its calls with -1 as the 
sequence, meaning that all rules added would be added to the end of 
whatever instructions are already there for that alias.


Yep.

- valias.c would use the new "-n" command line option to specify the 
sequence for the new rule added by the "-i" option. (i'm assuming that 
"-i" and "-s" are mutually exclusive in the code.)


Sounds good to me.


am i missing anything?


Very thorough.  We'd have to update qmailadmin as well, but since it 
presently always adds to the end, it wouldn't be a big change.  
Ultimately, we would want to update the UI in QmailAdmin to allow you 
to change the order of lines in an alias (kind of like how Netflix 
manages your queue).


Perhaps when creating the new valias_insert() command, we should give 
it a new name and keep valias_insert() with the same parameters.  
valias_insert() would just call the new command and pass in -1 for the 
sequence.  That way, old programs wouldn't break.


We might also want to define a macro to indicate that the extended 
insert is available, so programs like QmailAdmin can have conditional 
compilation depending on whether they're linked to the old or new 
vpopmail.


--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
You don't need a laptop to troubleshoot high-speed Internet: 
sniffter.com




Re: [vchkpw] mysql - valias sequence?

2005-07-19 Thread John Simpson

On Jul 19, 2005, at 6:03 PM, Rick Widmer wrote:

John Simpson wrote:

and if so, does mysql have any guaranteed order that it will  
present the records with an explicit ORDER BY clause in the query?


There is no ORDER BY clause in the query, so the order the records  
is random.  They may appear to follow the order they were entered  
in, but adds and deletes can change the order.


that's what i figured from quickly glancing through the code- it's  
nice to know i didn't miss anything.


second, if a user has one or more existing valias records, the   
"valias -i" command would seem to work by sending an INSERT query   
with the new line. is the new line added to the beginning of the   
sequence, the end of the sequence, or is there in fact no  
guaranteed  sequence at all?


If there is no ORDER BY clause in a query the order the records are  
returned in is random, and subject to change without notice.  We  
need to add an order field, and an ORDER BY clause, but it hasn't  
happened yet.


i don't know that i'll have the free time, but i'm certainly willing  
to look at it.


so what's actually needed would be:

- a sequence field in the table, integral type, 32-bit unsigned  
integer (i would say limit it to 8 or 16 bits, but you never know...)


- vdelivermail.c needs an ORDER BY clause. it may also need to be  
modified to treat exit code 99 from a program delivery the same way  
qmail-local does (i.e. treat it as a success but stop processing  
alias lines) unless i'm missing something and it already does this?


- need a script to convert a non-sequence table into a sequence  
table. this involves creating a new table with the sequence field,  
copying the old table to the new one (manually creating the sequence  
for all entries), deleting the old table, and renaming the new one to  
the old name. it could also identify any "problem" mailboxes- those  
with multiple lines, at least one of which is a program delivery.


- valias.c needs the same ORDER BY clause as vdelivermail.c (for use  
when listing aliases.) we may also want a "-n" command line flag  
which makes "-s" show the seqence numbers in addition to the current  
output (but don't change the output, that would break scripts which  
depend on this output.)


- the valias_insert() functions in vmysql.c, vpalias.c, and vpgsql.c  
need a fourth parameter, a sequence number (unsigned). technically  
it's how many lines to skip before adding the new entry- 0 means "add  
at the beginning", 1 means "skip the first line and then insert the  
new one", and so forth... anything >= number of lines in the file is  
treated as "add to the end". the functions need to be able to re- 
number the existing rules in the database as needed to maintain the  
correct sequence.


- dotqmail2valias.c needs to make all of its calls with -1 as the  
sequence, meaning that all rules added would be added to the end of  
whatever instructions are already there for that alias.


- valias.c would use the new "-n" command line option to specify the  
sequence for the new rule added by the "-i" option. (i'm assuming  
that "-i" and "-s" are mutually exclusive in the code.)


am i missing anything?

--
| John M. Simpson - KG4ZOW - Programmer At Large |
| http://www.jms1.net/   <[EMAIL PROTECTED]> |
--
| Mac OS X proves that it's easier to make UNIX  |
| pretty than it is to make Windows secure.  |
--




PGP.sig
Description: This is a digitally signed message part


Re: [vchkpw] mysql - valias sequence?

2005-07-19 Thread Rick Widmer



DAve wrote:


John Simpson wrote:
i wanted to ask this here before reporting it as a bug on the  
sourceforge site.



Not really a bug as I believe the valias was intended as a forwarding 
tool, I may be wrong. Ken or Tom would be able to answer better. I only 
know what I know as I had discussions with Tom Collins about this same 
topic a while back.


Yep.

Its a feature request maybe, but not a bug.  I believe its considered a
good idea, but no one has had the time to code it.




Re: [vchkpw] mysql - valias sequence?

2005-07-19 Thread Rick Widmer



John Simpson wrote:


howdy-

while answering a question for somebody on another mailing list i  
happened to notice that, at least as of vpopmail 5.4.10, the  structure 
of the "valias" table created in a mysql database does not  have any 
provision for sequencing the entries attached to a given alias.


Correct.


first, how does the vdelivermail program decide in which order to  
process the entries when there are multiple records?


It doesn't.



does it use them in the order that mysql delivers them?


Yes.



and if so, does mysql have any guaranteed order that it will present

> the records with an explicit ORDER BY clause in the query?

There is no ORDER BY clause in the query, so the order the records is 
random.  They may appear to follow the order they were entered in, but 
adds and deletes can change the order.



second, if a user has one or more existing valias records, the  "valias 
-i" command would seem to work by sending an INSERT query  with the new 
line. is the new line added to the beginning of the  sequence, the end 
of the sequence, or is there in fact no guaranteed  sequence at all?


If there is no ORDER BY clause in a query the order the records are 
returned in is random, and subject to change without notice.  We need to 
add an order field, and an ORDER BY clause, but it hasn't happened yet.




--
| Mac OS X proves that it's easier to make UNIX  |
| pretty than it is to make Windows secure.  |
--





Re: [vchkpw] mysql - valias sequence?

2005-07-19 Thread DAve

John Simpson wrote:

howdy-

while answering a question for somebody on another mailing list i  
happened to notice that, at least as of vpopmail 5.4.10, the  structure 
of the "valias" table created in a mysql database does not  have any 
provision for sequencing the entries attached to a given alias.


No it does not.



in many cases this shouldn't make a difference, but occasionally  
somebody may do filtering or something similar, where the sequence  that 
the items are processed is important. (i'm doing this with my  own 
.qmail file to sort mailing list traffic into separate folders.)


Yes, I do this occasionaly, it can bite you.



first, how does the vdelivermail program decide in which order to  
process the entries when there are multiple records? does it use them  
in the order that mysql delivers them? and if so, does mysql have any  
guaranteed order that it will present the records with an explicit  
ORDER BY clause in the query?


That I recall, it takes them in the order they are returned by mysql, 
there is not ORDER BY in the SQL, the statements it uses are in the 
source. I have thought of expreimenting with changing this statement.




second, if a user has one or more existing valias records, the  "valias 
-i" command would seem to work by sending an INSERT query  with the new 
line. is the new line added to the beginning of the  sequence, the end 
of the sequence, or is there in fact no guaranteed  sequence at all?


None at all.



i wanted to ask this here before reporting it as a bug on the  
sourceforge site.


Not really a bug as I believe the valias was intended as a forwarding 
tool, I may be wrong. Ken or Tom would be able to answer better. I only 
know what I know as I had discussions with Tom Collins about this same 
topic a while back.


DAve



Re: [vchkpw] Mysql replica

2005-03-16 Thread Riccardo Bini
Alle 17:39, mercoledì 16 marzo 2005, Tom Collins ha scritto:
> On Mar 16, 2005, at 6:52 AM, Riccardo Bini wrote:
> > I have installed vpopmail 5.4.6 whith mysql database. I found a bug in
> > vadduser.
> > When I add a user I get Segmentation Fault. I debugged whith core dump
> > and I
> > found in line 1567 in vpopmail.c (remove_maildirsize(mypw->pw_dir);)
> > the bug.
> > mypw has null pointer.
> > Whit only one line in vpopmail.sql (so I dont use mysql replication)
> > all works
> > right.
> > Sorry for my english 8-)
>
> You need to try 5.4.10, which I haven't released yet.  I'll put it
> higher on my to do list, and try to get it out by the end of the week.
>
> In the meantime, you can try the changes from this patch:
>
> http://cvs.sourceforge.net/viewcvs.py/vpopmail/vpopmail/vpopmail.c?
> r1=1.28.2.16&r2=1.28.2.17&only_with_tag=stable-5_4
>
> Unfortunately, I forgot that I had the replication fix in there before
> I committed the other changes.  You want the code added in the middle
> section, where it says line 515.

It works fine!
Thank you

Riccardo


Re: [vchkpw] Mysql replica

2005-03-16 Thread Tom Collins
On Mar 16, 2005, at 6:52 AM, Riccardo Bini wrote:
I have installed vpopmail 5.4.6 whith mysql database. I found a bug in
vadduser.
When I add a user I get Segmentation Fault. I debugged whith core dump  
and I
found in line 1567 in vpopmail.c (remove_maildirsize(mypw->pw_dir);)  
the bug.
mypw has null pointer.
Whit only one line in vpopmail.sql (so I dont use mysql replication)  
all works
right.
Sorry for my english 8-)
You need to try 5.4.10, which I haven't released yet.  I'll put it  
higher on my to do list, and try to get it out by the end of the week.

In the meantime, you can try the changes from this patch:
http://cvs.sourceforge.net/viewcvs.py/vpopmail/vpopmail/vpopmail.c? 
r1=1.28.2.16&r2=1.28.2.17&only_with_tag=stable-5_4

Unfortunately, I forgot that I had the replication fix in there before  
I committed the other changes.  You want the code added in the middle  
section, where it says line 515.

--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
You don't need a laptop to troubleshoot high-speed Internet:  
sniffter.com



Re: [vchkpw] mysql int and C's int limit

2005-03-12 Thread Rick Macdougall

ceg ryan wrote:
I find the maximum quota I could set is 2GB. 
Exactly, the Mysql int and C's int limits at the same size.
Is it be possible to increase the limit ? 
could I simply change the quota's type to bigint

and the int to unsiged long int to solve it ?
Hi,
No, it is not as simple as that but the Devs are working on that issue 
as we speak :)

Regards,
Rick


Re: [vchkpw] mysql and valias_insert()

2005-02-12 Thread Tom Collins
On Feb 12, 2005, at 3:33 PM, James Whitt wrote:
I'm currently using vpopmail version 5.4.6 (from FreeBSD ports) and
i'm curious about how vpopmail handles aliases while using mysql.  I
have build vpopmail with --enable-valias and
--enable-auth-module=mysql (using the USE_MYSQL and WITH_VALIAS
settings in ports for those FreeBSD people out there).  The problem
that I have run into is that I'm writing an application in c which
uses the vpopmail libraries, and if I use the valias_insert(alias,
domain, line) function that is provided, it creates a .qmail-alias
file instead of inserting it directly into the database.
That's very odd.  If you build and install vpopmail with those two 
options, it will store the aliases in MySQL.  The code to store them in 
.qmail-alias files is in the vpalias.c file, which isn't compiled when 
VALIAS is defined (which happens if you --enable-valias).

Look for VALIAS in the config.h file and make sure it's defined.  Is 
there a chance your code could be linking an older version of vpopmail 
(compiled with CDB or without valias)?

--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
You don't need a laptop to troubleshoot high-speed Internet: 
sniffter.com



Re: [vchkpw] Mysql-Vpopmail-Outlook trouble???

2005-01-27 Thread Ajai Khattri
On Thu, 27 Jan 2005, David Diaz wrote:

> I have an issue with my mail server, I have qmail, vpopmail 5.4.0 and MySQL 
> 4.0.18 everything is fine, but when an user try to conect to mail server 
> using outlook as mail client in the morning or after a long time of 
> inactivity period, the outlook display the follow error message:
> 
> "Task 'server name - Sending and Receiving' reported error (0x800ccc0f): 
> 'The connection to the server was interrupted. If this problem continues, 
> contact your server administrator or Internet service provider (ISP). "
> 
> But if the user try again to connect to server after this error message, the 
> server response fine...
> this error happen just one time...and I don't really know what happenIn 
> my file of mysql configuration I have the follows parameters:

Some versions of Outlook try to receive BEFORE sending mail - so if your 
mail server implements POP-before-SMTP it fails the first time and then 
works the second time.

Other possibilities:

We've found that emails with corrupted headers (most often Date:, which is 
often the case with spam) can cause Outlook to fail to download. The only 
way to download the rest of the email is to delete the corrupted message 
(via WebMail). I have written a maildrop rule that inserts a Date: header 
if it is missing.

Some software firewalls also cause this error message from time-to-time. 
Ive had one customer have this happen with ZoneAlarm. Often its easy to 
remove Outlook from the firewall list of allowed apps and add it again 
when your firewall prompts you.

Of course, there could be server-side issues like MySQL not having enough 
connections but I would rule out the other possibilities first.


-- 
Aj. ([EMAIL PROTECTED])
Systems Administrator / Developer



Re: [vchkpw] MySql load causes bounced mail

2004-11-17 Thread Rick Macdougall

Tom Collins wrote:
On Nov 17, 2004, at 4:33 PM, Rick Macdougall wrote:
Speaking of which, Tom I do have a patch to correct courier-imap's 
authvckpw to work with the new webmail, no_imap code.  Should I submit 
that to the dev list and we can include it in the contrib directory, 
binc imap really didn't work out for us.

See if you can push it through to MrSam for inclusion in a future 
Courier-IMAP release.  If you'd like, you can send it to me first and 
I'll take a look at it.

I know that Michael Bowe has worked on the vpopmail code in Courier-IMAP 
before, I'm not sure how he got changes pushed into the main distribution.
Hi,
It's basically your new code in vchkpw.c placed into the preauthvchkpw.c 
of courier-imap.  I'll do up a diff in the morning and send it to the 
devel list.

Regards,
Rick


Re: [vchkpw] MySql load causes bounced mail

2004-11-17 Thread Tom Collins
On Nov 17, 2004, at 4:33 PM, Rick Macdougall wrote:
Speaking of which, Tom I do have a patch to correct courier-imap's 
authvckpw to work with the new webmail, no_imap code.  Should I submit 
that to the dev list and we can include it in the contrib directory, 
binc imap really didn't work out for us.
See if you can push it through to MrSam for inclusion in a future 
Courier-IMAP release.  If you'd like, you can send it to me first and 
I'll take a look at it.

I know that Michael Bowe has worked on the vpopmail code in 
Courier-IMAP before, I'm not sure how he got changes pushed into the 
main distribution.

--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter hand-held Network Tester: http://sniffter.com/


Re: [vchkpw] MySql load causes bounced mail

2004-11-17 Thread Rick Macdougall

Rainer Duffner wrote:
Jason Wilkinson wrote:
Jason Wilkinson wrote:
Hello all,
I've searched and wasn't able to come up with an answer to this
question. Though I did see a reference to it in the Bug Lists (
http://tinyurl.com/59gos ).
We're hitting a wall with our MySql install and our traffic is
filling up all available MySql connections. We are currently working
to tune our MySql install. Until that happens, I was wondering if
there was a reason that vpopmail bounces all mail with a 5xx response
when it can't connect to MySql.
I know that I can increase my max_connections in MySql...it just
seems as if vpopmail should respond with a 4xx response so that valid
mail isn't bounced.
I will admit that I am using an old version of vpopmail (5.2). If
this has been fixed I'll work towards an upgrade.
Thanks in advance,
-jw-

Can anybody tell me if this issue is being addressed in future releases?
 

Hi,
We've been talking about the problem in vpopmail-devel and the real devs 
(I just test and recommend stuff, not a real dev) are coming up with 
some good solutions.

I think Tom has already started moving all the mysql stuff into it's own 
area re the creation of tables etc so that unneeded calls to mysql are 
no longer required.

If/when I get some more free time I will be going through the code 
myself to see what can be done. I do sql/MySQL administration for a 
living, I don't really do C coding for a living although I have been 
known to submit patches from time to time.

Speaking of which, Tom I do have a patch to correct courier-imap's 
authvckpw to work with the new webmail, no_imap code.  Should I submit 
that to the dev list and we can include it in the contrib directory, 
binc imap really didn't work out for us.

Regards,
Rick


Re: [vchkpw] MySql load causes bounced mail

2004-11-17 Thread Rainer Duffner
Jason Wilkinson wrote:
Jason Wilkinson wrote:
Hello all,
I've searched and wasn't able to come up with an answer to this
question. Though I did see a reference to it in the Bug Lists (
http://tinyurl.com/59gos ).
We're hitting a wall with our MySql install and our traffic is
filling up all available MySql connections. We are currently working
to tune our MySql install. Until that happens, I was wondering if
there was a reason that vpopmail bounces all mail with a 5xx response
when it can't connect to MySql.
I know that I can increase my max_connections in MySql...it just
seems as if vpopmail should respond with a 4xx response so that valid
mail isn't bounced.
I will admit that I am using an old version of vpopmail (5.2). If
this has been fixed I'll work towards an upgrade.
Thanks in advance,
-jw-
Can anybody tell me if this issue is being addressed in future releases?
 

I think, it is being addressed and will be incorporated in a future version.
I think, as of today, you can only try spreading the load amongst more 
servers, via mysql-replication.

It doesn't protect from spikes to one particular server, though.

Rainer
--
===
~ Rainer Duffner - [EMAIL PROTECTED] ~
~   Freising - Munich - Germany   ~
~Unix - Linux - BSD - OpenSource - Security   ~
~  http://www.ultra-secure.de/~rainer/pubkey.pgp  ~
===


RE: [vchkpw] MySql load causes bounced mail

2004-11-17 Thread Jason Wilkinson
Jason Wilkinson wrote:
> Hello all,
> 
> I've searched and wasn't able to come up with an answer to this
> question. Though I did see a reference to it in the Bug Lists (
> http://tinyurl.com/59gos ).
> 
> We're hitting a wall with our MySql install and our traffic is
> filling up all available MySql connections. We are currently working
> to tune our MySql install. Until that happens, I was wondering if
> there was a reason that vpopmail bounces all mail with a 5xx response
> when it can't connect to MySql.
> 
> I know that I can increase my max_connections in MySql...it just
> seems as if vpopmail should respond with a 4xx response so that valid
> mail isn't bounced.
> 
> I will admit that I am using an old version of vpopmail (5.2). If
> this has been fixed I'll work towards an upgrade.
> 
> Thanks in advance,
> 
> -jw-

Can anybody tell me if this issue is being addressed in future releases?




Re: [vchkpw] MySql load causes bounced mail

2004-10-27 Thread tonix (Antonio Nati)
At 25/10/2004 25/10/2004 -0400, you wrote:

I feel it could be time to redesign qmail and use atexit() functions.
This could be a lengthy process. But if you are willing to undertake it, 
and write the patches for it, then it is certainly worth it.
I'm willing to do it, but I've no time shortly. Anyway, I feel most urgent 
job would be to rewrite Makefile and make a ./configure script.

Tonino

X-Istence

[EMAIL PROTECTED]Interazioni di Antonio Nati
   http://www.interazioni.it  [EMAIL PROTECTED]



Re: [vchkpw] MySql load causes bounced mail

2004-10-25 Thread X-Istence
On Oct 25, 2004, at 4:08 PM, tonix (Antonio Nati) wrote:
At 22/10/2004 22/10/2004 -0400, you wrote:
On Oct 22, 2004, at 8:13 AM, tonix (Antonio Nati) wrote:
Any comment?
Tonino
Why is qMail calling _exit() and not exit()? Is there a reason it 
does not want its files closed, and other stuff properly cleaned up? 
Or is it because DJB is just not happy with using calls that are in 
the libc library and thus are not thread safe for the most part?
Threads? I don't see where qmail is using threads...
I know, i was just pointing out a useless fact i picked up while 
reading a book.


Anyways, eventhough i do not agree with using #define's to override a 
function, i don't see it as a bad one necessarily, as it clears up 
the entire MySQL mess.
Funny, I'm checking my (chkuser) patch and I see also auth patch (Bill 
Shupp's toaster version) does the same thing (overriding _exit).

I feel it could be time to redesign qmail and use atexit() functions.
This could be a lengthy process. But if you are willing to undertake 
it, and write the patches for it, then it is certainly worth it.

Tonino

X-Istence


Re: [vchkpw] MySql load causes bounced mail

2004-10-25 Thread tonix (Antonio Nati)
At 22/10/2004 22/10/2004 -0400, you wrote:
On Oct 22, 2004, at 8:13 AM, tonix (Antonio Nati) wrote:
Any comment?
Tonino
Why is qMail calling _exit() and not exit()? Is there a reason it does not 
want its files closed, and other stuff properly cleaned up? Or is it 
because DJB is just not happy with using calls that are in the libc 
library and thus are not thread safe for the most part?
Threads? I don't see where qmail is using threads...
Anyways, eventhough i do not agree with using #define's to override a 
function, i don't see it as a bad one necessarily, as it clears up the 
entire MySQL mess.
Funny, I'm checking my (chkuser) patch and I see also auth patch (Bill 
Shupp's toaster version) does the same thing (overriding _exit).

I feel it could be time to redesign qmail and use atexit() functions.
Tonino

[EMAIL PROTECTED]Interazioni di Antonio Nati
   http://www.interazioni.it  [EMAIL PROTECTED]



Re: [vchkpw] MySql load causes bounced mail

2004-10-22 Thread X-Istence
On Oct 22, 2004, at 8:13 AM, tonix (Antonio Nati) wrote:
Any comment?
Tonino
Why is qMail calling _exit() and not exit()? Is there a reason it does 
not want its files closed, and other stuff properly cleaned up? Or is 
it because DJB is just not happy with using calls that are in the libc 
library and thus are not thread safe for the most part?

Anyways, eventhough i do not agree with using #define's to override a 
function, i don't see it as a bad one necessarily, as it clears up the 
entire MySQL mess.

X-Istence



Re: [vchkpw] MySql load causes bounced mail

2004-10-22 Thread tonix (Antonio Nati)
At 21/10/2004 21/10/2004 -0700, you wrote:
vdelivermail calls _exit() when running a command in a .qmail file (exit 
codes 99, 100 and 111).  It should really be calling vexit() to give the 
MySQL lib a chance to close its connections.

We could also consider just using atexit() to register functions that will 
be automatically called at exit, then we don't have to worry about calling 
vexit instead (which calls vclose).
I'm working on the chkuser side, and this is my solution (here semplified)...
Given the fact qmail-smtpd uses only _exit(), and this function is called a 
lot of times within the source, I'm substituting this _exit() function 
within qmail-smtpd.c using these definitions:

void my_cleaning_call(int a);
#define _exit(a) my_cleaning_call(a)
Then in my chkuser.c module, I have:
#undef _exit
void my_cleaning_call (int a) {
vclose();
_exit (a);
}
Any comment?
Tonino

--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter hand-held Network Tester: http://sniffter.com/

[EMAIL PROTECTED]Interazioni di Antonio Nati
   http://www.interazioni.it  [EMAIL PROTECTED]



Re: [vchkpw] MySql load causes bounced mail

2004-10-21 Thread tonix (Antonio Nati)
At 21/10/2004 21/10/2004 +0100, you wrote:
But, as we are speaking of atexit(), I'll give the good example ( :-) ) 
and in next 2.0.7 version I'll use it to call vclose().

As another thread is saying, qmail-smtpd also is using _exit(), so atexit() 
is useless.

I'll put another solution to work. Probably I'll change the flush() functions.
Tonino
--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter hand-held Network Tester: http://sniffter.com/

[EMAIL PROTECTED]Interazioni di Antonio Nati
   http://www.interazioni.it [EMAIL PROTECTED]


[EMAIL PROTECTED]Interazioni di Antonio Nati
   http://www.interazioni.it  [EMAIL PROTECTED]



Re: [vchkpw] MySql load causes bounced mail

2004-10-21 Thread X-Istence
On Oct 21, 2004, at 3:09 PM, Tom Collins wrote:
vdelivermail calls _exit() when running a command in a .qmail file 
(exit codes 99, 100 and 111).  It should really be calling vexit() to 
give the MySQL lib a chance to close its connections.
According to my book here, calling _exit() does not run any atexit() 
registered functions. This is also the only reason it is async safe, 
and thus also safe to use when you are in a signal handler. Whereas 
exit() does call the atexit() registered functions, and thus is not 
async safe.

X-Istence


Re: [vchkpw] MySql load causes bounced mail

2004-10-21 Thread tonix (Antonio Nati)
At 21/10/2004 21/10/2004 -0700, you wrote:
We could also consider just using atexit() to register functions that will 
be automatically called at exit, then we don't have to worry about calling 
vexit instead (which calls vclose).
Wow! In another thread I just suggested to use atexit() in vpopmail.

I know that Tonio has worked on a new chkuser patch that, along with some 
extra code in vpopmail, will respond with 4xx.

Is there a chance that the old chkusr patch had an execution path that 
resulted in it not closing its connection to MySQL?
Yes, both for new and for old patch. chkuser cannot close any connection, 
as it's called only for each sender or rcpt, and cannot know when it has 
finished his job.

But, as we are speaking of atexit(), I'll give the good example ( :-) ) and 
in next 2.0.7 version I'll use it to call vclose().

Thanks,
Tonino
--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter hand-held Network Tester: http://sniffter.com/

[EMAIL PROTECTED]Interazioni di Antonio Nati
   http://www.interazioni.it [EMAIL PROTECTED]



Re: [vchkpw] MySql load causes bounced mail

2004-10-21 Thread Tom Collins
On Oct 21, 2004, at 11:17 AM, Jason Wilkinson wrote:
We're hitting a wall with our MySql install and our traffic is filling 
up
all available MySql connections.
I think I see one possible problem.
vdelivermail calls _exit() when running a command in a .qmail file 
(exit codes 99, 100 and 111).  It should really be calling vexit() to 
give the MySQL lib a chance to close its connections.

We could also consider just using atexit() to register functions that 
will be automatically called at exit, then we don't have to worry about 
calling vexit instead (which calls vclose).

I took a quick look at vchkpw, and it appears to close its database 
connections, but I can't be sure.  Is it possible to have MySQL report 
which processes/programs opened connections but failed to close them?

I know that I can increase my max_connections in MySql...it just seems 
as if
vpopmail should respond with a 4xx response so that valid mail isn't
bounced.
I know that Tonio has worked on a new chkuser patch that, along with 
some extra code in vpopmail, will respond with 4xx.

Is there a chance that the old chkusr patch had an execution path that 
resulted in it not closing its connection to MySQL?

--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter hand-held Network Tester: http://sniffter.com/


Re: [vchkpw] MySQL logging

2004-08-24 Thread Richard A . Secor
Have you thought of writing a script in perl and run it in the crontab?
Richard A. Secor
[EMAIL PROTECTED]
Sequential Logic
http://www.seqlogic.com/
+1.914.494.0751
On Aug 24, 2004, at 06:11, Maurice Snellen wrote:
Listmembers:
I've got sql logging enabled on my server and recently noticed that
this leads to a rather large table and there doesn't seem to be a
utility or command to clear the logging table given a timeframe of log
that should be kept, like with logrotate.
Have I overlooked something? What are others who have sql logging
enabled using to keep the size of this table within acceptable limits.
--
Greetings,
Maurice




Re: [vchkpw] mysql dir_control table

2004-07-20 Thread Dave Goodrich
On Fri, Jul 16, 2004 at 11:28:46PM -0500, Dave Goodrich wrote:
> Hello the list.
> 
> We ahve been using vpopmail for over a year with no problems. We recently
> move to using mysql for auth and I am seeing a strange side effect. New
> users are no longer being created in the directory split but are all going
> to the domain root. We have one domain with 4557 users and since
> converting to mysql the last 177 users have been created in the domain
> root.
> 
> I first thought I had compiled somthing incorrectly but reviewing it
> doesn't seem so. I notice that the dir-control table was not updating when
> new users were added. 
> 
> In fact the largest domain (4558 users) showed a user count of 241378956!
> and never changed. I manually updated the field and now the count is
> correct and raises and lowers as users are added and deleted.
> 
> However new users are still going into the domain root. I've looked
> through the archive and googled several times with no answers.

Current info on my install as follows.

vpopmail version: 5.4.0
MySQL version: 3.23.58

vpopmail configured with:
/configure --enable-tcpserver-file=/shared/qmail/control
--enable-learn-passwords --enable-vpopuser=vpopmail --enable-vpopgrou
p=vchkpw --enable-qmail-ext --enable-incdir=/usr/include/mysql
--enable-libdir=/usr/lib/mysql --enable-clear-password --enable-auth
-module=mysql

uname -v :NetBSD 1.6.2 (GENERIC) #0: Wed Feb 11 08:05:11 UTC 2004
[EMAIL PROTECTED]:/autobuild/netbsd-1-6-PATCH002/spar
c/OBJ/autobuild/netbsd-1-6-PATCH002/src/sys/arch/sparc/compile/GENERIC

/home/vpopmail/etc/vpopmail.mysql:
10.0.240.253|3306|xx|xxx|vpopmail
10.0.240.253|3306|xx|xxx|vpopmail

ls -la /home/vpopmail
drwxrwxrwx  10 vpopmail  vchkpw   512 Jul 20 05:00 .
drwxrwxrwx   3 vpopmail  vchkpw   512 Mar 25 20:25 ..
-rw---   1 vpopmail  vchkpw  4176 Jun 29 17:18 .bash_history
drwxr-xr-x   2 vpopmail  vchkpw  1536 Jul 20 12:00 bin
drwxr-xr-x   4 vpopmail  vchkpw   512 Mar 26 22:11 doc
lrwxr-xr-x   1 vpopmail  vchkpw25 Mar 27 16:03 domains ->/shared/vpopmail/vdomains
drwxr-xr-x   2 vpopmail  vchkpw   512 Jul 19 21:15 etc
drwxr-xr-x   2 vpopmail  vchkpw   512 Mar 26 23:46 include
drwxr-xr-x   2 vpopmail  vchkpw   512 Mar 26 23:46 lib

ls -la /shared/vpopmail/vdomains:
drwx--   83 vpopmail  vchkpw 2560 Jul 19 09:49 .
drwx--5 vpopmail  vchkpw  512 Jul  6 17:05 ..
-rw---1 vpopmail  vchkpw   37 Jul 19 09:33 .dir-control
drwx--8 vpopmail  vchkpw  512 Jul 16 22:52 pixelhammer.com
drwx--  244 vpopmail  vchkpw   254464 Jul 20 12:33 tls.net


mysql (select * from dir_control):
| tls.net |  4555 | 0 | 3 |0 |
0 |0 | 61 | 61 | 61 |  0 |
2 |  4 |0 |0 |0 | |
| pixelhammer.com | 5 | 0 | 3 |0 |
0 |0 | 61 | 61 | 61 |  0 |
2 |  4 |0 |0 |0 | |
| dom_89  | 0 | 0 | 3 |0 |
0 |0 | 61 | 61 | 61 |  0 |
2 |  4 |0 |0 |0 | |

At this time everything appears to be functioning fine excpet for the
directory splitting and now we have noticed that quotas do not work on
every user, some it does, some do not. To test the qouta issue I actually
sendt mails one at a time until I reached the qouta limit. A new user
responded correctly when the limit was reached, old users do not.

The system was running well, everything appeared to work fine. We moved
the users maildirs to a nfs mounted share, mounted the share on the new
box and did a vconvert. At that point splitting ceased.

I am left hinking I would best off with a fresh clean install and a script
to manually reinstall all users and then move their mail to the new
Maildirs.

Any suggestions welcome.

Thanks,

DAve
-- 
In the beginning was The Word
and The Word was Content-type: text/plain



Re: [vchkpw] mysql help

2004-05-19 Thread Mark Matrafajlo
i reverted to the mysql 3.25 version and problem fixed, now onto courier
thx,
Mark
On Wed, 2004-05-19 at 12:58, Jeremy Kitchen wrote:
> On Wednesday 19 May 2004 08:39 am, Mark Matrafajlo wrote:
> > > vmysql: sql error[c]: Can't create/write to file
> > > './vpopmail/dir_control.frm' (Errcode: 13) vmysql: sql error[c]: Can't
> > > create/write to file './vpopmail/dir_control.frm' (Errcode: 13) vmysql:
> > > sql error[b]: Can't find file: './vpopmail/dir_control.frm' (errno: 13)
> > > Error. Failed while attempting to add domain to auth backend
> > > vmysql: sql error[c]: Can't create/write to file
> > > './vpopmail/dir_control.frm' (Errcode: 13) vmysql: sql error[c]: Can't
> > > create/write to file './vpopmail/dir_control.frm' (Errcode: 13) vmysql:
> > > sql error[b]: Can't find file: './vpopmail/dir_control.frm' (errno: 13)
> > > vmysql: sql error[c]: Can't create/write to file
> > > './vpopmail/dir_control.frm' (Errcode: 13) vmysql: sql error[e]: Can't
> > > find file: './vpopmail/dir_control.frm' (errno: 13)
> >
> > I took a look the vpopmail dir and noticed those files weren't even there
> > does anyone have any idea on whats going on ?
> 
> .frm files are generally mysql database files, therefore you're looking in the 
> wrong place.  That error is being returned by your mysql server, which is 
> actually being returned from a system call that errored out.
> 
> More than likely it's a permissions problem, however, you'll want to ask the 
> mysql support community if you can't figure it out.
> 
> -Jeremy



Re: [vchkpw] mysql help

2004-05-19 Thread Jeremy Kitchen
On Wednesday 19 May 2004 08:39 am, Mark Matrafajlo wrote:
> > vmysql: sql error[c]: Can't create/write to file
> > './vpopmail/dir_control.frm' (Errcode: 13) vmysql: sql error[c]: Can't
> > create/write to file './vpopmail/dir_control.frm' (Errcode: 13) vmysql:
> > sql error[b]: Can't find file: './vpopmail/dir_control.frm' (errno: 13)
> > Error. Failed while attempting to add domain to auth backend
> > vmysql: sql error[c]: Can't create/write to file
> > './vpopmail/dir_control.frm' (Errcode: 13) vmysql: sql error[c]: Can't
> > create/write to file './vpopmail/dir_control.frm' (Errcode: 13) vmysql:
> > sql error[b]: Can't find file: './vpopmail/dir_control.frm' (errno: 13)
> > vmysql: sql error[c]: Can't create/write to file
> > './vpopmail/dir_control.frm' (Errcode: 13) vmysql: sql error[e]: Can't
> > find file: './vpopmail/dir_control.frm' (errno: 13)
>
> I took a look the vpopmail dir and noticed those files weren't even there
> does anyone have any idea on whats going on ?

.frm files are generally mysql database files, therefore you're looking in the 
wrong place.  That error is being returned by your mysql server, which is 
actually being returned from a system call that errored out.

More than likely it's a permissions problem, however, you'll want to ask the 
mysql support community if you can't figure it out.

-Jeremy

-- 
Jeremy Kitchen ++ Systems Administrator ++ Inter7 Internet Technologies, Inc.
  [EMAIL PROTECTED] ++ www.inter7.com ++ 866.528.3530 ++ 847.492.0470 int'l
kitchen @ #qmail #gentoo on EFnet ++ scriptkitchen.com/qmail



Re: [vchkpw] MySQL error messages & vpalias.c

2004-05-10 Thread Tom Collins
On May 6, 2004, at 7:11 PM, Rick Widmer wrote:
At first glance, it appers that vpalias.c, vmysql.c and vpgsql.c share
common functions.  It seems to me that if the code is in vmysql.c and
vpgsql.c it should also appear in vcdb.c and vpalias.c should not 
exist.
 It looks like there is some ifdef magic going on to hide the code in
this file.  It seems to me it would be better to add vpalias.c to 
vcdb.c
and add empty function definitions in the other auth back-ends.  
Ifdefs would remain so you can still switch valias on or off with a 
./configure option.

Should I move it to cdb.c?
No, because we need to continue supporting aliases stored as 
.qmail-alias files (which is actually unrelated to the backend) even 
when using a database as a front-end.

vpalias.c is the default method for storing aliases.  --enable-valias 
overrides that option and stores aliases in MySQL (only if you're using 
MySQL as the backend).

--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter hand-held Network Tester: http://sniffter.com/


RE: [vchkpw] MySQL error messages & vpalias.c

2004-05-07 Thread Edward Neville
Hey! I think you helped me out on another list, the qmail main one I think.
Was using ed at ednevitible . Co . Uk as mail address.

-Original Message-
From: X-Istence [mailto:[EMAIL PROTECTED] 
Sent: 07 May 2004 05:35
To: [EMAIL PROTECTED]
Subject: Re: [vchkpw] MySQL error messages & vpalias.c


Rick Widmer wrote:
> My travels have finally brought me to the MySQL database module...  I 
> am working on improving the error messages returned by vconvert, as 
> part of the process of testing the MySQL back end.
> 
> The first thing I've noticed is that a number of errors call
> fprintf(stderr) directly from the extension.  I would like to make 
> them record the error in a string, set errori and return the error 
> code where it is apropriate.  Then I have to look at the places it is 
> called and update the error handling there.  I would prefer to leave 
> the formatting of error messages up to the end user program:  
> ~vpopmail/bin/*, qmailadmin, etc.
> 
> Any objections?
> 

None, code cleanup is always nice :P. I am diving into the source every 
so often as well for jobs people ask me to do.

> 
> At first glance, it appers that vpalias.c, vmysql.c and vpgsql.c share 
> common functions.  It seems to me that if the code is in vmysql.c and 
> vpgsql.c it should also appear in vcdb.c and vpalias.c should not 
> exist.  It looks like there is some ifdef magic going on to hide the 
> code in this file.  It seems to me it would be better to add vpalias.c 
> to vcdb.c and add empty function definitions in the other auth 
> back-ends.  Ifdefs would remain so you can still switch valias on or 
> off with a ./configure option.
> 
> Should I move it to cdb.c?

Why not? Would be just as easy.

> 
> 
> Next, there are two programs vconvert and dotqmail2valias that both 
> translate data from file to database, or from database to file.  
> Should I merge the programs into one.  Future conversions would then 
> be one step.  If the users or aliases have already been converted, you 
> just get duplicate warnings.
> 
> Merge them?

Yes, i was planning on doing this, but i dont have the time.

> 
> 
> 
> Rick
> 
> 


Useless stats on why not to listen to me:
0 patches to vpopmail
Just random blabbing :P
To busy to do it myself (I still think it needs to be done)

X-Istence


Re: [vchkpw] MySQL error messages & vpalias.c

2004-05-06 Thread X-Istence
Rick Widmer wrote:
My travels have finally brought me to the MySQL database module...  I am
working on improving the error messages returned by vconvert, as part of
the process of testing the MySQL back end.
The first thing I've noticed is that a number of errors call
fprintf(stderr) directly from the extension.  I would like to make them
record the error in a string, set errori and return the error code where
it is apropriate.  Then I have to look at the places it is called and
update the error handling there.  I would prefer to leave the formatting
of error messages up to the end user program:  ~vpopmail/bin/*,
qmailadmin, etc.
Any objections?

None, code cleanup is always nice :P. I am diving into the source every 
so often as well for jobs people ask me to do.

At first glance, it appers that vpalias.c, vmysql.c and vpgsql.c share
common functions.  It seems to me that if the code is in vmysql.c and
vpgsql.c it should also appear in vcdb.c and vpalias.c should not exist.
 It looks like there is some ifdef magic going on to hide the code in
this file.  It seems to me it would be better to add vpalias.c to vcdb.c
and add empty function definitions in the other auth back-ends.  Ifdefs 
would remain so you can still switch valias on or off with a ./configure 
option.

Should I move it to cdb.c?
Why not? Would be just as easy.



Next, there are two programs vconvert and dotqmail2valias that both
translate data from file to database, or from database to file.  Should 
I merge the programs into one.  Future conversions would then be one 
step.  If the users or aliases have already been converted, you just get 
duplicate warnings.

Merge them?
Yes, i was planning on doing this, but i dont have the time.



Rick




Useless stats on why not to listen to me:
0 patches to vpopmail
Just random blabbing :P
To busy to do it myself (I still think it needs to be done)
X-Istence



Re: [vchkpw] MySQL / LDAP

2004-05-06 Thread Rainer Duffner
Edward Neville wrote:
Can someone direct me to a descent site that compares or details how to
install LDAP and/or MySQL with Qmail please?
 


http://www.tnpi.biz/
No comparison though.


Rainer


Re: [vchkpw] mysql-auth replicated databases

2004-04-24 Thread Jeff Koch
Hi Rick:

Thanks for the help. We managed to get replication running and it seems to 
working. We stayed with MySQL 3.23.58 because we were unable to get the 
upgrade to MySQL version 4 to work. So now we have chkuser-mysql and virus 
scanning off-loaded to the front-end server. Next step is to offload the 
spamassassin but that should be easy since the mysql userprefs tables are 
being replicated also.

At 01:21 PM 4/21/2004, you wrote:
On Wed, 2004-04-21 at 12:08, Jeff Koch wrote:
> In order to relieve the load from our main mailserver we offloaded chkuser
> and virus scanning to a frontend mailserver. However, the front-end server
> is not getting a fast enough response on the chkuser query from the mysql
> server on the main mailserver and, at peaks loads, has started bouncing 
mails.
>
> We would like to have a slave copy of the mysql vpopmail DB on the
> front-end mailserver to service chkuser queries directly. We need to keep
> the slave database in sync with the master DB and would like to use mysql
> replication. Can we get some opinions on how best to keep the DB's in 
sync?
> Does replication work OK? Do we need to upgrade to MySQL version 4? Or can
> we get away with rsync?

I just did this in Feb.

Upgrade both systems to MySQL version 4.

Then follow this:
http://dev.mysql.com/doc/mysql/en/Replication.html
I personally did the LOAD DATA FROM MASTER to get the initial data set
over to the slave.  I also put some settings into the local /etc/my.cnf
- I kept typing commands wrong within MySQL ;)
Master:
[mysqld]
log-bin
server-id=1
Slave:[mysqld]
server-id=2
master-host=master.host.com
master-user=user
master-password=pass
max_connections=800
I had a hell of a time trying to get a Master 3.x server, and a slave
4.x.  I strongly recommend going with 4.x on both boxes.  Once I
upgraded the master, everything went smoothly.
Rick

> Thanks in advance for the advice and counsel.
>
>
> Jeff Koch
Best Regards,

Jeff Koch, Intersessions 




Re: [vchkpw] mysql aliases

2004-04-24 Thread Werner Amon
Tom Collins schrieb:
On Apr 23, 2004, at 2:01 PM, Werner Amon wrote:

Is it possible to convert .qmail-name files automaticly in mysql tables?


Take a look at the dotqmail2valias program included in vpopmail 5.4.1 
and later.

--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter hand-held Network Tester: http://sniffter.com/
Jau, thats it, thanks!

Werner


Re: [vchkpw] mysql aliases

2004-04-23 Thread Tom Collins
On Apr 23, 2004, at 2:01 PM, Werner Amon wrote:
Is it possible to convert .qmail-name files automaticly in mysql 
tables?
Take a look at the dotqmail2valias program included in vpopmail 5.4.1 
and later.

--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter hand-held Network Tester: http://sniffter.com/


RE: [vchkpw] mysql vlog

2004-04-22 Thread Shane Chrisp
You will need to recomplile without mysql logging to turn it off.

Shane 

>-Original Message-
>From: Jeff Koch [mailto:[EMAIL PROTECTED] 
>Sent: Friday, 23 April 2004 10:10 AM
>To: [EMAIL PROTECTED]
>Subject: [vchkpw] mysql vlog
>
>
>Our mysql vlog database seems to growing very large and now 
>I'm not sure we 
>even need it. Is there any way of stopping the vlogging without 
>re-compiling vpopmail? I know we can go into mysql and delete 
>records but 
>since we are going to start replication we don't want the vlog 
>transactions 
>in the mysql update logs.
>
>
>Best Regards,
>
>Jeff Koch, Intersessions 
>
>
>



Re: [vchkpw] mysql-auth replicated databases

2004-04-21 Thread Nick Harring
On Wed, 2004-04-21 at 12:21, Rick Romero wrote:
> On Wed, 2004-04-21 at 12:08, Jeff Koch wrote:

The replication works like a charm. I have found the occasional problem
if the vlog table is replicated, for some reason its very prone to
duplicate records. I myself just stopped using this table and my
replication issues are all gone. 
> 
> I just did this in Feb.
> 
> Upgrade both systems to MySQL version 4.
> 
> Then follow this:
> http://dev.mysql.com/doc/mysql/en/Replication.html
> 
> I personally did the LOAD DATA FROM MASTER to get the initial data set
> over to the slave.  I also put some settings into the local /etc/my.cnf
> - I kept typing commands wrong within MySQL ;)

> I had a hell of a time trying to get a Master 3.x server, and a slave
> 4.x.  I strongly recommend going with 4.x on both boxes.  Once I
> upgraded the master, everything went smoothly.
What problems did you have? I ran a 3.x master with 4.x slaves for a
while during a migration I did on my infrastructure. Obviously load data
from master isn't supported, so I had to go with the less than ideal
tar'ing under a read lock of the database files, however it was do-able.
> 
> Rick
> 
> > Thanks in advance for the advice and counsel.
> > 
> > 
> > Jeff Koch 
Also, if anybody here also uses big brother to monitor their servers,
I've got a perl extension I wrote for monitoring mysql replication that
works for MySQL 4.x (monitors both the IO thread and the sql thread).

Hope that helps,
Nick


Re: [vchkpw] mysql-auth replicated databases

2004-04-21 Thread Rick Romero
On Wed, 2004-04-21 at 12:08, Jeff Koch wrote:
> In order to relieve the load from our main mailserver we offloaded chkuser 
> and virus scanning to a frontend mailserver. However, the front-end server 
> is not getting a fast enough response on the chkuser query from the mysql 
> server on the main mailserver and, at peaks loads, has started bouncing mails.
> 
> We would like to have a slave copy of the mysql vpopmail DB on the 
> front-end mailserver to service chkuser queries directly. We need to keep 
> the slave database in sync with the master DB and would like to use mysql 
> replication. Can we get some opinions on how best to keep the DB's in sync? 
> Does replication work OK? Do we need to upgrade to MySQL version 4? Or can 
> we get away with rsync?

I just did this in Feb.

Upgrade both systems to MySQL version 4.

Then follow this:
http://dev.mysql.com/doc/mysql/en/Replication.html

I personally did the LOAD DATA FROM MASTER to get the initial data set
over to the slave.  I also put some settings into the local /etc/my.cnf
- I kept typing commands wrong within MySQL ;)

Master:
[mysqld]
log-bin
server-id=1

Slave:[mysqld]
server-id=2
master-host=master.host.com
master-user=user
master-password=pass
max_connections=800

I had a hell of a time trying to get a Master 3.x server, and a slave
4.x.  I strongly recommend going with 4.x on both boxes.  Once I
upgraded the master, everything went smoothly.

Rick

> Thanks in advance for the advice and counsel.
> 
> 
> Jeff Koch 




RE: [vchkpw] MySQL questions, vchkpw & tcpserver

2004-04-05 Thread Joel Newkirk
On Tue, 2004-03-30 at 13:20, Shane Chrisp wrote:

> PS: I just confirmed the format is as I said before. Add the IP address
> like 192.168.0 with a NULL timestamp.
> 
> Shane

Well, I've tried this, but it always disappears from the DB eventually,
I presume (unchecked) when clearopensmtp runs.  I've had success,
however, using a ludicrously high timestamp (99).

j

-- 
"Not all those who wander are lost."  - JRR Tolkien



Re: [vchkpw] MySQL questions, vchkpw & tcpserver

2004-04-01 Thread Joel Newkirk
On Tue, 2004-03-30 at 12:59, Jeremy Kitchen wrote:
> this is better:  http://untroubled.org/relay-ctrl
> put /var/spool/relay-ctrl on an nfs share.  Easy as pie.
> then you can just use normal tcprules stuff if you want to do static relay 
> controls, etc.
> 
> -Jeremy

And Shane Chrisp wrote:
> I just confirmed the format is as I said before. Add the IP address
> like 192.168.0 with a NULL timestamp.
>
> Shane

Thanks, both.  I've implemented Shane's solution for the time being, as
we're already set up for that, simply needing the correct syntax. 
However, we're going to be building a new mailcluster in the near future
so I'll be looking at alternatives to our current approaches on
different things.  I'm happiest with the chance to centralize everything
in SQL, however, wherever it's reasonable to do so.

j

-- 
"Not all those who wander are lost."  - JRR Tolkien



RE: [vchkpw] MySQL questions, vchkpw & tcpserver

2004-03-30 Thread Shane Chrisp
The mysql server patch for tcpserver works very well and its simple
to use. That's aside from the fact that almost every qmail install
out there is using tcpserver anyway. Makes sense to keep it simple.
But each to their own, I personally would rather keep all the IP's that
are allowed to relay in one place.

PS: I just confirmed the format is as I said before. Add the IP address
like 192.168.0 with a NULL timestamp.

Shane


>On Tuesday 30 March 2004 03:40 pm, Joel Newkirk wrote:
>> I'm set up to use vpopmail:relay table to track pops, and 
>I've applied
>> the tcpserver patch to also use vpopmail:relay to store info on
>> 'always-allowed' relaying from our own IPs.
>
>ugh.
>
>this is better:  http://untroubled.org/relay-ctrl
>
>put /var/spool/relay-ctrl on an nfs share.  Easy as pie.
>
>then you can just use normal tcprules stuff if you want to do 
>static relay 
>controls, etc.



Re: [vchkpw] MySQL questions, vchkpw & tcpserver

2004-03-30 Thread Jeremy Kitchen
On Tuesday 30 March 2004 03:40 pm, Joel Newkirk wrote:
> I'm set up to use vpopmail:relay table to track pops, and I've applied
> the tcpserver patch to also use vpopmail:relay to store info on
> 'always-allowed' relaying from our own IPs.

ugh.

this is better:  http://untroubled.org/relay-ctrl

put /var/spool/relay-ctrl on an nfs share.  Easy as pie.

then you can just use normal tcprules stuff if you want to do static relay 
controls, etc.

-Jeremy


-- 
Jeremy Kitchen
Systems Administrator
[EMAIL PROTECTED]
Kitchen @ #qmail on EFNet - Join the party!
.
Inter7 Internet Technologies, Inc.
www.inter7.com
866.528.3530 toll free
847.492.0470 int'l
847.492.0632 fax
GNUPG key ID: 93BDD6CE


RE: [vchkpw] MySQL questions, vchkpw & tcpserver

2004-03-30 Thread Shane Chrisp
Im not certain, but I think you can add the IP like 192.168.0 with a NULL
timestamp with version 2 of the tcpserver patch.

Shane 

>-Original Message-
>From: Joel Newkirk [mailto:[EMAIL PROTECTED] 
>Sent: Tuesday, 30 March 2004 11:41 PM
>To: [EMAIL PROTECTED]
>Subject: [vchkpw] MySQL questions, vchkpw & tcpserver
>
>I've got a couple of issues.
>
>I'm in the process of migrating a cluster of qmail servers to MySQL
>backend for authentication, and have a question:
>
>I'm set up to use vpopmail:relay table to track pops, and I've applied
>the tcpserver patch to also use vpopmail:relay to store info on
>'always-allowed' relaying from our own IPs.
>
>My questions:
>
>1 - Previously, with .cdb arrangement, we used the form "192.168.0." to
>permit relaying from any machine in that /24 network.  How do I specify
>the same using vpopmail:relay??  When I've tried using the 
>same form, it
>appears not to work.  Do I need to insert each IP 
>individually?  (that'd
>be ugly, with a /21 public network and roughly the same size 
>in combined
>private networks, but if that's the way then that's the way...)
>
>2 - Allowing 'permanent' relaying - Do I just use a ridiculously high
>timestamp?
>
>3 - How did I end up with entries like this in vpopmail:relay???
>
>| 216.26.255.33  | 1080657350   |
>| 216.26.255.65.41.4 | 108036425024 |
>
>I've got (currently) two qmail/vpopmail nodes in the cluster running on
>the MySQL backend, and a third still on cdb (until we're assured of the
>stability of the new setup).  Because of this split, I've written a
>small perl program that periodically synchronizes the two - it reads in
>open-smtp, reads in all entries from the relay table, removes the
>earlier of any duplicates, then inserts/updates entries in the db and
>writes a new open-smtp.
>
>j
>
>-- 
>"Not all those who wander are lost."  - JRR Tolkien
>
>



RE: [vchkpw] MySQL has gone away

2004-03-28 Thread Chris Miller








Well guys, I’ve made progress on
this. If I change the IP to my external IP rather than localhost it works. So
apparently, it’s looking for the socket in the wrong place.

 

Where does it pull the path of the socket
from?

 



Thanks,

 

Chris Miller

Compuville
www.compuville.net



 









From: Chris Miller
[mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 27, 2004
2:15 PM
To: [EMAIL PROTECTED]
Subject: RE: [vchkpw] MySQL has
gone away



 

I am using 5.4.0, which is the latest
version. I was using an older version before, but I ditched it and am
reinstalling it.

 



Thanks,

 

Chris Miller

Compuville
www.compuville.net



 









From: Remo Mattei
[mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 27, 2004
2:13 PM
To: [EMAIL PROTECTED]
Subject: RE: [vchkpw] MySQL has
gone away



 

The version of vpopmail you are using is
not using the file for password you need to modify the vmysql.c or .h I
can’t remember which one so make sure either you are using the latest
version or modify that file and then recompile..

 

 

 



Remo Mattei 
Network Security Engineer 
cell 801-808-unix 
email [EMAIL PROTECTED] 















From: Chris
Miller [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 27, 2004
12:03 PM
To: [EMAIL PROTECTED]
Subject: [vchkpw] MySQL has gone
away



 

Here’s what I get when I try
to add a domain:

 

[/var/vpopmail/bin]# ./vadddomain
test.com

Please enter password for
postmaster:

enter password again:

vmysql: sql error[c]: MySQL server
has gone away

vmysql: sql error[b]: MySQL server
has gone away

vmysql: sql error[3]: MySQL server
has gone away

vmysql: sql error[c]: MySQL server
has gone away

vmysql: sql error[c]: MySQL server
has gone away

vmysql: sql error[b]: MySQL server
has gone away

vmysql: sql error[3]: MySQL server
has gone away

vmysql: sql error[2]: MySQL server
has gone away

Failed while attempting to add user
to auth backend

Error: (vadduser) no auth connection

 

[/var/vpopmail/etc]# cat
vpopmail.mysql

localhost|0|vpopmail|***|vpopmail

 

My password has odd characters in
it, specifically the “+” character. Could that cause anything to
break?

 

I have tried connecting manually
with the username/password in that file, and I can get in fine.

 

 

Thanks,

 

Chris Miller

Compuville
www.compuville.net

 








RE: [vchkpw] MySQL has gone away

2004-03-27 Thread Chris Miller
Somehow, the subject of this conversation has gotten changed the
original subject was "MySQL has gone away". Please make sure all future
messages related to this problem have this subject, NOT SMTP AUTH as that is
a different problem.

Thanks,
 
Chris Miller
Compuville
www.compuville.net


-Original Message-
From: Chris Miller [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 27, 2004 8:39 PM
To: [EMAIL PROTECTED]
Subject: RE: [vchkpw] SMTP AUTH

Well, my connection file is correct. So why is it still saying MySQL Server
has gone away?

Thanks,
 
Chris Miller
Compuville
www.compuville.net


-Original Message-
From: Michael Bowe [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 27, 2004 6:28 PM
To: [EMAIL PROTECTED]
Subject: Re: [vchkpw] SMTP AUTH

It is my understanding that :

MYSQL CONNECTION SETTINGS FOR VPOPMAIL
Line 1 defines the connection to use for database reads,
Line 2 defines the connection to use for database updates/writes.

If you omit line 2, then the same settings will be
used for both read and write.

settings for each line:
host|port|user|password|database

eg
localhost|0|root|secret|vpopmail

Note:
The value of host may be either a hostname or an IP address.
If host is 'localhost', then sockets (Unix) or named pipes (Windows)
will be used instead of TCP/IP to connect to the server.

Michael.

- Original Message - 
From: "Chris Miller" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 28, 2004 5:43 AM
Subject: RE: [vchkpw] SMTP AUTH


> Nope, Same problem.
> 
> Is there any way to have it use a socket at '/var/run/mysqld/mysqld.sock'
> instead of over TCP/IP? 
> 
> Thanks,
>  
> Chris Miller
> Compuville
> www.compuville.net
> 
> 
> -Original Message-
> From: Shane Chrisp [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, March 27, 2004 2:31 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [vchkpw] SMTP AUTH
> 
> try changing the 0 in the file to 3306 like
> 
> localhost|3306|vpopmail|pass|vpopmail 
> 
> Shouldn't have any effect but who knows. I have also had 
> issues where ive needed to connect to the ip of the machine
> rather than localhost due to a few crazy mysql dns bugs. Adding
> the details to the hosts file sometimes fixes that one too.
> 
> Shane
> 
> >-Original Message-
> >From: Chris Miller [mailto:[EMAIL PROTECTED] 
> >Sent: Sunday, 28 March 2004 3:24 AM
> >To: [EMAIL PROTECTED]
> >Subject: RE: [vchkpw] SMTP AUTH
> >
> >Nope, same error...
> >
> >-rw-r-1 vpopmail vchkpw 41 Mar 27 14:24 vpopmail.mysql
> >
> >
> >Thanks,
> > 
> >Chris Miller
> >Compuville
> >www.compuville.net
> >
> >
> >-Original Message-
> >From: Shane Chrisp [mailto:[EMAIL PROTECTED] 
> >Sent: Saturday, March 27, 2004 2:19 PM
> >To: [EMAIL PROTECTED]
> >Subject: RE: [vchkpw] SMTP AUTH
> >
> >does mysql -D vpopmail -user=vpopmail --password=pass  get you 
> >in as well?
> >
> >Im guessing you might need to escape the \+ sign or your 
> >permissions on the
> >vpopmail.mysql file are wrong.
> >
> >-rw-r-1 vpopmail vchkpw235 Sep  4  2003 vpopmail.mysql
> >
> >Shane.
> >
> >>-Original Message-
> >>From: Chris Miller [mailto:[EMAIL PROTECTED] 
> >>Sent: Sunday, 28 March 2004 3:04 AM
> >>To: [EMAIL PROTECTED]
> >>Subject: RE: [vchkpw] SMTP AUTH
> >>
> >>Is it safe to use 0.31 with vpopmail-5.4.0?
> >>
> >>Thanks,
> >> 
> >>Chris Miller
> >>Compuville
> >>www.compuville.net
> >>
> >>
> >>-Original Message-
> >>From: Erwin Hoffmann [mailto:[EMAIL PROTECTED] 
> >>Sent: Monday, March 22, 2004 12:12 PM
> >>To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> >>Subject: Re: [vchkpw] SMTP AUTH
> >>
> >>Hi,
> >>
> >>dont use the version 0.32 of the smtp-auth patch; it's not 
> >>gonna work with
> >>vpopmail 5.4.x.
> >>
> >>Read: http://www.fehcom.de/qmail/smtpauth.html
> >>
> >>regards.
> >>--eh.
> >>
> >>At 14:38 22.03.04 +0100, [EMAIL PROTECTED] wrote:
> >>>Am Mo, 2004-03-22 um 14.30 schrieb Chris Miller:
>  Does vpopmail come with SMTP AUTH? Is there a compatable patch out
>  there?
> >>>Try this one:
> >>>qmail-smtpd-auth, http://members.elysium.pl/brush/qmail-smtpd-auth/,
> >>>
> >>>Gruss,
> >>>Peter.
> >>>
> >>> 
> >>>-- 
> >>>[EMAIL PROTECTED], gpg -key 
> >>>http://blackhole.pca.dfn.de:11371/pks/lookup?op=get&search=0x690A1AC2
> >>>
> >>>
> >>>
> >>
> >>Dr. Erwin Hoffmann | FEHCom | http://www.fehcom.de/
> >>Wiener Weg 8, 50858 Cologne | T: +49 221 484 4923 | F: ...24
> >>
> >>
> >>
> >
> >
> >
> >
> 
> 
> 
> 






RE: [vchkpw] MySQL has gone away

2004-03-27 Thread Chris Miller








I am using 5.4.0, which is the latest
version. I was using an older version before, but I ditched it and am
reinstalling it.

 



Thanks,

 

Chris Miller

Compuville
www.compuville.net



 









From: Remo Mattei
[mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 27, 2004
2:13 PM
To: [EMAIL PROTECTED]
Subject: RE: [vchkpw] MySQL has
gone away



 

The version of vpopmail you are using is
not using the file for password you need to modify the vmysql.c or .h I can’t
remember which one so make sure either you are using the latest version or
modify that file and then recompile..

 

 

 



Remo Mattei 
Network Security Engineer 
cell 801-808-unix 
email [EMAIL PROTECTED] 















From: Chris
Miller [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 27, 2004
12:03 PM
To: [EMAIL PROTECTED]
Subject: [vchkpw] MySQL has gone
away



 

Here’s what I get when I try
to add a domain:

 

[/var/vpopmail/bin]# ./vadddomain
test.com

Please enter password for
postmaster:

enter password again:

vmysql: sql error[c]: MySQL server
has gone away

vmysql: sql error[b]: MySQL server
has gone away

vmysql: sql error[3]: MySQL server
has gone away

vmysql: sql error[c]: MySQL server
has gone away

vmysql: sql error[c]: MySQL server
has gone away

vmysql: sql error[b]: MySQL server
has gone away

vmysql: sql error[3]: MySQL server
has gone away

vmysql: sql error[2]: MySQL server
has gone away

Failed while attempting to add user
to auth backend

Error: (vadduser) no auth connection

 

[/var/vpopmail/etc]# cat
vpopmail.mysql

localhost|0|vpopmail|***|vpopmail

 

My password has odd characters in
it, specifically the “+” character. Could that cause anything to
break?

 

I have tried connecting manually
with the username/password in that file, and I can get in fine.

 

 

Thanks,

 

Chris Miller

Compuville
www.compuville.net

 








RE: [vchkpw] MySQL has gone away

2004-03-27 Thread Remo Mattei








The version of vpopmail you are using is
not using the file for password you need to modify the vmysql.c or .h I can’t
remember which one so make sure either you are using the latest version or
modify that file and then recompile..

 

 

 



Remo Mattei 
Network Security Engineer 
cell 801-808-unix 
email [EMAIL PROTECTED] 











From: Chris
Miller [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 27, 2004
12:03 PM
To: [EMAIL PROTECTED]
Subject: [vchkpw] MySQL has gone
away



 

Here’s what I get when I try
to add a domain:

 

[/var/vpopmail/bin]# ./vadddomain
test.com

Please enter password for
postmaster:

enter password again:

vmysql: sql error[c]: MySQL server
has gone away

vmysql: sql error[b]: MySQL server
has gone away

vmysql: sql error[3]: MySQL server
has gone away

vmysql: sql error[c]: MySQL server
has gone away

vmysql: sql error[c]: MySQL server
has gone away

vmysql: sql error[b]: MySQL server
has gone away

vmysql: sql error[3]: MySQL server
has gone away

vmysql: sql error[2]: MySQL server
has gone away

Failed while attempting to add user
to auth backend

Error: (vadduser) no auth connection

 

[/var/vpopmail/etc]# cat
vpopmail.mysql

localhost|0|vpopmail|***|vpopmail

 

My password has odd characters in
it, specifically the “+” character. Could that cause anything to
break?

 

I have tried connecting manually
with the username/password in that file, and I can get in fine.

 

 

Thanks,

 

Chris Miller

Compuville
www.compuville.net

 








Re: [vchkpw] mysql-standard-4.0.18-unknown-openbsd3.4-i386 + vpopmail 5.4.0

2004-03-18 Thread Mikael
fredagen den 19 mars 2004 00.12 skrev Tom Collins:
> On Mar 18, 2004, at 3:52 PM, Mikael wrote:
> > have anyone successfully built vpopmail with the binaries that
> > mysql provide?
>
> Try this patch and report back.  If it solves your problem, then I'll
> add it to the next release.  (If you're not comfortable using patch, it
> will be easy to modify those files by hand.  Do configure.in first,
> then configure.  Just search for mysqlclient and add the " -lm" to the
> auth_libs list.)

it worked like a charm.
thanks alot.

greetings.
-- 
Mikael, [EMAIL PROTECTED]
http://www.gentoo.se/docs/


Re: [vchkpw] mysql-standard-4.0.18-unknown-openbsd3.4-i386 + vpopmail 5.4.0

2004-03-18 Thread Tom Collins
On Mar 18, 2004, at 3:52 PM, Mikael wrote:
have anyone successfully built vpopmail with the binaries that
mysql provide?
Try this patch and report back.  If it solves your problem, then I'll 
add it to the next release.  (If you're not comfortable using patch, it 
will be easy to modify those files by hand.  Do configure.in first, 
then configure.  Just search for mysqlclient and add the " -lm" to the 
auth_libs list.)

Index: configure.in
===
RCS file: /cvsroot/vpopmail/vpopmail/configure.in,v
retrieving revision 1.26.2.2
diff -u -r1.26.2.2 configure.in
--- configure.in4 Mar 2004 05:16:25 -   1.26.2.2
+++ configure.in18 Mar 2004 23:01:29 -
@@ -950,7 +950,7 @@
 AC_MSG_ERROR([Unable to find your MySQL lib dir, specify 
--enable-libdir.])
 fi

-auth_libs="-L$libdir $extralibflags -lmysqlclient -lz"
+auth_libs="-L$libdir $extralibflags -lmysqlclient -lz -lm"
 AC_SUBST(auth_libs)
 ;;
Index: configure
===
RCS file: /cvsroot/vpopmail/vpopmail/configure,v
retrieving revision 1.28.2.2
diff -u -r1.28.2.2 configure
--- configure   4 Mar 2004 05:16:25 -   1.28.2.2
+++ configure   18 Mar 2004 23:01:30 -
@@ -5905,7 +5905,7 @@
{ (exit 1); exit 1; }; }
 fi
-auth_libs="-L$libdir $extralibflags -lmysqlclient -lz"
+auth_libs="-L$libdir $extralibflags -lmysqlclient -lz -lm"
 ;;

--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter hand-held Network Tester: http://sniffter.com/


RE: [vchkpw] mysql-standard-4.0.18-unknown-openbsd3.4-i386 + vpopmail 5.4.0

2004-03-18 Thread Shouguan Lin
It happens on the FreeBSD too.  The "floor" is in the libm. Edit the
Makefile and change "-lz" to "-lz -lm" and it will compile fine. For vi,
just do "1,$ s/-lz/-lz -lm/g".  Save the Makefile and do a make. 

-Original Message-
From: Mikael [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 18, 2004 2:53 PM
To: [EMAIL PROTECTED]
Subject: [vchkpw] mysql-standard-4.0.18-unknown-openbsd3.4-i386 + vpopmail
5.4.0

hey,

i'm trying to compile vpopmail-5.4.0 with mysql support, though `(g)make`
fails with the following error:

gcc  -g -O2 -Wall   -o vchkpw  vchkpw.o md5.o hmac_md5.o libvpopmail.a 
-L/usr/local/mysql/lib  -lmysqlclient -lz
/usr/local/mysql/lib/libmysqlclient.a(password.o): In function `scramble':
password.o(.text+0x1c8): undefined reference to `floor'
password.o(.text+0x25d): undefined reference to `floor'
/usr/local/mysql/lib/libmysqlclient.a(password.o): In function
`check_scramble':
password.o(.text+0x3fa): undefined reference to `floor'
password.o(.text+0x488): undefined reference to `floor'
collect2: ld returned 1 exit status
gmake[2]: *** [vchkpw] Error 1

i ran the configure script with the following flags:
--prefix=/var/vpopmail
--enable-vpopuser=_vpopmail
--enable-vpopgroup=_vpopmail
--enable-domainquotas
--enable-libdir=/usr/local/mysql/lib
--enable-incdir=/usr/local/mysql/include
--enable-valias
--enable-mysql-logging
--enable-auth-module=mysql

have anyone successfully built vpopmail with the binaries that mysql
provide?

greetings.
--
Mikael, [EMAIL PROTECTED]
http://www.gentoo.se/docs/




Re: [vchkpw] MySQL vs CDB

2004-02-16 Thread Nick Harring
On Mon, 2004-02-16 at 14:45, Tom Collins wrote:
> On Feb 16, 2004, at 1:23 PM, Nick Harring wrote:
> > In most setups, i.e. less than 1k users, I'd probably agree. For larger
> > sites though I'd be interested in trying to benchmark, maybe with
> > something like oProfile?, how much of a difference dynamic libraries
> > could make for MySQL. I'm currently beginning to address performance
> > tuning needs on my qmail/vpopmail cluster, so I may have the
> > time/resources to really investigate this.
> 
> I assume that it would only require minor changes in the Makefiles to 
> have vpopmail dynamically link against libmysql instead of statically 
> linking it.
GCC by default will link dynamically if provided a dynamic library. In
my setup /usr/lib contains the .so filess for libmysqlclient, and
/usr/lib/mysql contains the .a files. configure picked up /usr/lib/mysql
rather than /usr/lib. Forcing /usr/lib with --enable-libdir=/usr/lib
also caused four or five more libraries to be dynamic, and when stripped
the binary ended up roughly 1/6th the size of what I was running.
> 
> Do you know how static vs. dynamic linking is controlled?  I think it's 
> a much better idea to make it dynamic, especially if you think about 
> admins upgrading MySQL -- vpopmail will continue to use the old, 
> statically linked code.
> 
> While we're at it, we should have libvpopmail dynamically linked as 
> well.  This would require opening up the permissions on the 
> ~vpopmail/lib directory, but that isn't a problem now that MySQL 
> passwords are stored in a separate file.
This is also a big plus. It'll reduce the footprint of apps like courier
which are long running.
> 
> --
> Tom Collins  -  [EMAIL PROTECTED]
> QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
> Info on the Sniffter handheld Network Tester: http://sniffter.com/
Hope that helps,
Nick
-- 
Nicholas harring <[EMAIL PROTECTED]>
Webley Systems, Inc.


Re: [vchkpw] MySQL vs CDB

2004-02-16 Thread Tom Collins
On Feb 16, 2004, at 1:23 PM, Nick Harring wrote:
In most setups, i.e. less than 1k users, I'd probably agree. For larger
sites though I'd be interested in trying to benchmark, maybe with
something like oProfile?, how much of a difference dynamic libraries
could make for MySQL. I'm currently beginning to address performance
tuning needs on my qmail/vpopmail cluster, so I may have the
time/resources to really investigate this.
I assume that it would only require minor changes in the Makefiles to 
have vpopmail dynamically link against libmysql instead of statically 
linking it.

Do you know how static vs. dynamic linking is controlled?  I think it's 
a much better idea to make it dynamic, especially if you think about 
admins upgrading MySQL -- vpopmail will continue to use the old, 
statically linked code.

While we're at it, we should have libvpopmail dynamically linked as 
well.  This would require opening up the permissions on the 
~vpopmail/lib directory, but that isn't a problem now that MySQL 
passwords are stored in a separate file.

--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter handheld Network Tester: http://sniffter.com/


Re: [vchkpw] MySQL vs CDB

2004-02-16 Thread Nick Harring
On Mon, 2004-02-16 at 14:13, Jeremy Kitchen wrote:
> On Mon, 2004-02-16 at 14:07, Nick Harring wrote:
> 
> > Well, I'll not flame, but I will correct. Stripping removes debugging
> > symbols only which only get loaded, iirc, when you load the binary in a
> > debugger like gdb. 
> 
> Thanks, I'll have to look more into this as it's something that I'd like
> to understand better.
Let me know if there's anything about my setup that'll help you
investigate. I'm more than happy to help, since my organization benefits
very much from the quality of vpopmail.
> 
> > The case for dynamic versus static libraries is a tricky one. With
> > dynamic you do load the same libraries over and over for one shot
> > binaries, however if they execute often enough, like vdelivermail on a
> > busy server, the cache will keep it in memory. Of course, this may also
> > be true of the larger binaries that are statically linked. Generally
> > though you'll end up suffering more with statically linked binaries that
> > get called often because they consume more of your cache, and each is
> > more likely to get expired from the cache since they don't reference
> > anything in common, whereas with a shared library that several often
> > executed binaries load its more likely to stay in cache since the
> > FS/VFS/whatever sees it being accessed more often.
> 
> yea, it's probably a small enough trade off one way or the other that it
> wouldn't matter.
In most setups, i.e. less than 1k users, I'd probably agree. For larger
sites though I'd be interested in trying to benchmark, maybe with
something like oProfile?, how much of a difference dynamic libraries
could make for MySQL. I'm currently beginning to address performance
tuning needs on my qmail/vpopmail cluster, so I may have the
time/resources to really investigate this. 
> 
> -Jeremy
Thanks,
Nick
-- 
Nicholas harring <[EMAIL PROTECTED]>
Webley Systems, Inc.


Re: [vchkpw] MySQL vs CDB

2004-02-16 Thread Jeremy Kitchen
On Mon, 2004-02-16 at 14:07, Nick Harring wrote:

> Well, I'll not flame, but I will correct. Stripping removes debugging
> symbols only which only get loaded, iirc, when you load the binary in a
> debugger like gdb. 

Thanks, I'll have to look more into this as it's something that I'd like
to understand better.

> The case for dynamic versus static libraries is a tricky one. With
> dynamic you do load the same libraries over and over for one shot
> binaries, however if they execute often enough, like vdelivermail on a
> busy server, the cache will keep it in memory. Of course, this may also
> be true of the larger binaries that are statically linked. Generally
> though you'll end up suffering more with statically linked binaries that
> get called often because they consume more of your cache, and each is
> more likely to get expired from the cache since they don't reference
> anything in common, whereas with a shared library that several often
> executed binaries load its more likely to stay in cache since the
> FS/VFS/whatever sees it being accessed more often.

yea, it's probably a small enough trade off one way or the other that it
wouldn't matter.

-Jeremy

-- 
Jeremy Kitchen
Systems Administrator
[EMAIL PROTECTED]
Kitchen @ #qmail on EFNet - Join the party!
.
Inter7 Internet Technologies, Inc.
www.inter7.com
866.528.3530 toll free
847.492.0470 int'l
847.492.0632 fax
GNUPG key ID: 93BDD6CE



Re: [vchkpw] MySQL vs CDB

2004-02-16 Thread Nick Harring
On Mon, 2004-02-16 at 13:25, Jeremy Kitchen wrote:
> On Mon, 2004-02-16 at 13:01, Nick Harring wrote:
> > > except for the segfaults adding domains and users when using mysql
> > > replication along with it :)
> > Which segfaults would those be? I use mysql replication and add users
> > all the time without any issues. I did this running both vpopmail 5.2.1
> > and 5.4.0-rc2. I've not yet added a domain under 5.4.0-rc2 but it worked
> > fine under 5.2.1, the only issue being that I manually had to add it to
> > the appropriate qmail files on each cluster server, though this is
> > automatable if I wished to do so.
> 
> not sure exactly the cause, but every time I add a user it segfaults. 
> It works, but it segfaults.  I have an open bug ticket on sourceforge,
> and I'm currently working on getting a test bed set up (the setup it
> happens on is a client's cluster, I can't really go giving their
> information out all over the place ;)
Understandable. :) Odd though since I've not seen it at all and I've
done a lot (ie thousands) or user ops with both code bases and
essentially zero problems.
> 
> > > unless you have at least 500 users, I'd stick with cdb.  mysql adds
> > > bloat to the binaries, and can make things slightly slower.
> >
> > Is there a reason that the mysql libs are statically rather than
> > dynamically linked? The bulk of the bloat comes from compiling in all of
> > that functionality. 
> 
> well, and I'm not a programmer, so I'm not entirely sure, but I think
> that's the point of stripping the binaries, so you end up only having
> the functions necessary.  I would think that dynamically loading the
> module at run time would bring in the entire module, thereby having a
> far higher runtime footprint.  Plus, I would think that loading the
> module dynamically would cause a performance hit, especially since these
> are all one shot processes. Yes, the OS would/should cache it, but it's
> still there
> 
> Then again, I could be completely wrong.  Flames welcome.
Well, I'll not flame, but I will correct. Stripping removes debugging
symbols only which only get loaded, iirc, when you load the binary in a
debugger like gdb. 
The case for dynamic versus static libraries is a tricky one. With
dynamic you do load the same libraries over and over for one shot
binaries, however if they execute often enough, like vdelivermail on a
busy server, the cache will keep it in memory. Of course, this may also
be true of the larger binaries that are statically linked. Generally
though you'll end up suffering more with statically linked binaries that
get called often because they consume more of your cache, and each is
more likely to get expired from the cache since they don't reference
anything in common, whereas with a shared library that several often
executed binaries load its more likely to stay in cache since the
FS/VFS/whatever sees it being accessed more often.
> 
> -Jeremy
Hope that helps,
Nick
-- 
Nicholas harring <[EMAIL PROTECTED]>
Webley Systems, Inc.


Re: [vchkpw] MySQL vs CDB

2004-02-16 Thread Jeremy Kitchen
On Mon, 2004-02-16 at 13:01, Nick Harring wrote:
> > except for the segfaults adding domains and users when using mysql
> > replication along with it :)
> Which segfaults would those be? I use mysql replication and add users
> all the time without any issues. I did this running both vpopmail 5.2.1
> and 5.4.0-rc2. I've not yet added a domain under 5.4.0-rc2 but it worked
> fine under 5.2.1, the only issue being that I manually had to add it to
> the appropriate qmail files on each cluster server, though this is
> automatable if I wished to do so.

not sure exactly the cause, but every time I add a user it segfaults. 
It works, but it segfaults.  I have an open bug ticket on sourceforge,
and I'm currently working on getting a test bed set up (the setup it
happens on is a client's cluster, I can't really go giving their
information out all over the place ;)

> > unless you have at least 500 users, I'd stick with cdb.  mysql adds
> > bloat to the binaries, and can make things slightly slower.
>
> Is there a reason that the mysql libs are statically rather than
> dynamically linked? The bulk of the bloat comes from compiling in all of
> that functionality. 

well, and I'm not a programmer, so I'm not entirely sure, but I think
that's the point of stripping the binaries, so you end up only having
the functions necessary.  I would think that dynamically loading the
module at run time would bring in the entire module, thereby having a
far higher runtime footprint.  Plus, I would think that loading the
module dynamically would cause a performance hit, especially since these
are all one shot processes. Yes, the OS would/should cache it, but it's
still there

Then again, I could be completely wrong.  Flames welcome.

-Jeremy

-- 
Jeremy Kitchen
Systems Administrator
[EMAIL PROTECTED]
Kitchen @ #qmail on EFNet - Join the party!
.
Inter7 Internet Technologies, Inc.
www.inter7.com
866.528.3530 toll free
847.492.0470 int'l
847.492.0632 fax
GNUPG key ID: 93BDD6CE



Re: [vchkpw] MySQL vs CDB

2004-02-16 Thread Nick Harring
On Mon, 2004-02-16 at 12:55, Jeremy Kitchen wrote:
> On Mon, 2004-02-16 at 13:47, Eduardo M. Bragatto wrote:
> > Hi,
> > 
> > I've been using vpopmail with cdb authentication system on many servers 
> > about 2 years and I don't have any complains about it.
> > Looking the README.mysql from vpopmail 5.4.0 it says:
> > 
> > "Using vpopmail with MySQL is becoming increasingly popular.
> > The code is well tested and can be considered to be just
> > as stable as the default CDB authentication system."
> 
> except for the segfaults adding domains and users when using mysql
> replication along with it :)
Which segfaults would those be? I use mysql replication and add users
all the time without any issues. I did this running both vpopmail 5.2.1
and 5.4.0-rc2. I've not yet added a domain under 5.4.0-rc2 but it worked
fine under 5.2.1, the only issue being that I manually had to add it to
the appropriate qmail files on each cluster server, though this is
automatable if I wished to do so.
> 
> > Is there any special reason to use MySQL instead of CDB? I'm not an 
> > expert on database systems, but CDB just seems more stable and faster to 
> > me (I'm not saying it is, it's just my impression about it and as I 
> > said: I'm NOT an expert).
> 
> well, cdb becomes very cumbersome with large numbers of users.  the
> passwd.cdb file is very slow to rebuild (adding a new user, changing
> password, etc) and while it's being rebuilt, it's locked, so it can
> cause a whole lot of problems given the right conditions.
> 
> mysql is EXCELLENT for large sites.  small sites (less than 100 users)
> you'll probably see a performance HIT going to mysql, but less than 100
> users, you probably won't even notice it ;)
> 
> > I'm asking it because since vp+mysql is becoming so popular, should be 
> > a good reason for that. So, I'd like to hear from you the advantages and 
> > cons about it compared with CDB.
> 
> unless you have at least 500 users, I'd stick with cdb.  mysql adds
> bloat to the binaries, and can make things slightly slower.
Is there a reason that the mysql libs are statically rather than
dynamically linked? The bulk of the bloat comes from compiling in all of
that functionality. 
> 
> -Jeremy
Cheers,
Nick

-- 
Nicholas Harring <[EMAIL PROTECTED]>
Webley Systems, Inc.


Re: [vchkpw] MySQL vs CDB

2004-02-16 Thread Ken Jones
On Monday 16 February 2004 1:47 pm, Eduardo M. Bragatto wrote:
> Hi,
>
>   I've been using vpopmail with cdb authentication system on many servers
> about 2 years and I don't have any complains about it.
>   Looking the README.mysql from vpopmail 5.4.0 it says:
>
>   "Using vpopmail with MySQL is becoming increasingly popular.
>   The code is well tested and can be considered to be just
>   as stable as the default CDB authentication system."
>
>   Is there any special reason to use MySQL instead of CDB? I'm not an
> expert on database systems, but CDB just seems more stable and faster to
> me (I'm not saying it is, it's just my impression about it and as I
> said: I'm NOT an expert).
>   I'm asking it because since vp+mysql is becoming so popular, should be
> a good reason for that. So, I'd like to hear from you the advantages and
> cons about it compared with CDB.
>
>   Regrads,
>   Eduardo M. Bragatto.

There are some trade offs with cdb and mysql. 
Here are some rules of thumb I use when deciding
1) Single machine, no domain over 5,000 users ---> use cdb
2) cluster of machines or more than 5,000 users in one domain --> mysql
3) other systems use mysql and want to interface with
   vpopmail via mysql ---> then use mysql

Ken Jones




Re: [vchkpw] MySQL vs CDB

2004-02-16 Thread Jeremy Kitchen
On Mon, 2004-02-16 at 13:47, Eduardo M. Bragatto wrote:
> Hi,
> 
>   I've been using vpopmail with cdb authentication system on many servers 
> about 2 years and I don't have any complains about it.
>   Looking the README.mysql from vpopmail 5.4.0 it says:
> 
>   "Using vpopmail with MySQL is becoming increasingly popular.
>   The code is well tested and can be considered to be just
>   as stable as the default CDB authentication system."

except for the segfaults adding domains and users when using mysql
replication along with it :)

>   Is there any special reason to use MySQL instead of CDB? I'm not an 
> expert on database systems, but CDB just seems more stable and faster to 
> me (I'm not saying it is, it's just my impression about it and as I 
> said: I'm NOT an expert).

well, cdb becomes very cumbersome with large numbers of users.  the
passwd.cdb file is very slow to rebuild (adding a new user, changing
password, etc) and while it's being rebuilt, it's locked, so it can
cause a whole lot of problems given the right conditions.

mysql is EXCELLENT for large sites.  small sites (less than 100 users)
you'll probably see a performance HIT going to mysql, but less than 100
users, you probably won't even notice it ;)

>   I'm asking it because since vp+mysql is becoming so popular, should be 
> a good reason for that. So, I'd like to hear from you the advantages and 
> cons about it compared with CDB.

unless you have at least 500 users, I'd stick with cdb.  mysql adds
bloat to the binaries, and can make things slightly slower.

-Jeremy

-- 
Jeremy Kitchen
Systems Administrator
[EMAIL PROTECTED]
Kitchen @ #qmail on EFNet - Join the party!
.
Inter7 Internet Technologies, Inc.
www.inter7.com
866.528.3530 toll free
847.492.0470 int'l
847.492.0632 fax
GNUPG key ID: 93BDD6CE



Re: [vchkpw] MySQL vs CDB

2004-02-16 Thread Nick Harring
On Mon, 2004-02-16 at 13:47, Eduardo M. Bragatto wrote:
> Hi,
> 
>   I've been using vpopmail with cdb authentication system on many servers 
> about 2 years and I don't have any complains about it.
>   Looking the README.mysql from vpopmail 5.4.0 it says:
> 
>   "Using vpopmail with MySQL is becoming increasingly popular.
>   The code is well tested and can be considered to be just
>   as stable as the default CDB authentication system."
> 
>   Is there any special reason to use MySQL instead of CDB? 
Most of us who use it do so because we need more than one box to access
the user database and don't want to use nfs to access a cdb file, or do
any special synchronization for the file. 
> I'm not an 
> expert on database systems, but CDB just seems more stable and faster to 
> me (I'm not saying it is, it's just my impression about it and as I 
> said: I'm NOT an expert).
>   I'm asking it because since vp+mysql is becoming so popular, should be 
> a good reason for that. So, I'd like to hear from you the advantages and 
> cons about it compared with CDB.
The big advantages are that you can build a dedicated box, or boxes, to
host the vpopmail database, and anything that can access MySQL, which is
virtually everything these days, can get in and access/manipulate that
data. 
> 
>   Regrads,
>   Eduardo M. Bragatto.
Hope that helps,
Nick 
-- 
Nicholas harring <[EMAIL PROTECTED]>
Webley Systems, Inc.


Re: [vchkpw] Mysql + NFS + Quota Problem

2004-01-08 Thread Clayton Weise
Please paste the output of a vuserinfo on one of your email addresses.

Phisher1 wrote:

Here is my setup:

 

 I have qmail + vpopmail  5.3.30+ mysql setup.

 

 I have 5 servers for this mail cluster.

 

   1. mx for internet ( no relay)
   2. smtp for customers ( relay for customers)
   3. pop3 for customers
   4. mysql server box
   5. nas NFS storage device
 

 

I have /home/vpopmail/domains exported from the NFS server.

This directory is only accessible by user vpopmail.

 

My vpopmail configure line:

./configure \

  --enable-roaming-users=n \

  --enable-logging=p \

  --enable-ip-alias-domains=n \

  --enable-defaultquota=10485760S \

  --enable-passwd=n \

  --enable-clear-passwd=y \

  --enable-domain-quotas=n \

  --enable-mysql=y \

  --enable-many-domains=n \

  --enable-auth-logging=y \

  --enable-mysql-logging=y \

  --enable-valias=y

 

 

My problem is:

 

 QUOTAS DON’T WORK!

 

In the Mysql table  domain_com  in database vpopmail under the pw_shell 
field

 

There is either 10485760S or 10485760S,1000C   for every user.

 

I have a /home/vpopmail/domains/.quotawarn.msg   that contains an email 
with proper headers that should be sent to the user when they are at 90% 
usage.

 

I also have a /home/vpopmail/domains/.over-quota.msg   that contains an 
error message that I believe should be displayed to the original sender 
if they try to email a user that is over quota.

 

Also a side note which might help diagnose the problem.. I have 
Squirrelmail setup with the quota_usage plugin.   The quota usage never 
increases from 0%

 

Can anyone help?

PLEASE!

 

 

 

 



Re: [vchkpw] Mysql Threads

2003-11-25 Thread Adam Hooper
X-Istence wrote:
Adam Hooper wrote:
Many people have used it in more critical applications, and it's up to 
the task. Slashdot, for instance, or Yahoo! Finance.
>
Last i checked Slashdot was running PostGreSQL.
http://www.mysql.com/press/user_stories/slashdot.html

"Naturally, Slashdot has been running on the world's most popular open 
source database, MySQL, since the site's inception in 1997" (published 
April 2002).

Have they switched more recently? I never heard of it if they have

--
Adam Hooper
[EMAIL PROTECTED]


Re: [vchkpw] Mysql Threads

2003-11-24 Thread X-Istence
Adam Hooper wrote:

I've never had problems with InnoDB in the past 1-2 years. In one case 
it's being used for some fairly computationally intense PHP website 
calculations.

Many people have used it in more critical applications, and it's up to 
the task. Slashdot, for instance, or Yahoo! Finance.

It's around the same speed as MyISAM. One thing it's missing is 
fulltext searching... but you can't win 'em all

It's not really all that useful for vpopmail, because all the data's 
in one table anyway. But using InnoDB wouldn't cause all that much harm.

InnoDB is installed and initialized by default on MySQL 4.x. To use 
it, just ALTER TABLE table_name TYPE=InnoDB (could take a while if 
it's a big table -- you might want to create a separate InnoDB table 
and copy a few thousand rows at a time), or when CREATE-ing, CREATE 
TABLE table_name (blah blah blah) TYPE=InnoDB.

Last i checked Slashdot was running PostGreSQL.




Re: [vchkpw] Mysql Threads

2003-11-24 Thread Adam Hooper
I've never had problems with InnoDB in the past 1-2 years. In one case 
it's being used for some fairly computationally intense PHP website 
calculations.

Many people have used it in more critical applications, and it's up to 
the task. Slashdot, for instance, or Yahoo! Finance.

It's around the same speed as MyISAM. One thing it's missing is fulltext 
searching... but you can't win 'em all

It's not really all that useful for vpopmail, because all the data's in 
one table anyway. But using InnoDB wouldn't cause all that much harm.

InnoDB is installed and initialized by default on MySQL 4.x. To use it, 
just ALTER TABLE table_name TYPE=InnoDB (could take a while if it's a 
big table -- you might want to create a separate InnoDB table and copy a 
few thousand rows at a time), or when CREATE-ing, CREATE TABLE 
table_name (blah blah blah) TYPE=InnoDB.

--
Adam Hooper
[EMAIL PROTECTED]
Erik Bourget wrote:
Adam Hooper <[EMAIL PROTECTED]> writes:


I don't quite follow you. Why is it not relational? Note that MySQL's InnoDB
table storage supports transactions, row-level locks, and foreign keys.


To be fair, I don't count InnoDB as "mysql".  Perhaps I should.  Is it
production-ready (I assume so)?  How is the speed compared to featureless
myisam? 

- Erik






RE: [vchkpw] Mysql Threads

2003-11-24 Thread Ross Davis - DataAnywhere.net
InnoDB and MyISAM (and others) are the storage engines behind Mysql.  As
far as performance goes, InnoDB is very fast was well.  We have been
using it on Production servers for over a year now and it works great.  

Ross Davis
DataAnywhere.net
250-470-9192

ChaletsOnline.com is coming soon
Don't you deserve a vacation!
 

-Original Message-
From: Erik Bourget [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 24, 2003 4:13 PM
To: Adam Hooper
Cc: Mandy; VCHKPW Mailinglist
Subject: Re: [vchkpw] Mysql Threads


Adam Hooper <[EMAIL PROTECTED]> writes:

> I don't quite follow you. Why is it not relational? Note that MySQL's 
> InnoDB table storage supports transactions, row-level locks, and 
> foreign keys.

To be fair, I don't count InnoDB as "mysql".  Perhaps I should.  Is it
production-ready (I assume so)?  How is the speed compared to
featureless myisam? 

- Erik







  1   2   >