This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[MODULE] Mail Quota Count
#1
[MODULE] Mail Quota Count
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 Forum Add-ons and Usage, MySupport Addon and Test of MySupport MOD.
- 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.
My Sentora Resources
[Module] Mail Quota Count | Vagrant Box with Sentora

[Image: vanguardly-logo-micro.png]
Graphic and Web Design. Development.
www.vanguardly.com


Reply
Thanks given by: lino69 , Cantalupo
#2
RE: [MODULE] Mail Quota Count
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.
My Sentora Resources
[Module] Mail Quota Count | Vagrant Box with Sentora

[Image: vanguardly-logo-micro.png]
Graphic and Web Design. Development.
www.vanguardly.com


Reply
Thanks given by:
#3
RE: [MODULE] Mail Quota Count
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
Reply
Thanks given by: apinto
#4
RE: [MODULE] Mail Quota Count
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
My Sentora Resources
[Module] Mail Quota Count | Vagrant Box with Sentora

[Image: vanguardly-logo-micro.png]
Graphic and Web Design. Development.
www.vanguardly.com


Reply
Thanks given by:
#5
RE: [MODULE] Mail Quota Count
It is unfortunate that this module does not work for Sentora for Windows
Reply
Thanks given by:
#6
RE: [MODULE] Mail Quota Count
(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...
My Sentora Resources
[Module] Mail Quota Count | Vagrant Box with Sentora

[Image: vanguardly-logo-micro.png]
Graphic and Web Design. Development.
www.vanguardly.com


Reply
Thanks given by:
#7
RE: [MODULE] Mail Quota Count
apinto MarkDark
I have posted some suggestions for better compatibility:
First: https://github.com/apintocr/sentora_mail...t/issues/1
Second: https://github.com/apintocr/sentora_mail...t/issues/2
Third: https://github.com/apintocr/sentora_mail...t/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'.
   
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by: apinto
#8
RE: [MODULE] Mail Quota Count
(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...t/issues/1
Second: https://github.com/apintocr/sentora_mail...t/issues/2
Third: https://github.com/apintocr/sentora_mail...t/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
My Sentora Resources
[Module] Mail Quota Count | Vagrant Box with Sentora

[Image: vanguardly-logo-micro.png]
Graphic and Web Design. Development.
www.vanguardly.com


Reply
Thanks given by:
#9
RE: [MODULE] Mail Quota Count
Wink
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#10
RE: [MODULE] Mail Quota Count
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 Forum Add-ons and UsageMySupport Addon and Test of MySupport MOD).
- Now uses fs_director::GetDirectorySize() if its installed on a Windows Server (instead of du UNIX command).
My Sentora Resources
[Module] Mail Quota Count | Vagrant Box with Sentora

[Image: vanguardly-logo-micro.png]
Graphic and Web Design. Development.
www.vanguardly.com


Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
[Module] ELFileManager (build on elfinder) Diablo925 94 289 ,059 05-30-2024, 05:25 AM
Last Post: TGates
[MODULE] phpMyAdmin-AU (Auto-Update) TGates 14 44 ,916 06-15-2021, 06:54 AM
Last Post: TGates
[MODULE] SenBrand - Basic Branding module for Sentora TGates 20 49 ,447 06-04-2021, 11:47 AM
Last Post: ccr1969

Forum Jump:


Users browsing this thread: 1 Guest(s)