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!



[vchkpw] mysql auth

2009-02-25 Thread Mohsen Pahlevanzadeh
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:49a575d132681124118433!
##VERSION: $Id: authmysqlrc,v 1.20 2007/10/07 02:50:45 mrsam Exp $
#
# Copyright 2000-2007 Double Precision, Inc.  See COPYING for
# distribution information.
#
# Do not alter lines that begin with ##, they are used when upgrading
# this configuration.
#
# authmysqlrc created from authmysqlrc.dist by sysconftool
#
# DO NOT INSTALL THIS FILE with world read permissions.  This file
# might contain the MySQL admin password!
#
# Each line in this file must follow the following format:
#
# field[spaces|tabs]value
#
# That is, the name of the field, followed by spaces or tabs, followed by
# field value.  Trailing spaces are prohibited.


##NAME: LOCATION:0
#
# The server name, userid, and password used to log in.

MYSQL_SERVERlocalhost
MYSQL_USERNAME  vpopmailuser
MYSQL_PASSWORD  vpoppasswd

##NAME: SSLINFO:0
#
# The SSL information.
#
# To use SSL-encrypted connections, define the following variables (available
# in MySQL 4.0, or higher):
#
#
# MYSQL_SSL_KEY/path/to/file
# MYSQL_SSL_CERT   /path/to/file
# MYSQL_SSL_CACERT /path/to/file
# MYSQL_SSL_CAPATH /path/to/file
# MYSQL_SSL_CIPHERSALL:!DES

##NAME: MYSQL_SOCKET:0
#
# MYSQL_SOCKET can be used with MySQL version 3.22 or later, it specifies the
# filesystem pipe used for the connection
#
 MYSQL_SOCKET   /var/run/mysqld/mysqld.sock

##NAME: MYSQL_PORT:0
#
# MYSQL_PORT can be used with MySQL version 3.22 or later to specify a port to
# connect to.

MYSQL_PORT  3306

##NAME: MYSQL_OPT:0
#
# Leave MYSQL_OPT as 0, unless you know what you're doing.

MYSQL_OPT   0

##NAME: MYSQL_DATABASE:0
#
# The name of the MySQL database we will open:

MYSQL_DATABASE  vpopmail

#NAME: MYSQL_CHARACTER_SET:0
#
# This is optional. MYSQL_CHARACTER_SET installs a character set. This option
# can be used with  MySQL version 4.1 or later. MySQL supports 70+ collations
# for 30+ character sets. See MySQL documentations for more detalis.
#
# MYSQL_CHARACTER_SET latin1

##NAME: MYSQL_USER_TABLE:0
#
# The name of the table containing your user data.  See README.authmysqlrc
# for the required fields in this table. 

MYSQL_USER_TABLEvpopmail

##NAME: MYSQL_CRYPT_PWFIELD:0
#
# Either MYSQL_CRYPT_PWFIELD or MYSQL_CLEAR_PWFIELD must be defined.  Both
# are OK too. crypted passwords go into MYSQL_CRYPT_PWFIELD, cleartext
# passwords go into MYSQL_CLEAR_PWFIELD.  Cleartext passwords allow
# CRAM-MD5 authentication to be implemented.

MYSQL_CRYPT_PWFIELD pw_passwd

##NAME: MYSQL_CLEAR_PWFIELD:0
#
#
MYSQL_CLEAR_PWFIELD pw_clear_passwd
##NAME: MYSQL_DEFAULT_DOMAIN:0
#
# If DEFAULT_DOMAIN is defined, and someone tries to log in as 'user',
# we will look up 'u...@default_domain' instead.
#
#
# DEFAULT_DOMAINexample.com

##NAME: MYSQL_UID_FIELD:0
#
# Other fields in the mysql table:
#
# MYSQL_UID_FIELD - contains the numerical userid of the account
#
MYSQL_UID_FIELD pw_uid

##NAME: MYSQL_GID_FIELD:0
#
# Numerical groupid of the account

MYSQL_GID_FIELD pw_gid

##NAME: MYSQL_LOGIN_FIELD:0
#
# The login id, default is id.  Basically the query is:
#
#  SELECT MYSQL_UID_FIELD, MYSQL_GID_FIELD, ... WHERE id='loginid'
#

MYSQL_LOGIN_FIELD   pw_name

##NAME: MYSQL_HOME_FIELD:0
#

