[vchkpw] only allow SMTP from SMTP-AUTH relays

2004-05-16 Thread isp
Is there a vpopmail mechanism to only permit SMTP connections inbound for
those IPs that appear in the current relays table?  I realize that this
means that SMTPd probably needs to talk to the MYSQL db with the relay
table (my implementation), but I'm curious if this is doable.  VPOPMAIL
5.2.1, RH Linux 7.3, qmail 1.03




Re: [vchkpw] valias catch-all

2004-05-16 Thread Tom Collins
On May 16, 2004, at 4:22 PM, Ewan Bain wrote:
On Friday 14 May 2004 9:40 pm, Tom Collins wrote:
On May 14, 2004, at 10:20 AM, Ewan Bain wrote:
I'm trying to use valias to setup a catch-all address. I've tried
several
different ways and the mail always bounces. Is it possible to setup a
catch-all with valias? Is so how?
The catchall is in .qmail-default.  Delivery is handled by 
qmail-local,
and vdelivermail (and the valiases it processes) are not involved.
I can't believe I actually wrote that.
vdelivermail is most definitely involved in catchall delivery.
I guess what I was trying to say was that adding a valias for user 
'default' won't work.  The catchall user must be specified as the 
second parameter to vdelivermail in the .qmail-default file.

--
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] valias catch-all

2004-05-16 Thread Rick Widmer

Ewan Bain wrote:
On Friday 14 May 2004 9:40 pm, Tom Collins wrote:
On May 14, 2004, at 10:20 AM, Ewan Bain wrote:
I'm trying to use valias to setup a catch-all address. I've tried
several
different ways and the mail always bounces. Is it possible to setup a
catch-all with valias? Is so how?
The catchall is in .qmail-default.  Delivery is handled by qmail-local,
and vdelivermail (and the valiases it processes) are not involved.

