Current time: 04-19-2024, 08:49 PM Hello There, Guest! (LoginRegister)


Post Reply 
[Howto] Per user quota edit within ispcp when using dovecot
Author Message
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #1
[Howto] Per user quota edit within ispcp when using dovecot
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/how...base_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
.patch  ispcp_edit_quota_1_0_4.patch (Size: 10.03 KB / Downloads: 18)
Version for ispcp 1.0.5
.patch  ispcp_edit_quota_1_0_5.patch (Size: 6.3 KB / Downloads: 84)
Improved version for 1.0.5
.gz  quota_1_0_5.tar.gz (Size: 12.46 KB / Downloads: 110)
Version for ispcp 1.0.7 and newer
.gz  quota_1_0_7.tar.gz (Size: 13.03 KB / Downloads: 87)


Attached File(s) Thumbnail(s)
   
(This post was last modified: 06-23-2011 12:01 AM by aseques.)
11-18-2009 07:57 PM
Find all posts by this user Quote this message in a reply
Roland Offline
Junior Member
*

Posts: 24
Joined: Nov 2009
Reputation: 0
Post: #2
RE: Howto quota modification within ispcp when using dovecot
fails on 1.0.2 ...
11-20-2009 06:25 PM
Find all posts by this user Quote this message in a reply
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #3
RE: Howto quota modification within ispcp when using dovecot
(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.
11-20-2009 06:38 PM
Find all posts by this user Quote this message in a reply
Roland Offline
Junior Member
*

Posts: 24
Joined: Nov 2009
Reputation: 0
Post: #4
RE: Howto quota modification within ispcp when using dovecot
I just did, im making migrations and tests now.
dovecot migration fails, auth failed at the end.
(This post was last modified: 11-20-2009 09:04 PM by Roland.)
11-20-2009 08:45 PM
Find all posts by this user Quote this message in a reply
edeis Offline
Junior Member
*

Posts: 34
Joined: May 2010
Reputation: 0
Post: #5
RE: [Howto] quota modification within ispcp when using dovecot
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. "
05-05-2010 08:58 AM
Find all posts by this user Quote this message in a reply
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #6
RE: [Howto] quota modification within ispcp when using dovecot
(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
05-06-2010 08:49 PM
Find all posts by this user Quote this message in a reply
edeis Offline
Junior Member
*

Posts: 34
Joined: May 2010
Reputation: 0
Post: #7
RE: [Howto] quota modification within ispcp when using dovecot
Thanks Aseques, I will give it a go.
05-07-2010 02:45 AM
Find all posts by this user Quote this message in a reply
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #8
RE: [Howto] quota modification within ispcp when using dovecot
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
05-15-2010 01:02 AM
Find all posts by this user Quote this message in a reply
JCD Offline
Junior Member
*

Posts: 22
Joined: Aug 2007
Reputation: 1
Post: #9
RE: [Howto] quota modification within ispcp when using dovecot
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


Attached File(s)
.patch  quota_1_0_5.patch (Size: 10.28 KB / Downloads: 49)
(This post was last modified: 06-13-2010 06:53 PM by JCD.)
06-07-2010 10:23 PM
Find all posts by this user Quote this message in a reply
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #10
RE: [Howto] quota modification within ispcp when using dovecot
(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.
06-08-2010 12:36 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)