MYSQL_HOME_FIELD pw_dir 

##NAME: MYSQL_NAME_FIELD:0
#
# The user's name (optional)

#MYSQL_NAME_FIELD   p

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!



[vchkpw] MySQL server has gone away

2008-09-25 Thread Jordi Prats
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!

-- 
Jordi

!DSPAM:48dba63f32311193016743!



[vchkpw] MySQL Domains

2008-06-30 Thread Quey

Hey all,

OK, we all know we can add users directly into MySQL.
But... can we do the same with Domains?

I'm thinking this is not possible since typically no-one emails  
postmaster so vpopmail wouldn't know when to creat the domain root  
directory, just curious if anyone has attempted this and found an  
easy work around.



Q

!DSPAM:48696f4532351905717419!



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!



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

2008-02-25 Thread Steve
Anyone know why no vlog entries, or even table when using MySQL5 and 
vpopmail? Using vpopmail 5.4.25, courier-authlib 0.60.2,


vpopmail configured with --enable-sql-logging and --enable-logging=p and 
--enable-auth-logging


vpopmail works, tables are created, lastauth is there, etc.

But no vlog table.

I am using courier-imap and authlib with qmail, therefore, 
courier-authlib is using authvchkpw


What could possibly cause this? Is it in fact a courier-authlib issue 
perhaps? i.e., is anyone using courier-authlib and getting vlog entries 
when using courier-imap?


Steve




!DSPAM:47c39b46310543995491223!



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!



[vchkpw] mysql sourcing read/update server config file

2007-12-05 Thread Hartmut Wernisch
Hello,

I have a question regarding sourcing the vpopmail.mysql config file.

The first line reflect the reading  mysql db server.
If there is no second line the same values are taken for the update
mysql db server.
I am talking about vpopmail-5.4.25.


Here is parsing the first line of vpopmail.mysql in the vmysql.c which
is used for the reading database server:



 142 sprintf(config, "%s/etc/%s", VPOPMAILDIR, "vpopmail.mysql");
 143 
 144 fp = fopen(config, "r");
 145 if (fp == NULL) {
 146 fprintf(stderr, "vmysql: can't read settings from %s\n", config);
 147 return(VA_NO_AUTH_CONNECTION);
 148 }
 149
 150 /* skip comments and blank lines */
 151 do {
 152 eof = (fgets (conn_info, sizeof(conn_info), fp) == NULL);
 153 } while (!eof && ((*conn_info == '#') || (*conn_info == '\n')));
 154 
 155 if (eof) {
 156 /* no valid data read, return error */
 157 fprintf(stderr, "vmysql: no valid settings in %s\n", config);
 158 return(VA_NO_AUTH_CONNECTION);
 159 }
 160 
 161 conf_read = strdup(conn_info);
 162 MYSQL_READ_SERVER = strtok(conf_read, delimiters);
 163 if (MYSQL_READ_SERVER == NULL) return VA_PARSE_ERROR01;
 164 MYSQL_READ_SOCKET = strtok(NULL, delimiters);
 165 if (MYSQL_READ_SOCKET == NULL) return VA_PARSE_ERROR;
 166 
 167 if (MYSQL_READ_SOCKET[0] != '/') {
 168MYSQL_READ_PORT = atoi(MYSQL_READ_SOCKET);
 169MYSQL_READ_SOCKET = NULL;
 170}
 171 
 172 MYSQL_READ_USER = strtok(NULL, delimiters);
 173 if (MYSQL_READ_USER == NULL) return VA_PARSE_ERROR03;
 174 MYSQL_READ_PASSWD = strtok(NULL, delimiters);
 175 if (MYSQL_READ_PASSWD == NULL) return VA_PARSE_ERROR04;
 176 MYSQL_READ_DATABASE = strtok(NULL, delimiters);
 177 if (MYSQL_READ_DATABASE == NULL) return VA_PARSE_ERROR05;