Maybe I'm not understanding or I didn't make myself clear. If I understand 
correctly, qmail will look in the users home directory for a .qmail file 
matching the address it would normally find nothing so uses the 
.qmail-default file. This then runs vdelivermail which checks for a virtual 
user to deliver the mail to. This could either be a vpopmail Mailbox or a 
valias address in the valias table (I'm using MySQL). In what order are these 
checked? If vdelivermail finds nothing qmail will then look at what comes 
next in the .qmail-default file and in this case bounce the mail. I know I 
can add an address to the .qmail-default file to act as a catch all but it 
would be easier to add a catch all to the valias table and have vdelivermail 
deal with it like any other valias. Is this possible? I've tried "default", " 
",  "*" and nothing works.
Forget qmail.  It has nothing to do with catchall account handling. 
Catchall status is a parameter to the vdelivermail program commonly 
called in the file .qmail-default.  Its legal values are:

   delete
   bounce-no-mailbox
   /path/to/a/Maildir
   [EMAIL PROTECTED]
.qmail-default
-
!/path/to/vdelivermail '' CATCHALL_OPTION
-
There is no wildcard support in valias.



Re: [vchkpw] valias catch-all

2004-05-16 Thread Ewan Bain
On Friday 14 May 2004 9:40 pm, Tom Collins wrote:
> On May 14, 2004, at 10:20 AM, Ewan Bain wrote:
> > I'm trying to use valias to setup a catch-all address. I've tried
> > several
> > different ways and the mail always bounces. Is it possible to setup a
> > catch-all with valias? Is so how?
>
> The catchall is in .qmail-default.  Delivery is handled by qmail-local,
> and vdelivermail (and the valiases it processes) are not involved.
>

Maybe I'm not understanding or I didn't make myself clear. If I understand 
correctly, qmail will look in the users home directory for a .qmail file 
matching the address it would normally find nothing so uses the 
.qmail-default file. This then runs vdelivermail which checks for a virtual 
user to deliver the mail to. This could either be a vpopmail Mailbox or a 
valias address in the valias table (I'm using MySQL). In what order are these 
checked? If vdelivermail finds nothing qmail will then look at what comes 
next in the .qmail-default file and in this case bounce the mail. I know I 
can add an address to the .qmail-default file to act as a catch all but it 
would be easier to add a catch all to the valias table and have vdelivermail 
deal with it like any other valias. Is this possible? I've tried "default", " 
",  "*" and nothing works.

Thanks,
Ewan.




Re: [vchkpw] Problems with multi domains in vpopmail

2004-05-16 Thread Patrick Donker




Mário Gamito wrote:

  Hi,

I have  -with-authvchkpw 
I know it's for user's accounts-

What is missing then ?

Thank you for your answer.

Warm Regards,


  
  
-Original Message-
From: Patrick Donker [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, May 16, 2004 5:34 PM
To: [EMAIL PROTECTED]
Subject: Re: [vchkpw] Problems with multi domains in vpopmail

Mário Gamito wrote:



  Hi,

I've compiled vpopmail witg no compiler flags and with 
  

configured options:


  "./configure -without-ipv6 -enable-unicode 
-enable-workarounds-for-imap-client-bugs -without-authpwd 
-without-authpam -without-authuserdb -without-authcram 
  

-with-authvchkpw 


  -without-authldap -without-authmysql -without-authpgsql 
-without-authdaemon -without-authcustom -without-authshadow 
  

--with-redhat"


  Thank you for your ansewr.
The strace output follows my signature.

Warm regards,
Mário Gamito
 

  

Looks like you have removed just about every authentication 
lib there is while configuring. I can imagine that it dies 
this way
How do you authenticate to your server?


  
  

  

I think you'd better read the section on authlibs on inter7.com
(courier-imap) first




Re: [vchkpw] patch: using maildir++ with quota greater than 2GB

2004-05-16 Thread Michael Kefeder

Regardless, it's still a good idea to properly support sizes >2GB.  
Michael, perhaps you could take a look at the latest 5.4 version and 
send me a patch against that?

Yes i can, but looking at the new code (5.4.3) there are some new 
features i don't know about yet (per domain quotas i guess) which also 
need some testing for >2GB compliance. I'm afraid i can't talk my admin 
into testing this new stuff, and i don't have access to a vpopmail 
installation. I personally use a very different setup for my emailserver.

NOTE: I changed the code how i think it should work (including the new 
features) - please test it before you merge it, especially the new 
features. And don't forget the CFLAGS for 64bit ;)

Also what about the %lld issue in scanf and printf? for printf you could 
use a function like the one that the courier guys have (called 
libmail_str_off_t() found in numlib/strofft.c), for reading the 2 
columns there's probably a totally new parser needed to replace scanf 
(or not, if you decide %lld is ok).

btw - there are probably some more fixes ahead, because there are issues 
with race-conditions and the use of off_t i'm currently discussing with 
the courier-imap developers.

 Mike
--- vpopmail-5.4.3/maildirquota.c   2003-12-19 06:16:36.0 +0100
+++ vpopmail-5.4.3_2gbfix/maildirquota.c2004-05-16 19:10:20.725856816 +0200
@@ -43,18 +43,18 @@
time_t *, off_t *, unsigned *);
 static int statcurnew(const char *, time_t *);
 static int statsubdir(const char *, const char *, time_t *);
-static int doaddquota(const char *, int, const char *, long, int, int);
+static int doaddquota(const char *, int, const char *, off_t, int, int);
 static int docheckquota(const char *dir, int *maildirsize_fdptr,
-   const char *quota_type, long xtra_size, int xtra_cnt, int *percentage);
+   const char *quota_type, off_t xtra_size, int xtra_cnt, int *percentage);
 static int docount(const char *, time_t *, off_t *, unsigned *);
 static int maildir_checkquota(const char *dir, int *maildirsize_fdptr,
-   const char *quota_type, long xtra_size, int xtra_cnt);
+   const char *quota_type, off_t xtra_size, int xtra_cnt);
 static int maildir_addquota(const char *dir, int maildirsize_fd,
-   const char *quota_type, long maildirsize_size, int maildirsize_cnt);
+   const char *quota_type, off_t maildirsize_size, int maildirsize_cnt);
 static int maildir_safeopen(const char *path, int mode, int perm);
 static char *str_pid_t(pid_t t, char *arg);
 static char *str_time_t(time_t t, char *arg);
