Alex Rice wrote:
>
> Hi folks. I'm confused with a couple of thing about quotas. I'm using
> vpopmail-3.4.11-1.released. I have just read the changelogs and I'm
> anticipating the answer is upgrade to the current 4.x release ;-)
>
> Q1)
>
> I have a user's whose mail is bouncing because they are over quota,
> but I was trying to duplicate it by sending to her, and not getting
> bounces. (incidentally I was sending to her alias, not her actual
> account name).
You have to send a message over 1,000 bytes. When we originally
wrote the code, several system admins thought (and i agree), that
it would be extremely helpful to be able to send an email to a
user who is over quota "Hey, delete some email, you are over quota!".
hence, If your email is less than 1,000 bytes the quota won't apply.
>
> Then I read something in the archive that if there is a
> ".qmail-<user>" file then quotas will not be used (because
> vdelivermail is not invoked?).
Correct.
>
> That's a problem for me who uses qmailadmin, which creates aliases
> with ".qmail-<user>" files. Thus most of my distinct addresses won't
> actually have quota support? Does my analyis sound correct? Are there
> any workarounds for this?
Correct, email delivered by qmail-local doesn't have quota checking.
In the next development version, 4.9.7, we are adding alias and forward
processing to vdelivermail, so there will be no need for .qmail-* files,
and hence, quotas should work for that.
>
> Q2)
>
> Is there any utility to view all the current quotas for vpopmail
> users? I need to write a nag utility to warn people if they are near
> quota, or have the sysadmin just increase the quota. From looking at
> vpopmail.h, I guess the function just doesn't exist right now. Looks
> like there is a data format used by email called cdb. Hrm... I'm
> really not a C hacker. Any suggestions?
You can call vauth_getall() C function, it will allow you to walk
through all the users in a domain and retreive all thier information,
which includes thier quota, pw->pw_shell field.
Take a look at some of the utility programs, like vsetuserquota.c
for examples of how to use vauth_getall()
Ken Jones