Now reading the second line for the update server information. If there
is no second line use the previous obtained values from the reading
database server, else parse the second line:

 179 /* skip comments and blank lines */
 180 do {
 181 eof = (fgets (conn_info, sizeof(conn_info), fp) == NULL);
 182 } while (!eof && ((*conn_info == '#') || (*conn_info == '\n')));
 183
 184 if (eof) {
 185 /* re-use read-only settings for update */
 186 MYSQL_UPDATE_SERVER = MYSQL_READ_SERVER;
 187 MYSQL_UPDATE_PORT = MYSQL_READ_PORT;
 188 MYSQL_UPDATE_USER = MYSQL_READ_USER;
 189 MYSQL_UPDATE_PASSWD = MYSQL_READ_PASSWD;
 190 MYSQL_UPDATE_DATABASE = MYSQL_READ_DATABASE;
 191 MYSQL_UPDATE_SOCKET = MYSQL_READ_SOCKET;
 192 } else {
 193 conf_update = strdup(conn_info);
 194 MYSQL_UPDATE_SERVER = strtok(conf_update, delimiters);
 195 if (MYSQL_UPDATE_SERVER == NULL) return VA_PARSE_ERROR06;
 196  
 197 MYSQL_READ_SOCKET = strtok(NULL, delimiters);
 198 if (MYSQL_READ_SOCKET == NULL) return VA_PARSE_ERROR;
 199  
 200 if (MYSQL_READ_SOCKET[0] != '/') {
 201 MYSQL_READ_PORT = atoi(MYSQL_READ_SOCKET);
 202 MYSQL_READ_SOCKET = NULL;
 203 }
 204  
 205 MYSQL_UPDATE_USER = strtok(NULL, delimiters);
 206 if (MYSQL_UPDATE_USER == NULL) return VA_PARSE_ERROR08;
 207 MYSQL_UPDATE_PASSWD = strtok(NULL, delimiters);
 208 if (MYSQL_UPDATE_PASSWD == NULL) return VA_PARSE_ERROR09;
 209 MYSQL_UPDATE_DATABASE = strtok(NULL, delimiters);
 210 if (MYSQL_UPDATE_DATABASE == NULL) return VA_PARSE_ERROR10;
 211 }


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?


Regards,
Hartmut



!DSPAM:475682a432008129516775!



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


[vchkpw] Mysql table

2007-09-18 Thread mlist

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.


Matt


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




[vchkpw] MySQL going down results in 5xx error

2006-01-24 Thread Jennifer Abel
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.

Thank You!
Jenn 


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



[vchkpw] MySQL 4.0.x frequent database corruption?

2005-11-07 Thread Jack Kerouac
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,

--
Jack


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



[vchkpw] mysql - valias sequence?

2005-07-19 Thread John Simpson

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.


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.)


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?


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?


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


--
| 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 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



[vchkpw] Mysql replica

2005-03-16 Thread Riccardo Bini
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-)

Bye
Riccardo


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


[vchkpw] mysql int and C's int limit

2005-03-11 Thread ceg ryan
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 ?


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



[vchkpw] mysql and valias_insert()

2005-02-12 Thread James Whitt
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.  I was
curious if this is how it's supposed to work even though mysql has
been specified or possibly in the new versions it places the
information in the valias table now.  I know I can just have my
program use the mysql database directly, I was just hoping to use the
vpopmail library as much as possible.

James Whitt


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



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

2005-01-27 Thread David Diaz
Hi everybody:
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:

[mysqld]
port= 3306
socket  = /tmp/mysql.sock
skip-locking
key_buffer = 256M
max_allowed_packet = 1M
table_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
myisam_sort_buffer_size = 64M
thread_cache = 8
query_cache_size= 16M
max_connections=1000
Please, Help me!!!
Regards,
David
_
T1msn Fotos: Todo lo que quieres saber sobre fotografía digital 
http://search.t1msn.com.mx/



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]



[vchkpw] MySQL problems in 5.4.7

2004-10-26 Thread Toshihiko Kyoda
Hello, all.

I've got a mysql problems, 
after upgrading vpopmail from 5.2.1 to 5.4.7.

I'm using vpopmail with MySQL 3.23.53 on Redhat Linux.

++   +--+
| MySQL  | mysql | vpopmail |+ <-- POP3
| server |<--| server   || <-- SMTP
++   +--+|
  +--+
  * using MySQL for auth module.
enabling roaming-users.(clearopensmtp runs every 5 minutes)
multiple vpopmail server and one MySQL server.


Upgrade was successful and was operating normally.
But, when load becomes high, it becomes impossible to connect 
with MySQL server.
It is a time of probably clearopensmtp running.


It will be in the following states then.

vpopmail server(POP3):
  vchkpw can't authenticate.
  --- error log ---
  Oct 15 10:15:32 mw00 vpopmail[15671]: vchkpw-pop3: 
  vpopmail user not found [EMAIL PROTECTED]:XXX.XXX.XXX.XXX
  -
  ([EMAIL PROTECTED] is valid id.)