-static int maildir_parsequota(const char *n, unsigned long *s);
+static int maildir_parsequota(const char *n, off_t *s);
 
 
 #define  NUMBUFSIZE  60
@@ -71,8 +71,8 @@
 char   domdir[MAX_PW_DIR];
 char   *p;
 char   domain[256];
-unsigned long size = 0;
-unsigned long maxsize = 0;
+off_t size = 0;
+off_t maxsize = 0;
 intcnt = 0;
 intmaxcnt = 0;
 struct vlimits limits;
@@ -110,7 +110,7 @@
 return 0;
 }
 
-int readdomainquota(const char *dir, long *sizep, int *cntp)
+int readdomainquota(const char *dir, off_t *sizep, int *cntp)
 {
 int tries;
 char   checkdir[256];
@@ -239,14 +239,14 @@
 
return 0;
 }
-int readuserquota(const char* dir, long *sizep, int *cntp)
+int readuserquota(const char* dir, off_t *sizep, int *cntp)
 {
int retval;
off_t s;

-   s = (off_t) *sizep;
+   s = *sizep;
retval = wrapreaduserquota(dir, &s, cntp);
-   *sizep = (long) s;
+   *sizep = s;
return retval;
 }
 
@@ -308,7 +308,7 @@
  int f;
  char *p;
  unsigned l;
- int n;
+ off_t n;
  int first;
 
