Re: Compiling Problems 4.10.14.

2001-06-05 Thread Ken Jones


Syntax error in the code. It will be fixed.
You can change it yourself for the moment: 

vmysql.c line 830 change:
   res = mysql_store_result(mysql_update);
To:
   res_update = mysql_store_result(mysql_update); 

also modify line 858 in the same way 

Thanks for finding it ;) 

Ken Jones 


Ryan Duda writes: 

 Under FreeBSD 4.3-S 
 
 gcc -I. -I/usr/local/include/mysql -g -O2 -Wall -c vauth.c
 vauth.c: In function `vcreate_ip_map_table':
 vauth.c:830: `res' undeclared (first use in this function)
 vauth.c:830: (Each undeclared identifier is reported only once
 vauth.c:830: for each function it appears in.)
 vauth.c: In function `vget_ip_map':
 vauth.c:858: `res' undeclared (first use in this function)
 *** Error code 1 
 
 Stop in /root/vpopmail-4.10.14.
 *** Error code 1 
 
 
 ./configure [EMAIL PROTECTED]
 --enable-tcprules-prog=/usr/local/bin/tcprules
 --enable-logging=y
 --enable-log-name=vpopmail
 --enable-vpopuser=vpopmail
 --enable-vpopgroup=vchkpw
 --enable-sqlincdir=/usr/local/include/mysql
 --enable-sqllibdir=/usr/local/lib/mysql
 --enable-mysql=y
 --enable-valias=y
 --enable-large-site=y
 --enable-ip-alias-domains=y
 --enable-qmail-ext=n
 --enable-apop=n
 --enable-passwd=n
 --enable-tcpserver-file=~vpopmail/etc/tcp.smtp 
 
 Thanks,
 -Ryan 
 
 



Re: valias: command processing ?

2001-06-05 Thread Ken Jones


No, 

I need to go through Kris's dbfunction code to get
a good way on how to exec programs. Hopefully I
can get this done today. 

Ken 

Justin Heesemann writes: 

 addition: 
 
 i'm using 4.10.14...
 vdelivermail.c: 
 
 ___
 int run_command_alias(char *command)
 {
  char *tmpstr;
  int i=0,j=0;
  int file_count;
  int pim[2];
  unsigned long pid;
  char **binargs;
  char **startbin;
  int status; 
 
 return(0); 
 
 __ 
 
 err.. :) damn. i guess it's not supposed to run ANY commands then hm ? 
 
 
 Ken: can i remove that return(0); line safely ?? or is it so unstable,
 that the return(0); line is there to prevent any damage ? 
 
 regards, 
 
 Justin 
 
 
 



Re: Where is the authlib directory

2001-06-05 Thread Ken Jones


The authlib directory is in the sqwebmail package. 

burrett writes: 

 Roger Arnold wrote: 
 
 Hello All, 
 
 I have just downloaded vpopmail-4.10.14 and noticed on the download
 page that if sqwebmail is going to be used, a file has to be changed
 in the authlib directory,
 so where is the directory? 
 
 I couldn't find it in the vpopmail-4.10.14 source directory, nor can I
 find it in the ~vpopmail/ directory tree after compilation. 
 
 I need sqwebmail so I need to find this directory, please help 
 
 Thanks in advance
 Regards
 Roger 
 
 



[BUG] Vdelivermail, Maildir support and NFS 'safety'

2001-06-05 Thread Marcus Williams

Hi -

[this message is probably only of interest to people running a
development version of vpopmail (post 4.10.3) with their domains on
NFS mounted drives]

I noticed in a recent version of vpopmail (version 4.10.3), the
delivery method (deliver_mail) has stopped delivering to the
Maildir/tmp (from now on referred to as /tmp) directory first in order
to remove a system call to rename from the code (the /tmp file was
then linked to Maildir/new - referred to from now on as /new).

I've been looking at the new code (version 4.10.14) and it appears to
be going straight to the /new directory now which is incorrect if you
are trying to follow the Maildir algorithm (that ensures
safe/guaranteed delivery, requires no locking under NFS etc). The
whole point of delivering first to /tmp and then linking this file to
/new is to stop corrupt messages ever hitting Maildir/new and to
ensure reliable delivery under NFS failures/machine crashes etc. Once
a message is linked from /tmp to /new (and then stat()'d to make sure
its there) the idea is that it guaranteed not to be
incomplete/undelivered. After linking it to the /new area, assuming
there is no error we can remove the /tmp file.

