Sentora Support Forums
[MODULE] Mail Quota Count - Printable Version

+- Sentora Support Forums (https://senforums.mach-hosting.com)
+-- Forum: Sentora Forum Archives (https://senforums.mach-hosting.com/forumdisplay.php?fid=5)
+--- Forum: Sentora Public Support Forums v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=32)
+---- Forum: 3rd Party Module Support v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=41)
+----- Forum: Available Modules (https://senforums.mach-hosting.com/forumdisplay.php?fid=63)
+----- Thread: [MODULE] Mail Quota Count (/showthread.php?tid=1451)

Pages: 1 2 3 4


[MODULE] Mail Quota Count - apinto - 04-15-2015

Mail Quota Count [Image: version-1.3.2_Stable-green.svg?style=flat-square] [Image: Sentora-1.0.0-blue.svg?style=flat-square] 
Counts Email Quota towards Web Quota, making it easier to manage Email accounts.

UPDATE: This is a Stable and Production Tested Version!
(See Changelog at the end of this post)


How to install?
Just add the Mach-hosting Sentora Repository and install:

Code:
zppy repo add zppy-repo.mach-hosting.com/repo zppy update zppy install mail-quota-count

Just add the Vanguardly Sentora Repository and install:
Code:
repo removed - see repo information above.
You can also download the .zpp package from the Mail Quota Count GitHub Repository, it is inside the packages directory.

If you want to Upgrade (you should Wink ) you can do it by using the following command:
Code:
zppy upgrade mail-quota-count


What does this Module do?
By default Sentora gives each mail box 200mb, this is not counted towards the global account Disk Quota.
Let's say you give a user 500mb of Disk Quota; he creates 5 mail boxes (each can use up to 200mb), if he uses all the space on each off the mail boxes he will be using 1000mb + 500mb of Disk Quota for his web directory.

In most cases this is NOT intended behavior.

Mail Quota Count scans the size of the vmail directory for each account and sums it to the current web directory size, updating the Disk Usage Quota on every Daemon Run.

Development
This was based on the Zpanel DiskUsage Calculation to include email disk usage article from kobmat.com.
I do really welcome any tips and help (please use the GitHub Repository)

[Image: blacktocat-16.png?raw=true] Contribute on GitHub 

Quote:Changelog

[b]v1.3.2 HOTFIX
- Fixed a HostData Path Typo on Windows (yup I did it again... Blush).


v1.3.1 HOTFIX
[/b]- Fixed a HostData Path Typo.
- Fixed Warnings on Installation/Upgrade of the Module (thank you @[cyber1995] for the report).

v1.3.0

- Implemented support for Windows Paths thanks to @[TGates] (TGates71 @ GitHub) contribuitions (see GitHub Issues #1, #2 and #3.
- Now uses fs_director::GetDirectorySize() if its installed on a Windows Server (instead of du UNIX command).


v1.2.0
- Updated code to meet PSR-2 PHP Standards
- Cleaned and Optimized code to be more integrated with Sentora.
- Added 2 new hooks (onAfterCreateClient and onAfterDeleteClient),
  this should greatly improve usability.

- Tested on my own production server.



RE: [MODULE] Mail Quota Count - apinto - 04-26-2015

I' ve updated this module.

UPDATE: This is a Stable and Production Tested Version!
(See Changelog at the end of this post)


Quote:Changelog

v1.2.0
- Updated code to meet PSR-2 PHP Standards
- Cleaned and Optimized code to be more integrated with Sentora.
- Added 2 new hooks (onAfterCreateClient and onAfterDeleteClient),
  this should greatly improve usability.

- Tested on my own production server.



RE: [MODULE] Mail Quota Count - cyber1995 - 05-02-2015

Nice module but when installing i got following error/info.

Notice: Undefined property: XMLTag::$type in /etc/sentora/panel/dryden/ui/module.class.php on line 82
Notice: Trying to get property of non-object in /etc/sentora/panel/dryden/ui/module.class.php on line 82


RE: [MODULE] Mail Quota Count - apinto - 05-07-2015

@[cyber1995] I'm aware of those Warnings, as they are just that, Warnings and do not interfere with anything else I left it unfixed... Call me lazy, I'm guilty Big Grin

I will work on fixing it on the next release.

Thank you Smile


RE: [MODULE] Mail Quota Count - MarkDark - 05-07-2015

It is unfortunate that this module does not work for Sentora for Windows


RE: [MODULE] Mail Quota Count - apinto - 05-07-2015

(05-07-2015, 07:14 PM)MarkDark Wrote: It is unfortunate that this module does not work for Sentora for Windows

Sadly it does not.
If you, or anyone, want to add support, feel free to commit some code at the GitHub Repo.
As I do not use Sentora for Windows I'm not aware of the changes needed, but I suspect it can easly be made to work...


RE: [MODULE] Mail Quota Count - TGates - 05-08-2015

@[apinto] @[MarkDark]
I have posted some suggestions for better compatibility:
First: https://github.com/apintocr/sentora_mail-quota-count/issues/1
Second: https://github.com/apintocr/sentora_mail-quota-count/issues/2
Third: https://github.com/apintocr/sentora_mail-quota-count/issues/3

I didn't have time to go through all the code, so there maybe other locations that need updating.

These are from memory, so they definitely need tweaking but it gives you an idea on what to do Wink
Also, I am not sure how posix handles the email accounts folders, but on Windows the structure is as follows:
Code:
c:/zpanel/bin/hmailserver/data/[domain.name]/[emailaccount]/
Where [emailaccount] is the account name without '@domain.com'.
   


RE: [MODULE] Mail Quota Count - apinto - 05-08-2015

(05-08-2015, 12:17 AM)TGates Wrote: @[apinto] @[MarkDark]
I have posted some suggestions for better compatibility:
First: https://github.com/apintocr/sentora_mail-quota-count/issues/1
Second: https://github.com/apintocr/sentora_mail-quota-count/issues/2
Third: https://github.com/apintocr/sentora_mail-quota-count/issues/3

I didn't have time to go through all the code, so there maybe other locations that need updating.

These are from memory, so they definitely need tweaking but it gives you an idea on what to do Wink
Also, I am not sure how posix handles the email accounts folders, but on Windows the structure is as follows:

Code:
c:/zpanel/bin/hmailserver/data/[domain.name]/[emailaccount]/
Where [emailaccount] is the account name without '@domain.com'.

Thank you for your Tips!!
Already tagged and assigned, will do it over the weekend Smile


RE: [MODULE] Mail Quota Count - TGates - 05-09-2015

Wink


RE: [MODULE] Mail Quota Count - apinto - 05-09-2015

New Update! Now with Windows Path Support @[MarkDark] Wink


How to upgrade?

If you want to Upgrade (you should Wink) you can do it by using the following command:
Code:
zppy upgrade mail-quota-count


(04-15-2015, 04:56 AM)apinto Wrote: Changelog

[b]v1.3.1 HOTFIX
[/b]- Fixed a HostData Path Typo.
- Fixed Warnings on Installation/Upgrade of the Module (thank you @[cyber1995] for the report).

v1.3.0

- Implemented support for Windows Paths thanks to @[TGates] (TGates71 @ GitHub) contribuitions (see GitHub Issues #1#2 and #3).
- Now uses fs_director::GetDirectorySize() if its installed on a Windows Server (instead of du UNIX command).