if ((f=maildir_safeopen(filename, O_RDWR|O_APPEND, 0)) < 0)
@@ -340,9 +340,10 @@
*p=0;
p=buf;
first=1;
+
while (*p)
{
-   long n=0;
+   off_t n=0;
int c=0;
char*q=p;
 
@@ -358,9 +359,11 @@
first=0;
continue;
}
-   sscanf(q, "%ld %d", &n, &c);
-   *sizeptr += n;
-   *cntptr += c;
+   if (sscanf(q, "%lld %d", &n, &c) == 2)
+   {
+   *sizeptr += n;
+   *cntptr += c;
+   }
++ *nlines;
}
*fdptr=f;
@@ -430,7 +433,7 @@
 static int maildir_checkquota(const char *dir,
int *maildirsize_fdptr,
const char *quota_type,
-   long xtra_size,
+   off_t xtra_size,
int xtra_cnt)
 {
 intdummy;
@@ -453,7 +456,7 @@
 static int docheckquota(const char *dir,
int *maildirsize_fdptr,
const char *quota_type,
-   long xtra_size,
+   off_t xtra_size,
int xtra_cnt,
int *percentage)
 {
@@ -615,7 +618,7 @@
 }
 
 static int maildir_addquota(const char *dir, int maildirsize_fd,
-   const char *quota_type, long maildirsize_size, int maildirsize_cnt)
+   const char *quota_type, off_t maildirsize_size, int 

RE: [vchkpw] Problems with multi domains in vpopmail

2004-05-16 Thread Mário Gamito
Hi,

I have  -with-authvchkpw 
I know it's for user's accounts-

What is missing then ?

Thank you for your answer.

Warm Regards,


> -Original Message-
> From: Patrick Donker [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, May 16, 2004 5:34 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [vchkpw] Problems with multi domains in vpopmail
> 
> Mário Gamito wrote:
> 
> >Hi,
> >
> >I've compiled vpopmail witg no compiler flags and with 
> configured options:
> >"./configure -without-ipv6 -enable-unicode 
> >-enable-workarounds-for-imap-client-bugs -without-authpwd 
> >-without-authpam -without-authuserdb -without-authcram 
> -with-authvchkpw 
> >-without-authldap -without-authmysql -without-authpgsql 
> >-without-authdaemon -without-authcustom -without-authshadow 
> --with-redhat"
> >
> >Thank you for your ansewr.
> >The strace output follows my signature.
> >
> >Warm regards,
> >Mário Gamito
> >  
> >
> Looks like you have removed just about every authentication 
> lib there is while configuring. I can imagine that it dies 
> this way
> How do you authenticate to your server?
> 



Re: [vchkpw] Problems with multi domains in vpopmail

2004-05-16 Thread Patrick Donker
Mário Gamito wrote:
Hi,
I've compiled vpopmail witg no compiler flags and with configured options:
"./configure -without-ipv6 -enable-unicode
-enable-workarounds-for-imap-client-bugs -without-authpwd -without-authpam
-without-authuserdb -without-authcram -with-authvchkpw -without-authldap
-without-authmysql -without-authpgsql -without-authdaemon
-without-authcustom -without-authshadow --with-redhat"
Thank you for your ansewr.
The strace output follows my signature.
Warm regards,
Mário Gamito
 

Looks like you have removed just about every authentication lib there is 
while configuring. I can imagine that it dies this way
How do you authenticate to your server?


Re: [vchkpw] patch: using maildir++ with quota greater than 2GB

2004-05-16 Thread Tom Collins
On May 16, 2004, at 9:08 AM, Eduardo M. Bragatto wrote:
Michael Kefeder wrote:
Our admin set up a new mailserver which should provide IMAP to our
coworkers - problem: their current (local) mailboxes are already
scratching the 2GB limit of their mailclients, therefore we needed
higher quotas on the new server to suit the coworkers needs. When
testing his qmail+vpopmail+courier setup there were crazy results when
quota was set to >2GB and even more problems appeared when the maildir
was filled with mails in total of >2GB.
Michael,
	I don't think that's a good ideia to let users keep so much messages 
on the server. Specially if they are using all that space because of 
messages with large attachments (when you attach a file to an e-mail 
message the file size grows about 33%).
	In my opinion you're using the wrong protocol to transport and store 
messages. If they have to send/receive large files, give FTP accounts 
to them. If they want to keep all messages, they should save it on a 
CD or any other media, instead of asking you to increase the quota 
over and over again. Mailboxes were not created to store 2GB each.
	Well, that's my 2 cents ;)
Regardless, it's still a good idea to properly support sizes >2GB.  
Michael, perhaps you could take a look at the latest 5.4 version and 
send me a patch against that?

--
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] patch: using maildir++ with quota greater than 2GB

2004-05-16 Thread Eduardo M. Bragatto
Michael Kefeder wrote:
Our admin set up a new mailserver which should provide IMAP to our
coworkers - problem: their current (local) mailboxes are already
scratching the 2GB limit of their mailclients, therefore we needed
higher quotas on the new server to suit the coworkers needs. When
testing his qmail+vpopmail+courier setup there were crazy results when
quota was set to >2GB and even more problems appeared when the maildir
was filled with mails in total of >2GB.
Michael,
	I don't think that's a good ideia to let users keep so much messages on 
the server. Specially if they are using all that space because of 
messages with large attachments (when you attach a file to an e-mail 
message the file size grows about 33%).
	In my opinion you're using the wrong protocol to transport and store 
messages. If they have to send/receive large files, give FTP accounts to 
them. If they want to keep all messages, they should save it on a CD or 
any other media, instead of asking you to increase the quota over and 
over again. Mailboxes were not created to store 2GB each.
	Well, that's my 2 cents ;)

Regards,
Eduardo M. Bragatto.


RE: [vchkpw] Problems with multi domains in vpopmail

2004-05-16 Thread Mário Gamito
Hi,

I've compiled vpopmail witg no compiler flags and with configured options:
"./configure -without-ipv6 -enable-unicode
-enable-workarounds-for-imap-client-bugs -without-authpwd -without-authpam
-without-authuserdb -without-authcram -with-authvchkpw -without-authldap
-without-authmysql -without-authpgsql -without-authdaemon
-without-authcustom -without-authshadow --with-redhat"

Thank you for your ansewr.
The strace output follows my signature.

Warm regards,
Mário Gamito

strace output:
---
[EMAIL PROTECTED] bin]# strace ./vadddomain xpto123 abc
execve("./vadddomain", ["./vadddomain", "xpto123", "abc"], [/* 23 vars */])
= 0
uname({sys="Linux", node="foo", ...})   = 0
brk(0)  = 0x8057be8
open("/etc/ld.so.preload", O_RDONLY)= -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY)  = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=34963, ...}) = 0
old_mmap(NULL, 34963, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb75e2000
close(3)= 0
open("/lib/libcrypt.so.1", O_RDONLY)= 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\t\0"..., 512) =
512
fstat64(3, {st_mode=S_IFREG|0755, st_size=23364, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0xb75e1000
old_mmap(NULL, 181340, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb75b4000
old_mmap(0xb75b9000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x4000) = 0xb75b9000
old_mmap(0xb75ba000, 156764, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb75ba000
close(3)= 0
open("/lib/tls/libc.so.6", O_RDONLY)= 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\X\1\000"..., 512)
= 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1567484, ...}) = 0
old_mmap(NULL, 1276748, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb747c000
old_mmap(0xb75ae000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x131000) = 0xb75ae000
old_mmap(0xb75b2000, 6988, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb75b2000
close(3)= 0
set_thread_area({entry_number:-1 -> 6, base_addr:0xb75e1a40, limit:1048575,
seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1,
seg_not_present:0, useable:1}) = 0
munmap(0xb75e2000, 34963)   = 0
brk(0)  = 0x8057be8
brk(0x8078be8)  = 0x8078be8
brk(0)  = 0x8078be8
brk(0x8079000)  = 0x8079000
open("/var/qmail/users/cdb", O_RDONLY)  = 3
lseek(3, 1616, SEEK_SET)= 1616
read(3, "\376\10\0\0\0\0\0\0", 8)   = 8
close(3)= 0
brk(0)  = 0x8079000
brk(0)  = 0x8079000
brk(0x8078000)  = 0x8078000
brk(0)  = 0x8078000
umask(077)  = 022
getcwd("/home/vpopmail/bin", 256)   = 19
chdir("/home/vpopmail") = 0
chdir("domains")= 0
open("/var/qmail/users/cdb", O_RDONLY)  = 3
lseek(3, 96, SEEK_SET)  = 96
read(3, "\356\10\0\0\0\0\0\0", 8)   = 8
close(3)= 0
open("/home/vpopmail/domains/.dir-control", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0600, st_size=34, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb75ea000
read(3, "3\n0\n3\n0 0 0\n61 61 61\n0 2 2\n0 0 0"..., 4096) = 34
read(3, "", 4096)   = 0
close(3)= 0
munmap(0xb75ea000, 4096)= 0
open("/var/qmail/users/cdb", O_RDONLY)  = 3
lseek(3, 96, SEEK_SET)  = 96
read(3, "\356\10\0\0\0\0\0\0", 8)   = 8
close(3)= 0
getpid()= 1964
open("/home/vpopmail/domains/.dir-control.1964", O_RDWR|O_CREAT|O_TRUNC,
0666) = 3
fstat64(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb75ea000
write(3, "4\n0\n3\n0 0 0\n61 61 61\n0 2 2\n0 0 0"..., 34) = 34
close(3)= 0
munmap(0xb75ea000, 4096)= 0
rename("/home/vpopmail/domains/.dir-control.1964",
"/home/vpopmail/domains/.dir-control") = 0
chown32("/home/vpopmail/domains/.dir-control", 509, 509) = 0
mkdir("xpto123", 0750)  = 0
chown32("xpto123", 509, 509)= 0
chdir("xpto123")= 0
open("/home/vpopmail/domains/xpto123/.qmail-default",
O_RDWR|O_CREAT|O_TRUNC, 0666) = 3
fstat64(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb75ea000
write(3, "| /home/vpopmail/bin/vdelivermai"..., 55) = 55
close(3)= 0
munmap(0xb75ea000, 40

[vchkpw] patch: using maildir++ with quota greater than 2GB

2004-05-16 Thread Michael Kefeder
Hi list
Our admin set up a new mailserver which should provide IMAP to our
coworkers - problem: their current (local) mailboxes are already
scratching the 2GB limit of their mailclients, therefore we needed
higher quotas on the new server to suit the coworkers needs. When
testing his qmail+vpopmail+courier setup there were crazy results when
quota was set to >2GB and even more problems appeared when the maildir
was filled with mails in total of >2GB.
Being a programmer the admin contacted me if i could look at the code.
What i first figured out was that you seem to use 32bit off_t typedefs
for vpopmail. Information about that can be found here:
http://ac-archive.sourceforge.net/largefile/makedefault.html
Next i started to fix the maildirquota.[ch] files which used a mix of
off_t and long for filesize- and quota-calculations to use off_t in
every case. This seems to fix the problems we had with false reports of
"user over quota" and similar stuff. We tested behaviour for a
quota-size of 3GB and mails ranging from 1.5GB to 2.8GB in total, and we
went over quota too of course. Everything went fine.
The patch is attached to this mail, to actually take advantage of the
new code you need to do the following:
$ patch -p1 < vpopmail-maildirquota.patch
$ export CFLAGS=-D_FILE_OFFSET_BITS=64
$ ./configure --your-flags
$ make
...
w/o the CFLAGS off_t will be 32bit and the problems will persist.
Developers of vpopmail may want to include that #define into their
configure.ac file, because then it will appear in config.h and there's
no need for external CFLAGS.
I hope you find this patch useful, it was made against vpopmail-5.3.8
I also patched courier-imap to fix the issues for such high quotas, this
patch went to the courier-imap ML of course. There's discussion about 
whether to use off_t or not, and string to number conversion issues - 
please share your thoughts with me about these changes in the vpopmail 
source (changes are similar for both projects).

Yours
  Mike
p.s.: sscanf is used to read some maildirsize entries - afaik the %lld i
used to read "long long" values is GNU only, this may be a problem for
keeping the code crossplattform. same goes for sprintf statements.
p.p.s.: It would be nice if you mention somewhere on the homepage that 
the ML is for subscribers only.

--- vpopmail-5.3.8/maildirquota.c   2002-05-18 06:16:29.0 +0200
+++ vpopmail-5.3.8_2gbfix/maildirquota.c2004-05-16 15:49:50.0 +0200
@@ -39,11 +39,11 @@
time_t *, off_t *, unsigned *);
 static int statcurnew(const char *, time_t *);
 static int statsubdir(const char *, const char *, time_t *);
-static int doaddquota(const char *, int, const char *, long, int, int);
+static int doaddquota(const char *, int, const char *, off_t, int, int);
 static int docheckquota(const char *dir,
int *maildirsize_fdptr,
const char *quota_type,
-   long xtra_size,
+   off_t xtra_size,
int xtra_cnt, int *percentage);
 static int docount(const char *, time_t *, off_t *, unsigned *);
 int deliver_quota_warning(const char *dir);
@@ -103,35 +103,34 @@
 
 char *format_maildirquota(const char *q) {
 int i;
-int per_user_limit;
+off_t   per_user_limit;
 static chartempquota[500];
 
 /* translate the quota to a number, or leave it */
 i = strlen(q) - 1;
 tempquota[0] = '\0'; /* make sure tempquota is 0 length */
 if(strstr(q, ",") == NULL && q[i] != 'S') {
-per_user_limit = atol(q);
+per_user_limit = atoll(q);
 for(i=0;q[i]!=0;++i) {
 if ( q[i] == 'k' || q[i] == 'K' ) {
 per_user_limit = per_user_limit * 1000;
-snprintf(tempquota, 500, "%dS", per_user_limit);
+snprintf(tempquota, 500, "%lldS", per_user_limit);
 break;
 }
 if ( q[i] == 'm' || q[i] == 'M' ) {
 per_user_limit = per_user_limit * 100;
-sprintf(tempquota, "%dS", per_user_limit);
+snprintf(tempquota, 500, "%lldS", per_user_limit);
 break;
 }
 }
 
 
 if(strlen(tempquota) == 0) {
-sprintf(tempquota, "%sS", q);
+snprintf(tempquota, 500, "%sS", q);
 }
 } else {
-  sprintf(tempquota, "%s", q);
+  snprintf(tempquota, 500, "%s", q);
 }
-
 return(tempquota);
 }
 
@@ -149,7 +148,7 @@
  int f;
  char *p;
  unsigned l;
- int n;
+ off_t n;
  int first;
 
if ((f=maildir_safeopen(filename, O_RDWR|O_APPEND, 0)) < 0)
@@ -181,9 +180,10 @@
*p=0;
p=buf;
first=1;
+
while (*p)
{
-   long n=0;
+   off_t n=0;
int c=0;
char*q=p;
 
@@ -199,9 +199,11 @@
first=0;
continue;
}
-   sscanf(q, "%ld %d", &n, &c);
+   if (sscanf(q, "%lld %d", &n, &c) == 2)
+   {
*sizeptr += n

Re: [vchkpw] Problems with multi domains in vpopmail

2004-05-16 Thread X-Istence
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mário Gamito wrote:
> Hi,
>
> I've installed vpopmail, but i'm having problems with adding domains.
> The first one i add works just fine.
>
> From the second one on i get this error:
> "Signal 1 caught by ps (procps version 2.0.13).
> Please send bug reports to <[EMAIL PROTECTED]>"
>
> I've compiled vpopmail with --enable-many-domains=y
>
> What can be wrong ?
>
> Any help would be gratly appreciated.
>
> Warm Regards,
> Mário Gamito
>


PLease run:

strace ./vadddomain  

and give us the output.

This procps stuff, can you provide me more info about it? It seems this
is the first case that it goes wrong.

How did you compile vpopmail, what flags, did you use an rpm? Did you
set any special cflags or anything of that sort?

X-Istence
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (FreeBSD)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAp3KYJukONu5DUaQRAlNkAKCY3xWCDAcBKSp5RYKhUEWIV8K8lgCgrAZW
IGSuAbB//6lCcAyhTQmLhtQ=
=Yh8Q
-END PGP SIGNATURE-


Re: [vchkpw] Problems with multi domains in vpopmail

2004-05-16 Thread Patrick Donker




Mário Gamito wrote:

  
  
  
  Sorry, i can't find any bug
report anywhere.
  I've searched all possible files.
   
  Any ideas ?
   
  Warm regards,
  Mário Gamito
  
  

 From:
Patrick Donker [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, May 16, 2004 12:42 PM
To: [EMAIL PROTECTED]
Subject: Re: [vchkpw] Problems with multi domains in vpopmail


Mário Gamito wrote:

  Sorry, but i don't understand your issue.
Would you care to explain it more specifically, please ?

Warm Regards,
Mário Gamito 

  
  
-Original Message-
From: Patrick Donker [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, May 16, 2004 12:25 PM
To: [EMAIL PROTECTED]
Subject: Re: [vchkpw] Problems with multi domains in vpopmail

Pls include your bug report

Mário Gamito wrote:



  Hi,

I've installed vpopmail, but i'm having problems with adding domains.
The first one i add works just fine.

>From the second one on i get this error:
"Signal 1 caught by ps (procps version 2.0.13).
Please send bug reports to <[EMAIL PROTECTED]>"

I've compiled vpopmail with --enable-many-domains=y

What can be wrong ?

Any help would be gratly appreciated.

Warm Regards,
Mário Gamito


 

  


  
  

  

The error says that a bug report has been generated. If you can find
it, please send it to the list because without more info your problem
is nearly impossible to pinpoint. Maybe in /var/log/messages, syslog,
mail, or other logs there is more info on your problem
  

No, I dont run Redhat myself so cant hint you any further. Maybe
somebody else ran into this problem as well, or knows what to look for?




RE: [vchkpw] Problems with multi domains in vpopmail

2004-05-16 Thread Mário Gamito



Sorry, i can't find any bug report 
anywhere.
I've searched all possible files.
 
Any ideas ?
 
Warm regards,
Mário Gamito

  
  
  From: Patrick Donker 
  [mailto:[EMAIL PROTECTED] Sent: Sunday, May 16, 2004 12:42 
  PMTo: [EMAIL PROTECTED]Subject: Re: [vchkpw] Problems 
  with multi domains in vpopmail
  Mário Gamito wrote:
  Sorry, but i don't understand your issue.
Would you care to explain it more specifically, please ?

Warm Regards,
Mário Gamito 

  
-Original Message-
From: Patrick Donker [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, May 16, 2004 12:25 PM
To: [EMAIL PROTECTED]
Subject: Re: [vchkpw] Problems with multi domains in vpopmail

Pls include your bug report

Mário Gamito wrote:


  Hi,

I've installed vpopmail, but i'm having problems with adding domains.
The first one i add works just fine.

>From the second one on i get this error:
"Signal 1 caught by ps (procps version 2.0.13).
Please send bug reports to <[EMAIL PROTECTED]>"

I've compiled vpopmail with --enable-many-domains=y

What can be wrong ?

Any help would be gratly appreciated.

Warm Regards,
Mário Gamito


 

  

  The error says that a bug report has been generated. If 
  you can find it, please send it to the list because without more info your 
  problem is nearly impossible to pinpoint. Maybe in /var/log/messages, syslog, 
  mail, or other logs there is more info on your 
problem


Re: [vchkpw] Problems with multi domains in vpopmail

2004-05-16 Thread Patrick Donker




Mário Gamito wrote:

  Sorry, but i don't understand your issue.
Would you care to explain it more specifically, please ?

Warm Regards,
Mário Gamito 

  
  
-Original Message-
From: Patrick Donker [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, May 16, 2004 12:25 PM
To: [EMAIL PROTECTED]
Subject: Re: [vchkpw] Problems with multi domains in vpopmail

Pls include your bug report

Mário Gamito wrote:



  Hi,

I've installed vpopmail, but i'm having problems with adding domains.
The first one i add works just fine.

>From the second one on i get this error:
"Signal 1 caught by ps (procps version 2.0.13).
Please send bug reports to <[EMAIL PROTECTED]>"

I've compiled vpopmail with --enable-many-domains=y

What can be wrong ?

Any help would be gratly appreciated.

Warm Regards,
Mário Gamito


 

  



  
  

  

The error says that a bug report has been generated. If you can find
it, please send it to the list because without more info your problem
is nearly impossible to pinpoint. Maybe in /var/log/messages, syslog,
mail, or other logs there is more info on your problem




RE: [vchkpw] Problems with multi domains in vpopmail

2004-05-16 Thread Mário Gamito
Sorry, but i don't understand your issue.
Would you care to explain it more specifically, please ?

Warm Regards,
Mário Gamito 

> -Original Message-
> From: Patrick Donker [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, May 16, 2004 12:25 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [vchkpw] Problems with multi domains in vpopmail
> 
> Pls include your bug report
> 
> Mário Gamito wrote:
> 
> >Hi,
> >
> >I've installed vpopmail, but i'm having problems with adding domains.
> >The first one i add works just fine.
> >
> >>From the second one on i get this error:
> >"Signal 1 caught by ps (procps version 2.0.13).
> >Please send bug reports to <[EMAIL PROTECTED]>"
> >
> >I've compiled vpopmail with --enable-many-domains=y
> >
> >What can be wrong ?
> >
> >Any help would be gratly appreciated.
> >
> >Warm Regards,
> >Mário Gamito
> >
> >
> >  
> >
> 
> 



Re: [vchkpw] Problems with multi domains in vpopmail

2004-05-16 Thread Patrick Donker
Pls include your bug report
Mário Gamito wrote:
Hi,
I've installed vpopmail, but i'm having problems with adding domains.
The first one i add works just fine.
From the second one on i get this error:
"Signal 1 caught by ps (procps version 2.0.13).
Please send bug reports to <[EMAIL PROTECTED]>"
I've compiled vpopmail with --enable-many-domains=y
What can be wrong ?
Any help would be gratly appreciated.
Warm Regards,
Mário Gamito
 




[vchkpw] Problems with multi domains in vpopmail

2004-05-16 Thread Mário Gamito
Hi,

I've installed vpopmail, but i'm having problems with adding domains.
The first one i add works just fine.

>From the second one on i get this error:
"Signal 1 caught by ps (procps version 2.0.13).
Please send bug reports to <[EMAIL PROTECTED]>"

I've compiled vpopmail with --enable-many-domains=y

What can be wrong ?

Any help would be gratly appreciated.

Warm Regards,
Mário Gamito