With the development versions (4.10.3+) if the server crashes during
delivery (mid file write) this will leave a corrupt message on the
server in the /new delivery area, something the Maildir format is
designed not to do.. Admittedly Qmail will probably try and redeliver
the message as it has not been delivered successfully but without the
initial delivery to /tmp a user can receive corrupt messages.

There is also a bug for NFS in that fsync() (or fdatasync?) is not
called on the file vdelivermail writes to in the delivery area so you
do not guarantee it has actually been written. This means the file can
be successfully delivered according to vdelivermail but in reality
only locally cached and not written out (commited?) to the NFS drive.
Vdelivermail will have returned success but if the machine crashes at
this point the mail can potentially disappear if the NFS mount doesnt
recover properly.

Is there any reason (other than optimisation) that these calls have
been removed (or in the case of the missing fsync not implemented)?

Marcus

--
Marcus Williams - http://www.onq2.com
Quintic Ltd, 39 Newnham Rd, Cambridge, CB3 9EY




Re: Vdelivermail, Maildir support and NFS 'safety'

2001-06-05 Thread Ken Jones

Marcus Williams writes:

 Hi - 
 
 [this message is probably only of interest to people running a
 development version of vpopmail (post 4.10.3) with their domains on
 NFS mounted drives] 
 
 I noticed in a recent version of vpopmail (version 4.10.3), the
 delivery method (deliver_mail) has stopped delivering to the
 Maildir/tmp (from now on referred to as /tmp) directory first in order
 to remove a system call to rename from the code (the /tmp file was
 then linked to Maildir/new - referred to from now on as /new). 
 
 I've been looking at the new code (version 4.10.14) and it appears to
 be going straight to the /new directory now which is incorrect if you
 are trying to follow the Maildir algorithm (that ensures
 safe/guaranteed delivery, requires no locking under NFS etc). The
 whole point of delivering first to /tmp and then linking this file to
 /new is to stop corrupt messages ever hitting Maildir/new and to
 ensure reliable delivery under NFS failures/machine crashes etc. Once
 a message is linked from /tmp to /new (and then stat()'d to make sure
 its there) the idea is that it guaranteed not to be
 incomplete/undelivered. After linking it to the /new area, assuming
 there is no error we can remove the /tmp file. 
 
 With the development versions (4.10.3+) if the server crashes during
 delivery (mid file write) this will leave a corrupt message on the
 server in the /new delivery area, something the Maildir format is
 designed not to do.. Admittedly Qmail will probably try and redeliver
 the message as it has not been delivered successfully but without the
 initial delivery to /tmp a user can receive corrupt messages. 
 
 There is also a bug for NFS in that fsync() (or fdatasync?) is not
 called on the file vdelivermail writes to in the delivery area so you
 do not guarantee it has actually been written. This means the file can
 be successfully delivered according to vdelivermail but in reality
 only locally cached and not written out (commited?) to the NFS drive.
 Vdelivermail will have returned success but if the machine crashes at
 this point the mail can potentially disappear if the NFS mount doesnt
 recover properly. 
 
 Is there any reason (other than optimisation) that these calls have
 been removed (or in the case of the missing fsync not implemented)?

Yes, there is another reason. I like to get about 8 hours of
sleep a night :) 

Ken Jones 




RE: Vdelivermail, Maildir support and NFS 'safety'

2001-06-05 Thread Marcus Williams

Hi -

Thats fair enough! Okay, so the next question is - does this matter at
all for vpopmail? If it does I can put a patch together that does this
and submit it to you if you want. If it doesnt then I can put a patch
up on a website if anyone wants it which I'll try to keep up to date
with vpopmail stable versions (which I tend to follow with our
production box). Obviously the first solution is better since it'll
get more testing in the development versions.

