mailinabox icon indicating copy to clipboard operation
mailinabox copied to clipboard

Quota

Open atrotossavainen opened this issue 11 years ago • 22 comments
trafficstars

How does one restrict delivery to the Mailinabox with a quota? I'd like to make sure that the limiting factor happened earlier than the actual physical disk space in the instance because systems have an annoying tendency to crash if you allow the disk space to become full.

atrotossavainen avatar May 15 '14 03:05 atrotossavainen

This would probably be the way to do it: http://wiki2.dovecot.org/Quota

Feel free to submit a pull request.

JoshData avatar May 15 '14 12:05 JoshData

Hi,

We are setting up Mail-in-a-box at our workplace. I've been doing some tweaking here and there and I managed to set up a user-based quota (with a hardcoded default of 1GB per user, but of course this value can be changed to a sensible generic default).

The only thing left is to enable administrators to modify these settings in the administration panel, as soon as I complete this I will submit a pull request if this is OK with you.

carlosafonso avatar Nov 19 '14 10:11 carlosafonso

Great.

JoshData avatar Nov 19 '14 14:11 JoshData

Any news?

ViktorEyermann avatar Dec 16 '15 11:12 ViktorEyermann

No news until someone does the work....

JoshData avatar Jan 03 '16 13:01 JoshData

Quota implementation is already working. Thank you @rainulf :sunglasses: Looking forward to the merge of @JoshData !

aspdye avatar Feb 08 '16 21:02 aspdye

If anyone wants to try the quotas feature on v0.20, I have merged @rainulf's changes to a fork of the latest master commit da5497c:

SSH into your box and then:

$ git clone https://github.com/geminilabs/mailinabox mailinabox-quotas
$ cd mailinabox-quotas
$ git checkout feature/quotas
$ sudo setup/start.sh

A few things to note:

  1. This worked/works fine on my existing v0.20 box, but as always make a backup. If you use DigitalOcean, make a snapshot of your droplet before upgrading. Use at your own risk.
  2. I have not tested reverting from this fork back to the official master branch. However, as far as I can tell there should be no problems in doing so. The only thing not reversed when reverting is the new quota column that this feature adds to the users sqlite database table. But if you do revert back to the official branch, the column will just be unused.
  3. Quotas is a great feature for the server admin to curb disk space usage, but it's not so user-friendly for the user. If a user's quota is full and they are using an email client to sync their emails, they will get no notification that they have run out of quota space and they will not realize that emails being sent to them are getting returned to sender.
  4. Instead of implementing quotas, consider hosting on DigitalOcean and using a datacenter that supports Volumes. $0.10 per GB per month. https://www.digitalocean.com/products/storage/

pryley avatar Oct 03 '16 07:10 pryley

Is this going to be implemented in the near future? Would love to see quotas :)

mitchellurgero avatar Dec 03 '16 03:12 mitchellurgero

@mitchellurgero I don't think quotas will be ever be officially implemented. I suggest if using DigitalOcean, host your mail server 💧 on a server that supports Volumes. Working great over here, 50 GB volume for $5/month. You can choose a smaller volume size and grow as needed.

On Dec 2, 2016, 10:08 PM -0500, mitchellurgero [email protected], wrote:

Is this going to be implemented in the near future? Would love to see quotas :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub (https://github.com/mail-in-a-box/mailinabox/issues/58#issuecomment-264612092), or mute the thread (https://github.com/notifications/unsubscribe-auth/AAIPG_9g6bYwmPMldUndXam4P1bzoXqyks5rEN0_gaJpZM4B7GcV).

pryley avatar Dec 03 '16 18:12 pryley

Can I at least install this modification on the latest 0.21?

mitchellurgero avatar Dec 04 '16 02:12 mitchellurgero

Also, thanks for the response, but I will be hosting over 100 emails, and would like to limit each account specifically. :)

mitchellurgero avatar Dec 04 '16 02:12 mitchellurgero

Can I at least install this modification on the latest 0.21?

The PR has merge conflicts.

Also it changes the layout of the database: https://github.com/mail-in-a-box/mailinabox/pull/665/files#diff-d55d822b8e6ccfbe30985a32aeaca9c6

So even if it might be mergeable for 0.21, it might not be for 0.xx. So if your are not comfortable with applying the patch set every time and possibly dealing with database layout changes, then no. Also if quota's do land, it might be a different implementation and you would have to provide an upgrade path yourself.

yodax avatar Dec 04 '16 07:12 yodax

I personally don't need it, but quota is a safe and simple feature (postfix/dovecot plays with it very simply) that can be integrated with little friction. In terms of UI, it's only a question of adding a numeric input box, and the database update (which has to happen once).

So the real question, @JoshData what do you think needs to be done to make this PR 👌 to merge?

guyzmo avatar Dec 04 '16 14:12 guyzmo

Solve one of the more pressing issues first (e.g. #514, #777, among others) and then we can talk about adding features!

JoshData avatar Dec 04 '16 14:12 JoshData

PR is here #665 - I rebased it, and resolved conflicts. But it's not tested, because I currently don't have time.

I am fairly out to date with the state of this project, but I do still use mailinabox. Implementation of quota is simple, but it is really up to the maintainer which priority to take, or if this feature is even necessary.

rainulf avatar Dec 04 '16 14:12 rainulf

for #514 - One option is Pydio. It has an open source version (I dont remeber the license it uses) but would be "simple" enough to swap out as it also supports SQLite.

mitchellurgero avatar Dec 05 '16 15:12 mitchellurgero

@mitchellurgero Can you re-post that in that issue instead of here?

JoshData avatar Dec 05 '16 16:12 JoshData

what is the status of this PR? this is a very good feature :)

netorica avatar Feb 21 '17 03:02 netorica

Solve one of the more pressing issues first (e.g. #514, #777, among others) and then we can talk about adding features!

JoshData avatar Feb 21 '17 14:02 JoshData

Any news?

tynie avatar Jun 19 '18 08:06 tynie

Is there any news on this feature? Or anyone knows how to do this? Thank you

renkasiyas avatar Dec 06 '18 20:12 renkasiyas

Any news on 2022?

kendall1997 avatar Jun 13 '22 02:06 kendall1997

Any news on 2024 ?

joyvw avatar Jan 11 '24 11:01 joyvw