Re: [vchkpw] Why is vadduser creating a hierarchy?
On 10/14/06, Bert JW Regeer [EMAIL PROTECTED] wrote: On Oct 14, 2006, at 16:06:30 MST, Rainer Duffner wrote: See above. DJB was or is a (Free)-BSD user (when he started, Linux was a toy anyway), which back in these days had this problem. Agreed, however his Maildir approach did not include hashing in any way shape or form, so how did file systems back then handle over 1000's of email messages in an Inbox? Poorly. I had a server stall after a user stopped checking mail and accumulated 100,000 messages in a single folder. The filesystem was basically unusable. That was on FreeBSD 4.6, IIRC. Once I cleared that up, the mysterious slowness in general of the machine disappeared. -- Jon
Re: [vchkpw] Why is vadduser creating a hierarchy?
On 10/6/06, Dave Richardson [EMAIL PROTECTED] wrote: However, I'm seeing vadduser create a hierarchy of folders after about the first 80-100 users are added. Using subfolders A-z,0-9. I only have about 7,000 users to manage and would rather NOT subtree (whatever the term is) this user hierarchy. Be sure your filesystem can handle this. Certain filesystems (ffs for example) can take a major performance hit with a large number of files in a single directory. What logic controls when vadduser decides to subtree the folders for a particular domain? When running configure: --disable-users-big-dirDisable hashing of user directories. -- Jon
Re: [vchkpw] User quota over NFS
On 7/18/06, Darek M [EMAIL PROTECTED] wrote: Incoming mail is handled by separate MX machines. They in turn mount the vpopmail directory from the main system via NFS, so they have access to the same vpopmail binaries and domain directories. So they are using the vpopmail install from the main system. However, when a user is over 100%, mail continues to be delivered into the inbox. Does anyone have any info on this? A fix? You might need Bill Shupp's qmail Maildir++ patch, it has solved similar issues for me: This patch adds maildirquota (Maildir++) support to qmail-pop3d and qmail-local. It was created because when vpopmail switched to maildirquotas, a user's quota usage was not decreased after deleting mail via qmail-pop3d. Also, because .qmail files would allow qmail-local to write directly to a Maildir whithout piping through vdelivermail first, quotas were not effective for aliases. Actually, this was the case with vpopmail's old quota system as well. http://shupp.org/patches/qmail-maildir++-universal.patch -- Jon
[vchkpw] maildirquota.c patches against 5.4.15
I believe this fixes most of my problems with weird quotas showing up in maildirsize files, as on some systems long and off_t are not the same. The %lld in the sprintf (bottom of the patch) may not be correct on all systems but was required in my case, as off_t is typedef'd as long long. --- maildirquota.h.orig Sun Mar 20 09:01:43 2005 +++ maildirquota.h Wed Mar 8 10:52:32 2006 @@ -21,7 +21,7 @@ int maildir_addquota(const char *, /* Pointer to the maildir */ int,/* Must be the int pointed to by 2nd arg to checkquota */ const char *, /* The quota */ - long, /* +/- bytes */ + off_t, /* +/- bytes */ int); /* +/- files */ /* skip the rest... */ @@ -50,7 +50,7 @@ int maildir_checkquota(const char *, /* Pointer to directory */ int *, /* Initialized to -1, or opened descriptor for maildirsize */ const char *, /* The quota */ - long, /* Extra bytes planning to add/remove from maildir */ + off_t, /* Extra bytes planning to add/remove from maildir */ int); /* Extra messages planning to add/remove from maildir */ int maildir_readquota(const char *,/* Directory */ --- maildirquota.c.orig Tue Jan 17 11:08:34 2006 +++ maildirquota.c Wed Mar 8 10:52:34 2006 @@ -43,12 +43,12 @@ 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); /* moved into maildirquota.h as non-static static int maildir_addquota(const char *dir, int maildirsize_fd, const char *quota_type, long maildirsize_size, int maildirsize_cnt); @@ -407,7 +407,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; @@ -430,7 +430,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) { @@ -593,7 +593,7 @@ } intmaildir_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) { if (!quota_type || !*quota_type)return (0); return (doaddquota(dir, maildirsize_fd, quota_type, maildirsize_size, @@ -601,7 +601,7 @@ } static int doaddquota(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, int isnew) { union { @@ -665,7 +665,7 @@ } - sprintf(u.buf, %ld %d\n, maildirsize_size, maildirsize_cnt); + sprintf(u.buf, %lld %d\n, maildirsize_size, maildirsize_cnt); iov[niov].iov_base=u.buf; iov[niov].iov_len=strlen(u.buf); -- Jon Simola Systems Administrator ABC Communications
Re: [vchkpw] maildirquota.c bug in 5.4.12
On 2/5/06, Tom Collins [EMAIL PROTECTED] wrote: There's probably a problem elsewhere in the maildirquota code, where we use an unsigned long instead of a long. Sounds good to me, I'll be back in there today as... When you made the change, did the problem go away? It seems to have made it occur less frequently, but definately has not fixed it. A sample maildirsize file that was pointed out to me this morning contained: # cat maildirsize 1S,3000C 6944656590839403888 102 So my patch has just made the issue a lot more visible. --- maildirquota.c.orig Tue Jan 24 11:24:36 2006 +++ maildirquota.c Tue Jan 24 11:24:58 2006 @@ -283,5 +283,5 @@ char *p; unsigned l; - int n; + long n; int first; -- Jon Simola Systems Administrator ABC Communications