Hi,
I'd like the vpopmail user database to return the quota settings for users, instead of having to rely on the validity of the maildirsize files. It doesn't look like this is currently possible.
Would simply adding a auth_stream_reply_add call for "quota" with a suitable value in vpopmail_lookup be sufficient to make this work?
(the quota can be read from the pw_shell field of the vqpasswd struct)
Onno
On Tue, 2007-06-12 at 12:38 +0200, Onno Molenkamp wrote:
Hi,
I'd like the vpopmail user database to return the quota settings for users, instead of having to rely on the validity of the maildirsize files. It doesn't look like this is currently possible.
Would simply adding a auth_stream_reply_add call for "quota" with a suitable value in vpopmail_lookup be sufficient to make this work?
(the quota can be read from the pw_shell field of the vqpasswd struct)
Is the quota existing in pw_shell a standard vpopmail thing? Is it there in bytes, kilobytes or what? I could change the code for v1.0.1 to export the quota in some way if there's a standard.
Dovecot must see the "quota" setting in the full format, such as "maildir:storage=10240" for 10MB quota. You could export the quota as bytes/kilobytes from userdb to eg. "quota_bytes" and then use a shell script to convert it to "quota" setting (see bottom of http://wiki.dovecot.org/Quota).
But yes, adding auth_stream_reply_add() is enough to export it.
Op dinsdag 12 juni 2007 schreef Timo Sirainen:
Is the quota existing in pw_shell a standard vpopmail thing? Is it there in bytes, kilobytes or what? I could change the code for v1.0.1 to export the quota in some way if there's a standard.
It contains "NOQUOTA" or a Maildir++ quota definition, with the addition of support for suffixes like K and M in the numbers. By passing the raw pw_shell value to the vpopmail format_maildirquota function, you'll always either get a valid Maildir++ quota definition, "NOQUOTA", or "" in case the value in pw_shell is invalid.
It would be great if support for this could be included in 1.0.1!
Dovecot must see the "quota" setting in the full format, such as "maildir:storage=10240" for 10MB quota. You could export the quota as bytes/kilobytes from userdb to eg. "quota_bytes" and then use a shell script to convert it to "quota" setting (see bottom of http://wiki.dovecot.org/Quota).
But yes, adding auth_stream_reply_add() is enough to export it.
Thanks,
Onno
On Tue, 2007-06-12 at 14:58 +0200, Onno Molenkamp wrote:
Op dinsdag 12 juni 2007 schreef Timo Sirainen:
Is the quota existing in pw_shell a standard vpopmail thing? Is it there in bytes, kilobytes or what? I could change the code for v1.0.1 to export the quota in some way if there's a standard.
It contains "NOQUOTA" or a Maildir++ quota definition, with the addition of support for suffixes like K and M in the numbers. By passing the raw pw_shell value to the vpopmail format_maildirquota function, you'll always either get a valid Maildir++ quota definition, "NOQUOTA", or "" in case the value in pw_shell is invalid.
It would be great if support for this could be included in 1.0.1!
Sorry, looks like it was too large change for v1.0.x. In v1.1 you'll be able to do this:
userdb vpopmail { args = quota_template=quota_rule=*:backend=%q }
For v1.0.x you'll just have to hack the code in some way.
participants (2)
-
Onno Molenkamp
-
Timo Sirainen