ispCP - Board - Support
[Howto] Per user quota edit within ispcp when using dovecot - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Contributions Area (/forum-40.html)
+--- Forum: Howtos (/forum-41.html)
+--- Thread: [Howto] Per user quota edit within ispcp when using dovecot (/thread-8483.html)

Pages: 1 2 3 4


[Howto] Per user quota edit within ispcp when using dovecot - aseques - 11-18-2009 07:57 PM

We did some modifications on the control panel to be able to:
.- Change the quota limits for the users from the control panel.
.- Show the current quota for the user (only with dovecot 1.2)

NOTE: This should work out of the box with dovecot, because dovecot is reading/using the quota for it's deliveries (instead of courier wich has a server-wide setting), also is you follow the installation document it will also store the used quota on database.
The tar.gz in this post adds the quota edit ability for every mail account. It's on a production server with 1.0.7, and the newer ones have been successfully tested on trunk.

I opened a ticket on the trac to keep a record, so we can update this post when there are changes.
http://www.isp-control.net/ispcp/ticket/2219

Dovecot install document:
To be able to see the quota numbers from ispcp you will have to follow this howto:
http://isp-control.net/documentation/howto:mail:replace_courier_with_dovecot_plus_database_quota

With the latest version it works fine on 1.0.7 and should work also on current trunk

Cheers

Version for ispcp 1.0.4 [attachment=1290]
Version for ispcp 1.0.5 [attachment=1291]
Improved version for 1.0.5 [attachment=1299]
Version for ispcp 1.0.7 and newer [attachment=1692]


RE: Howto quota modification within ispcp when using dovecot - Roland - 11-20-2009 06:25 PM

fails on 1.0.2 ...


RE: Howto quota modification within ispcp when using dovecot - aseques - 11-20-2009 06:38 PM

(11-20-2009 06:25 PM)Roland Wrote:  fails on 1.0.2 ...
Yup, it might be, 1.0.2 is no longer used in our environment, some features of 1.0.3 are mandatory for us (dns management i.e.).
Depending on how brave you are, I'd recommend to use 1.0.3 branch for your installations, for what I've read, 1.0.2 is not the best release, it's just the "current" release before 1.0.3 (that is a far more polished version) is totally stable.
I put a note about this in the main post.


RE: Howto quota modification within ispcp when using dovecot - Roland - 11-20-2009 08:45 PM

I just did, im making migrations and tests now.
dovecot migration fails, auth failed at the end.


RE: [Howto] quota modification within ispcp when using dovecot - edeis - 05-05-2010 08:58 AM

Doesn't seem to work on 1.0.5

[root@drizzle ispcp]# patch < ispcp_edit_quota.patch -p0
patching file gui/themes/omega_original/client/mail_edit.tpl
Hunk #1 succeeded at 99 (offset -2 lines).
patching file gui/themes/omega_original/client/mail_add.tpl
Hunk #1 succeeded at 201 (offset -2 lines).
patching file gui/client/mail_add.php
Hunk #1 FAILED at 2.
Hunk #8 succeeded at 637 (offset 4 lines).
1 out of 8 hunks FAILED -- saving rejects to file gui/client/mail_add.php.rej
patching file gui/client/mail_edit.php
Hunk #1 FAILED at 2.
1 out of 6 hunks FAILED -- saving rejects to file gui/client/mail_edit.php.rej

Then when using ISPCP and trying to edit/adding mail user:
"Access denied. "


RE: [Howto] quota modification within ispcp when using dovecot - aseques - 05-06-2010 08:49 PM

(05-05-2010 08:58 AM)edeis Wrote:  Doesn't seem to work on 1.0.5

[root@drizzle ispcp]# patch < ispcp_edit_quota.patch -p0
patching file gui/themes/omega_original/client/mail_edit.tpl
Hunk #1 succeeded at 99 (offset -2 lines).
patching file gui/themes/omega_original/client/mail_add.tpl
Hunk #1 succeeded at 201 (offset -2 lines).
patching file gui/client/mail_add.php
Hunk #1 FAILED at 2.
Hunk #8 succeeded at 637 (offset 4 lines).
1 out of 8 hunks FAILED -- saving rejects to file gui/client/mail_add.php.rej
patching file gui/client/mail_edit.php
Hunk #1 FAILED at 2.
1 out of 6 hunks FAILED -- saving rejects to file gui/client/mail_edit.php.rej

Then when using ISPCP and trying to edit/adding mail user:
"Access denied. "
I just updated the patch to work with 1.0.5


RE: [Howto] quota modification within ispcp when using dovecot - edeis - 05-07-2010 02:45 AM

Thanks Aseques, I will give it a go.


RE: [Howto] quota modification within ispcp when using dovecot - aseques - 05-15-2010 01:02 AM

There's a new release of this modification.
Now it works really goot, there's an edit quota button for every mail address that allows you to set the quota to the value you need


RE: [Howto] quota modification within ispcp when using dovecot - JCD - 06-07-2010 10:23 PM

Thanks for this nice piece of work!
I took your proposal and modified it a little bit. I think the better option is to incorporate the quota into the email account settings where password and forward can be changed. This would keep all settings together and as quotas aren't changed very often there is no need to give it an extra button.

Below you can find my proposal. It is patched against 1.0.5. Here are my changes:

* Quotas can be changed in the account settings
* Quotas can be given in MB. Conversion to Bytes is done during processing.
* Variable names were changed to adapt to the naming scheme of the other variables
* The field descriptions were adjusted to have the same appearance like those of the other fields where a unit value is inserted
* Template files are now XHTML compliant


RE: [Howto] quota modification within ispcp when using dovecot - aseques - 06-08-2010 12:36 AM

(06-07-2010 10:23 PM)JCD Wrote:  Thanks for this nice piece of work!
I took your proposal and modified it a little bit. I think the better option is to incorporate the quota into the email account settings where password and forward can be changed. This would keep all settings together and as quotas aren't changed very often there is no need to give it an extra button.

Below you can find my proposal. It is patched against 1.0.5. Here are my changes:

* Quotas can be changed in the account settings
* Quotas can be given in MB. Conversion to Bytes is done during processing.
* Variable names were changed to adapt to the naming scheme of the other variables
* The field descriptions were adjusted to have the same appearance like those of the other fields where a unit value is inserted
* Template files are now XHTML compliant
Hi JCD,
I'm glad you liked it. I had a look at your patch, and it seems that you have updated the patch for 1.0.4.
In the Improved version for 1.0.5 there's a big change, we added a new column so you can edit the quota without having to edit the account. It's far more intuitive.
Please try that one an tell your opininion.