vpopmail server(SMTP):
  Remote delivery was successful.
  Local delivery was deferral.

MySQL server:
  'Aborted_connects' is increasing and, block the vpopmail server's
  connections.

If the following commands are executed, a problem will be solved
temporarily.

MySQL server:
shell> mysqladmin flush-hosts

However, the problem same after a while again arises.
It looks like a MySQL connection error.

I didn't get these errors in vpopmail 5.2.1.
It was operating under high load.


Are there any problems in MySQL connection of vpopmail 5.4.7?

Best Regards.

--- 
Toshihiko Kyoda
<[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/


[vchkpw] MySql load causes bounced mail

2004-10-21 Thread Jason Wilkinson
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-





[vchkpw] mysql and valias

2004-09-16 Thread Dave Goodrich
Good morning,
I am happy to say that I think I understand how dir_control works in 
mysql. I do not understand the use of every field but the fields that 
have an effect I di understand. I will try to get something together in 
the next for anyone interested.

My question, valias, anyone using it? I would like to move to valias and 
away from dot-qmail files. We use our dot-qmail files for calling a spam 
script, forwards, copies, autoresponders, etc. I would imagine the same 
as everyone else.

Does it do nothing more than store the commands, and run them when 
needed? I've looked for documentation and not found much. I would be 
happy to write up something if I use it.

DAve
--
Systems Administrator
http://www.tls.net
Get rid of Unwanted Emails...get TLS Spam Blocker!



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




[vchkpw] MySQL logging

2004-08-24 Thread Maurice Snellen
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] dumb question - courier/vchkpw/mysql

2004-08-11 Thread Jeremy Kitchen
On Wednesday 11 August 2004 03:20 pm, Paul Theodoropoulos wrote:
> okay, hopefully this isn't too stupid a question.
>
> i'm needing to upgrade courier-imap. my vpopmail has been running off mysql
> backend forever. when i configure courier, should i still use
> --with-authvchkpw, or does my use of mysql mean it would be more direct to
> just use --with-authmysql? (i'm aware courier will normally compile every
> damned authentication method on the planet and its aunt, but i normally
> disable all but the one i need).

I believe the authvchkpw, cuz then it links against vpopmail and uses its.  
I'm not sure exactly how the mysql backend works, I'm sure you could hack it 
together to authenticate vpopmail mysql users, but I'm not sure how it works 
(for instance, pure-ftpd you tell it what sql queries to use to get 
information it needs, etc)

-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



[vchkpw] dumb question - courier/vchkpw/mysql

2004-08-11 Thread Paul Theodoropoulos
okay, hopefully this isn't too stupid a question.
i'm needing to upgrade courier-imap. my vpopmail has been running off mysql 
backend forever. when i configure courier, should i still use 
--with-authvchkpw, or does my use of mysql mean it would be more direct to 
just use --with-authmysql? (i'm aware courier will normally compile every 
damned authentication method on the planet and its aunt, but i normally 
disable all but the one i need).

or am i misunderstanding the mysql backend?
Paul Theodoropoulos
http://www.anastrophe.com
http://www.smileglobal.com



[vchkpw] MySQL v4.1.x support?

2004-07-22 Thread Oden Eriksson
Hi.

I was wondering if latest vpopmail devel version works with MySQL 4.1.3? 
Anyone tried it?

-- 
Regards // Oden Eriksson


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



[vchkpw] mysql dir_control table

2004-07-16 Thread Dave Goodrich
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.

What can I post to help decipher this issue, or what can I read?

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



[vchkpw] mysql help

2004-05-19 Thread Mark Matrafajlo

> 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 ?
thx
Mark



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



[vchkpw] MySQL error messages & vpalias.c

2004-05-06 Thread Rick Widmer
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?
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?
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?

Rick



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


[vchkpw] MySQL / LDAP

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


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/


[vchkpw] mysql aliases

2004-04-23 Thread Werner Amon
Hi,

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

Werner


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 
>
>
>



[vchkpw] mysql vlog

2004-04-22 Thread Jeff Koch
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 




[vchkpw] mysql-auth replicated databases

2004-04-21 Thread Jeff Koch
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?

Thanks in advance for the advice and counsel.

Jeff Koch 




  1   2   3   >