heh, yeah...

Let's say recompiling vpopmail takes 5 minutes.

5 min * 60 sec/min = 300 sec
300 sec / .02 sec/delivery = 15000 deliveries

on a hi-traffic mailserver 15000 deliveries
is maybe less than an HOUR !!!!


So, if you do not know where Your SQL is in one hour
then you propably need to check your routines and
plan everything from scratch :-)

In comparison it takes less than 10 sec to change the 
record in /etc/hosts.

You could also have a cmdline switch in .qmail
"| /vdelivermail '' [EMAIL PROTECTED] sqlhost sqluser sqlpass"
which allows you to override the default sqlconf on
PER USER/DOMAIN BASIS if needed...

Or why not pass the config in ENVIRONMENT and just
restart qmail with the new config. time: less than 10 sec

What about all POP/IMAP connections ?
Many users gets maybe less than 10 emails a day but they
do POP their mailbox every 5 (or less) minutes !!!

## what I mean is waste is that I'm not movin around my
## SQL on a day to day basis so I think it's nothing but waste.

It's also true, which you effectively proved here, that
it is very easy to write the "read-sql-config" functionality
into vpopmail code so I guess the problem is solved now !!!
please submit a patch !

There is ofcourse other anvantage of having sql config
in a single text file instead of compiled-in but that's 
another story.

regards, =d0Mi=

PS. one more thing.
The time it took to write this message is more than twice
the time it'd take to move the SQL server and recompile
vpopmail and that is definitely a waste :-)


> ---- Original Message -----
> Date: 15-Feb-2003 00:23:55 +0100
> From: dWi saSonO b <[EMAIL PROTECTED]>
> To:  <[EMAIL PROTECTED]>
> Subject: Re: [vchkpw] switching database servers
> 
> On 14 Feb 2003 22:45:05 -0000
> [EMAIL PROTECTED] wrote:
> 
> > 
> > To let vpopmail read a config file is nothing
> > but waste....
> > 
> > =d0Mi=
> > 
> example program to get server name,user, and passwd.
> 
> #include <stdio.h>
> #include <string.h>
> 
> char server[20];
> char user[20];
> char passwd[20];
> 
> int main(void )
> {
> 
> FILE *fd;
> char data[100];
> 
> if((fd=fopen("/tmp/test.conf","r"))==NULL) {
>     printf("file tidak bisa dibukan");
>     exit(1);
>     }
> fgets(data,sizeof(data),fd);
> strcpy(server,data);
> strtok(server,"n");
> //printf("server = %sn",server);
> fgets(data,sizeof(data),fd);
> strcpy(user,data);
> strtok(user,"n");
> //printf("username = %sn",user);
> fgets(data,sizeof(data),fd);
> strcpy(passwd,data);
> strtok(passwd,"n");
> //printf("passwd = %sn",passwd);
> fclose(fd);
> }
> 
> [onOs@shadow tmp]$ time ./test
> 
> real    0m0.002s
> user    0m0.000s
> sys     0m0.002s
> 
> /dev/hda:
>  Timing buffer-cache reads:   128 MB in  0.91 seconds =141.25 MB/sec
>  Timing buffered disk reads:  64 MB in  3.19 seconds = 20.07 MB/sec
> 
> 
> why waste ??
> running simple program like that only use resources 0.002 s
> that mean every 500 message had lost delay 1 s
> and my hardisk only use QUANTUM FIREBALLlct20 20, ATA DISK drive
> how abaut SCSI IBM with 160 MB/s ??
> it is not "usefull" ?
> 
> 
> -- 
> thx
> onOs
> 
>

Reply via email to