Marcus


 -Original Message-
 From: Ken Jones [mailto:[EMAIL PROTECTED]]
 Sent: 05 June 2001 14:04
 To: [EMAIL PROTECTED]
 Subject: Re: Vdelivermail, Maildir support and NFS 'safety'

[snip]
  Is there any reason (other than optimisation) that these
 calls have
  been removed (or in the case of the missing fsync not
 implemented)?

 Yes, there is another reason. I like to get about 8 hours of
 sleep a night :)

 Ken Jones







Re: Vdelivermail, Maildir support and NFS 'safety'

2001-06-05 Thread Ken Jones

Marcus Williams writes:
 

I think this new version will be more to your liking.
Please review the code and see if it looks okay to you.
I tested it on our NFS system and it seemed to work.
But I have not volume tested it. 

Ken 

PS: Thanks for bringing this up. It needed to be updated. 

 Hi - 
 
 Thats fair enough! Okay, so the next question is - does this matter at
 all for vpopmail? If it does I can put a patch together that does this
 and submit it to you if you want. If it doesnt then I can put a patch
 up on a website if anyone wants it which I'll try to keep up to date
 with vpopmail stable versions (which I tend to follow with our
 production box). Obviously the first solution is better since it'll
 get more testing in the development versions. 
 
 Marcus 
 
 



Re: Vdelivermail, Maildir support and NFS 'safety'

2001-06-05 Thread Ken Jones


Oops, I forgot to put a url. It has been a long day
already. 

http://www.inter7.com/vpopmail/vpopmail-4.10.15.tar.gz 

Ken Jones writes:
  
 
 I think this new version will be more to your liking.
 Please review the code and see if it looks okay to you.
 I tested it on our NFS system and it seemed to work.
 But I have not volume tested it.  
 
 Ken  
 
 PS: Thanks for bringing this up. It needed to be updated.  
 
 Hi -  
 
 Thats fair enough! Okay, so the next question is - does this matter at
 all for vpopmail? If it does I can put a patch together that does this
 and submit it to you if you want. If it doesnt then I can put a patch
 up on a website if anyone wants it which I'll try to keep up to date
 with vpopmail stable versions (which I tend to follow with our
 production box). Obviously the first solution is better since it'll
 get more testing in the development versions.  
 
 Marcus  
 
 
 



Problem delivering mail using 4.10.9

2001-06-05 Thread Dave Weiner

I've successfully built vpopmail 4.10.9 on a Solaris 7 box, and I'm now
testing it.  There seems to be a problem delivering mail.  I get this
message in my log file:


@40003b1d00f22f937f2c delivery 1: deferral:
Unable_to_switch_to_/var/qmail/vpopmail/domains/covad.local:_file_does_not_e
xist._(#4.3.0)/

Which is the wrong directory.  It should be switching to
/var/qmail/vpopmail/domains/0/covad.local

The correct info is stored in the MySQL database:

# bin/vuserinfo -v [EMAIL PROTECTED]
version: 4.10.9
name:   davew
passwd: OOQaPgOnWNk86
uid:0
gid:0
all services available
gecos:  davew
dir:|/var/qmail/vpopmail/domains/0/covad.local/davew|
quota:  NOQUOTA

Is this a known problem with 4.10.9?  Should I upgrade to 4.10.15 that just
came out?


Dave Weiner





RE: Vdelivermail, Maildir support and NFS 'safety'

2001-06-05 Thread Brad Dameron


I am just moving to a NFS server. This is something I would definately
want. Please let me know what becomes of this.

---
Brad Dameron
Network Account Executive
TSCNet Inc.
 www.tscnet.com
Silverdale, WA. 
1-888-8TSCNET



-Original Message-
From: Marcus Williams [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 05, 2001 6:56 AM
To: [EMAIL PROTECTED]
Subject: RE: Vdelivermail, Maildir support and NFS 'safety'


Hi -

Thats fair enough! Okay, so the next question is - does this matter at
all for vpopmail? If it does I can put a patch together that does this
and submit it to you if you want. If it doesnt then I can put a patch
up on a website if anyone wants it which I'll try to keep up to date
with vpopmail stable versions (which I tend to follow with our
production box). Obviously the first solution is better since it'll
get more testing in the development versions.

Marcus


 -Original Message-
 From: Ken Jones [mailto:[EMAIL PROTECTED]]
 Sent: 05 June 2001 14:04
 To: [EMAIL PROTECTED]
 Subject: Re: Vdelivermail, Maildir support and NFS 'safety'

[snip]
  Is there any reason (other than optimisation) that these
 calls have
  been removed (or in the case of the missing fsync not
 implemented)?

 Yes, there is another reason. I like to get about 8 hours of
 sleep a night :)

 Ken Jones








vpopmail + courier-imap

2001-06-05 Thread Wojciech Smolkowski

Hi,

I'm using courier-imap 1.3.8.1, and vpopmail 4.9.7. After pop3 auth, i
have updated user record in lastauth table. Is there any posibility
to have the same update after imap authorization? Have anyone of You wrote
that patch to vpopmail or courier-imap?


wojciech smokowski [ mailto:[EMAIL PROTECTED]]
PGP key: sh# pgpv hkp -a keys.pgp.com/0x2FFD974D
[mobile ph. +48502525521] * Powered by /bin/pine






RE: Error trying to compile + new mysql replication release

2001-06-05 Thread Matt Simerson

 -Original Message-
 From: Ken Jones [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 05, 2001 3:01 AM
 To: Gabriel Ambuehl
 Cc: [EMAIL PROTECTED]
 Subject: Re: Error trying to compile + new mysql replication release
 
 I guess we could do that. It would be easier to impliment a
 list of servers and go down the list untill one is found
 that accepts the connection. 

That works for me, there's even a dbping function you can use to do that.
You can see it used in my cdb-mysql patches.
 
 Which brings up another point. Where do the servers get
 defined. Currently they are compiled in via the vmysql.h
 file. Which is easy to implement. 

I prefer to have them defined in a configuration file. I don't worry about
the fact that users could view the file because on a vpopmail system with
each domain stored in a /etc/passwd user, it's pretty insecure to just allow
users to interactively log into the system. I just plain don't allow it so I
don't mind having a config file floating around with the password in it.
Back in the day when I had to provide telnet/SSH logins I just created a
seperate machine for that purpose and everyone else should take that advise
to heart.

 Another option would be to put the list of servers in some
 configuration file that would get parsed. But I can't see
 a secure way to attempt to hide the passwords. 

That's because you can't. If you crypt them then you can't present the
cleartext version for the challenge. The password must be stored clear text.


 Since domains
 can be stored under any /etc/passwd account, then any user
 on the system would need to have access to the file hence
 they could find the login information. 
 Anyone have any thoughts about this? It would be great
 to be able to compile one binary and use it on multiple
 machines with different mysql server auth info. 
 
 Ken Jones

Which is what I do, and that necessitates having a config file. I suppose
you could be really silly about it and hash the password using something
like Cisco's level 7 that you can easily decrypt but if you can easily
decrypt it, so can someone else. So, I say don't worry about and don't let
users log into your mail server(s) interactively.

Matt




Re: vpopmail + courier-imap

2001-06-05 Thread Ken Jones

Wojciech Smolkowski writes:

 Hi, 
 
 I'm using courier-imap 1.3.8.1, and vpopmail 4.9.7. After pop3 auth, i
 have updated user record in lastauth table. Is there any posibility
 to have the same update after imap authorization? Have anyone of You wrote
 that patch to vpopmail or courier-imap?

With the development version of vpopmail 4.10.15, replace
courier-imaps authlib/preauthvchkpw.c file with
http://www.inter7.com/vpopmail/preauthvchkpw.c 

That will update the authlog. Make sure you download a
new preauthvchkpw.c file. There were errors in it.
I just loaded a new one up. 

Ken 




sqwebmail configure loops

2001-06-05 Thread Qmail

Hi Folks,

I'm trying to build sqwebmail-2.1.0.

Unfortunately when I run: ./configure --with-htmllibdir=/var/www/html
--with-module=authvchkpw --enable-webpass=vpopmail --enable-webpass=yes

The config process just loops, and loops, and loops. It never stops. 

I tried 2.0.0 as well, same problem. 

I'm running a pretty stock version of RH 7.1, and everything else configures
and compiles fine.

Any tips?

Lance





Re: sqwebmail configure loops

2001-06-05 Thread Ken Jones

It is not looping. It is running configure in a whole
lot of directories. Just be patient. It will end. 

Ken 

Qmail writes: 

 Hi Folks, 
 
 I'm trying to build sqwebmail-2.1.0. 
 
 Unfortunately when I run: ./configure --with-htmllibdir=/var/www/html
 --with-module=authvchkpw --enable-webpass=vpopmail --enable-webpass=yes 
 
 The config process just loops, and loops, and loops. It never stops.  
 
 I tried 2.0.0 as well, same problem.  
 
 I'm running a pretty stock version of RH 7.1, and everything else configures
 and compiles fine. 
 
 Any tips? 
 
 Lance 
 
 
 



RE: sqwebmail configure loops

2001-06-05 Thread Qmail

Ok,

It did configure, of course... 

However, I have:

   CPPFLAGS=-I/usr/include/mysql
   LDFLAGS=-L/usr/lib/mysql

Set and exported. 

But I still get:

/home/vpopmail/lib/libvpopmail.a(vauth.o): In function `vupdate_rules':
/root/vpopmail-4.10.14/vauth.c:761: undefined reference to
`mysql_free_result'
/home/vpopmail/lib/libvpopmail.a(vauth.o): In function
`vcreate_dir_control':
/root/vpopmail-4.10.14/vauth.c:1077: undefined reference to
`mysql_free_result

And the like on make.



-Original Message-
From: Ken Jones [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 05, 2001 10:50 AM
To: [EMAIL PROTECTED]
Subject: Re: sqwebmail configure loops


It is not looping. It is running configure in a whole
lot of directories. Just be patient. It will end. 

Ken 

Qmail writes: 

 Hi Folks, 
 
 I'm trying to build sqwebmail-2.1.0. 
 
 Unfortunately when I run: ./configure --with-htmllibdir=/var/www/html
 --with-module=authvchkpw --enable-webpass=vpopmail --enable-webpass=yes 
 
 The config process just loops, and loops, and loops. It never stops.  
 
 I tried 2.0.0 as well, same problem.  
 
 I'm running a pretty stock version of RH 7.1, and everything else
configures
 and compiles fine. 
 
 Any tips? 
 
 Lance 
 
 
 



RE: sqwebmail configure loops

2001-06-05 Thread Sean P. Scanlon

On Tue, 5 Jun 2001, Qmail wrote:

 Ok,

 It did configure, of course...

 However, I have:

CPPFLAGS=-I/usr/include/mysql
LDFLAGS=-L/usr/lib/mysql
you need to add -lmysqlclient maybe to LDFLAGS, look in the
Makefile.



 Set and exported.

 But I still get:

 /home/vpopmail/lib/libvpopmail.a(vauth.o): In function `vupdate_rules':
 /root/vpopmail-4.10.14/vauth.c:761: undefined reference to
 `mysql_free_result'
 /home/vpopmail/lib/libvpopmail.a(vauth.o): In function
 `vcreate_dir_control':
 /root/vpopmail-4.10.14/vauth.c:1077: undefined reference to
 `mysql_free_result

 And the like on make.



 -Original Message-
 From: Ken Jones [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 05, 2001 10:50 AM
 To: [EMAIL PROTECTED]
 Subject: Re: sqwebmail configure loops


 It is not looping. It is running configure in a whole
 lot of directories. Just be patient. It will end.

 Ken

 Qmail writes:

  Hi Folks,
 
  I'm trying to build sqwebmail-2.1.0.
 
  Unfortunately when I run: ./configure --with-htmllibdir=/var/www/html
  --with-module=authvchkpw --enable-webpass=vpopmail --enable-webpass=yes
 
  The config process just loops, and loops, and loops. It never stops.
 
  I tried 2.0.0 as well, same problem.
 
  I'm running a pretty stock version of RH 7.1, and everything else
 configures
  and compiles fine.
 
  Any tips?
 
  Lance
 
 



-- 
-
Sean P. Scanlon
perl -e 'print pack(h*, 3707370426c6575646f647e2e65647), \n'
-




RE: sqwebmail configure loops

2001-06-05 Thread Qmail

Still no dice:
gcc  -I/home/vpopmail/include -lmysqlclient -Wall -I.. -I./..
-L/home/vpopmail/lib -L/usr/lib/mysql -o authvchkpw  modauthvchkpw.o
libauthmod.a libauth.a ../md5/libmd5.a ../sha1/libsha1.a -lvpopmail  -lm
-lcrypt 
.
.
.

/home/vpopmail/lib/libvpopmail.a(vauth.o): In function `vwrite_dir_control':
/root/vpopmail-4.10.14/vauth.c:1030: undefined reference to `mysql_query'
/root/vpopmail-4.10.14/vauth.c:1034: undefined reference to
`mysql_store_result'
/root/vpopmail-4.10.14/vauth.c:1035: undefined reference to
`mysql_free_result'
/home/vpopmail/lib/libvpopmail.a(vauth.o): In function
`vcreate_dir_control':
/root/vpopmail-4.10.14/vauth.c:1047: undefined reference to `mysql_query'
/root/vpopmail-4.10.14/vauth.c:1052: undefined reference to
`mysql_store_result'
/root/vpopmail-4.10.14/vauth.c:1053: undefined reference to
`mysql_free_result'
/root/vpopmail-4.10.14/vauth.c:1071: undefined reference to `mysql_query'
/root/vpopmail-4.10.14/vauth.c:1076: undefined reference to
`mysql_store_result'
/home/vpopmail/lib/libvpopmail.a(vauth.o): In function `vdel_dir_control':
/root/vpopmail-4.10.14/vauth.c:1088: undefined reference to `mysql_query'
/root/vpopmail-4.10.14/vauth.c:1092: undefined reference to
`mysql_store_result'
/root/vpopmail-4.10.14/vauth.c:1093: undefined reference to
`mysql_free_result'
/home/vpopmail/lib/libvpopmail.a(vauth.o): In function `vupdate_rules':
/root/vpopmail-4.10.14/vauth.c:761: undefined reference to
`mysql_free_result'
/home/vpopmail/lib/libvpopmail.a(vauth.o): In function
`vcreate_dir_control':
/root/vpopmail-4.10.14/vauth.c:1077: undefined reference to
`mysql_free_result'
collect2: ld returned 1 exit status
make[1]: *** [authvchkpw] Error 1
make[1]: Leaving directory `/usr/local/src/sqwebmail-2.1.0/authlib'
make: *** [all-recursive] Error 1
[root@fax sqwebmail-2.1.0]# pwd
/usr/local/src/sqwebmail-2.1.0

-Original Message-
From: Raghu V Singh [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 05, 2001 1:06 PM
To: Qmail
Subject: RE: sqwebmail configure loops



Instead of your home directory try compiling it in /usr/local/src/

HTH

RVS

From:Qmail [EMAIL PROTECTED] on 06/05/2001 11:46 AM MST

Sent by: Qmail [EMAIL PROTECTED]

To:  '[EMAIL PROTECTED]' [EMAIL PROTECTED]
cc:  (bcc: Raghu V Singh/rsingh1/LSU)

Subject:  RE: sqwebmail configure loops



Ok,

It did configure, of course...

However, I have:

   CPPFLAGS=-I/usr/include/mysql
   LDFLAGS=-L/usr/lib/mysql

Set and exported.

But I still get:

/home/vpopmail/lib/libvpopmail.a(vauth.o): In function `vupdate_rules':
/root/vpopmail-4.10.14/vauth.c:761: undefined reference to
`mysql_free_result'
/home/vpopmail/lib/libvpopmail.a(vauth.o): In function
`vcreate_dir_control':
/root/vpopmail-4.10.14/vauth.c:1077: undefined reference to
`mysql_free_result

And the like on make.



-Original Message-
From: Ken Jones [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 05, 2001 10:50 AM
To: [EMAIL PROTECTED]
Subject: Re: sqwebmail configure loops


It is not looping. It is running configure in a whole
lot of directories. Just be patient. It will end.

Ken

Qmail writes:

 Hi Folks,

 I'm trying to build sqwebmail-2.1.0.

 Unfortunately when I run: ./configure --with-htmllibdir=/var/www/html
 --with-module=authvchkpw --enable-webpass=vpopmail --enable-webpass=yes

 The config process just loops, and loops, and loops. It never stops.

 I tried 2.0.0 as well, same problem.

 I'm running a pretty stock version of RH 7.1, and everything else
configures
 and compiles fine.

 Any tips?

 Lance


























Patches for vpopmail-4.10.15

2001-06-05 Thread Antonio Dias

Ken,

Here is a patch to fix some compilation problems found in vpopmail
4.10.15.

-- 
Antonio Dias


diff -urN vpopmail-4.10.15.orig/vauth.h vpopmail-4.10.15/vauth.h
--- vpopmail-4.10.15.orig/vauth.h   Tue Jun  5 13:05:05 2001
+++ vpopmail-4.10.15/vauth.hWed Jun  6 02:18:47 2001
@@ -54,7 +54,7 @@
 void vclose();
 void vclose1();
 
-int vset_lastauth( char *user, char *domain, char *remoteip);
+int vset_lastauth(char *user, char *dir, char *domain, char *remoteip);
 time_t vget_lastauth( struct vqpasswd *pw, char *domain);
 
 /* these routines are used to admin ip aliased domains */
diff -urN vpopmail-4.10.15.orig/vcdb.c vpopmail-4.10.15/vcdb.c
--- vpopmail-4.10.15.orig/vcdb.cTue Jun  5 13:06:38 2001
+++ vpopmail-4.10.15/vcdb.c Wed Jun  6 02:19:30 2001
@@ -404,7 +404,7 @@
fclose(fs3);
 
 #ifdef ENABLE_AUTH_LOGGING
-vset_lastauth(user, domain, NULL_REMOTE_IP); 
+vset_lastauth(user, dir, domain, NULL_REMOTE_IP); 
 #endif
 
 return(0);
@@ -939,7 +939,7 @@
vpw = vauth_getpw( user, domain );
 
tmpbuf = malloc(MAX_BUFF);
-   sprintf(tmpbuf, %s/lastauth, pw-pw_dir);
+   sprintf(tmpbuf, %s/lastauth, vpw-pw_dir);
if ( (fs = fopen(tmpbuf,w+)) == NULL ) {
free(tmpbuf);
return(-1);
@@ -947,9 +947,8 @@
fprintf(fs, %s, remoteip);
fclose(fs);
free(tmpbuf);
-#else
-   return(0);
 #endif
+   return(0);
 }
 
 time_t vget_lastauth( struct vqpasswd *pw, char *domain)
diff -urN vpopmail-4.10.15.orig/vchkpw.c vpopmail-4.10.15/vchkpw.c
--- vpopmail-4.10.15.orig/vchkpw.c  Sun Jun  3 13:00:49 2001
+++ vpopmail-4.10.15/vchkpw.c   Wed Jun  6 02:21:58 2001
@@ -338,7 +338,7 @@
  * update the authentication time on the account
  */
 #ifdef ENABLE_AUTH_LOGGING
-vset_lastauth(vpw,TheDomain,IpAddr);
+vset_lastauth(TheUser,vpw-pw_dir,TheDomain,IpAddr);
 #endif
 
 #ifdef POP_AUTH_OPEN_RELAY
diff -urN vpopmail-4.10.15.orig/vdeloldusers.c vpopmail-4.10.15/vdeloldusers.c
--- vpopmail-4.10.15.orig/vdeloldusers.cFri Jun  1 09:38:24 2001
+++ vpopmail-4.10.15/vdeloldusers.c Wed Jun  6 02:24:45 2001
@@ -55,7 +55,6 @@
 static MYSQL mysql;
 static MYSQL_RES *res = NULL;
 static MYSQL_ROW row;
-#endif
 
 void usage();
 void get_options(int argc,char **argv);
@@ -143,4 +142,11 @@
exit(-1);
}
 }
+#else
+int main()
+{
+   printf(mysql was not enabled, reconfigure with --enable-mysql=y\n);
+   exit(-1);
+}
+#endif
 #endif