Default E-Mail quota

spectrumproduct

Verified User
Joined
Apr 26, 2008
Messages
40
Can the default quote of new mailboxes be setup as say 50meg, rather than unlimited.

Also, is there a way to globally set all mailboxes to a limit of XXX

Thanks.
 
The default quota of a mailbox would probably be a feature request. As for the amount of mailboxes, you can enter the number at the package the customer uses.
 
The default quota of a mailbox would probably be a feature request. As for the amount of mailboxes, you can enter the number at the package the customer uses.

Yeh, I see that.

I'm really only talking about the Meg Quota.

I know they can set that upon adding a mailbox, but lets face it .. people are a bit stupid and will click through whatever is there.

If it defaults to 50meg (for example) they're within their right to change it.
 
I've moved the thread; it's now a feature request.

Comments anyone?

Jeff
 
Can the default quote of new mailboxes be setup as say 50meg, rather than unlimited.

Also, is there a way to globally set all mailboxes to a limit of XXX

Thanks.
You can use Capri skin, which have that feature

Just edit the token
Code:
|?DEFAULT_MAILBOX_QUOTA=0|
 
I'm sorry to interfere, but how can a skin limit a default mail box size?
It doesn't. it only set the default limit in the form when you click on "Create pop account". Insted of 0 it will put any other value. Then you can change it, of course.
 
Hello,

Thanks for the request. I've added an entry to the versions system.

For the time being, you can use this guide to adjust the skin file:

/usr/local/directadmin/data/skins/enhanced/user/email/pop_create.html

and change:
Code:
<input type=text name=quota size=16 value="0">
to be
Code:
<input type=text name=quota size=16 value="50">

copy the pop_create.html to pop_create2.html, and make the change to the copied file. Add this to the files_custom.conf:
Code:
HTM_EMAIL_POP_CREATE=user/email/pop_create2.html
John
 
@walo

Oh, sorry I misunderstood the thread and previous answers. I was sure, that limiting function of default mail account was requested.
 
What about a feature/function (command line or GUI) to set a quota for all existing email addresses?
 
Related:
http://help.directadmin.com/item.php?id=514

To set a global limit for all E-Mail accounts, on the command line, use:
Code:
[COLOR=#000000][FONT=courier new]echo 50 > /etc/virtual/user_limit[/FONT][/COLOR]
which applies to all email accounts that do not have a limit specified.
Note, you can also do it through the GUI at:
Admin Level -> Admin Settings -> Daily Limit Per E-Mail Account

Below that is also the settings for
- User can set the per E-Mail Limit = Y/N
- Max limit User can set per E-Mail = -1 (where -1 means it matches the "Daily Limit Per E-Mail account" value)

John
 
Related:
http://help.directadmin.com/item.php?id=514

To set a global limit for all E-Mail accounts, on the command line, use:
Code:
[COLOR=#000000][FONT=courier new]echo 50 > /etc/virtual/user_limit[/FONT][/COLOR]
which applies to all email accounts that do not have a limit specified.
Note, you can also do it through the GUI at:
Admin Level -> Admin Settings -> Daily Limit Per E-Mail Account

Below that is also the settings for
- User can set the per E-Mail Limit = Y/N
- Max limit User can set per E-Mail = -1 (where -1 means it matches the "Daily Limit Per E-Mail account" value)

John

Thank you for your reaction.

I think there is a little misunderstanding here.

I am searching to set the email quota for all emailaddresses, not to set an email sent limit.
 
Ah, thanks for the correction.

One way to go about it, would be to edit the exim.conf directly.
The exim.conf looks in the /etc/virtual/domain.com/quota file, and if the given User doesn't exist, there is no quota.

So the simple solution is to alter the "else" condition so you get your 50M, rather than trying to force it for all Users.
Edit:
/etc/exim.conf

change this line:
Code:
  quota = ${if exists{/etc/virtual/${domain}/quota}{${lookup{$local_part}lsearch*{/etc/virtual/${domain}/quota}{$value}{0}}}{0}}
to become:
Code:
  quota = ${if exists{/etc/virtual/${domain}/quota}{${lookup{$local_part}lsearch*{/etc/virtual/${domain}/quota}{$value}{[B]50M[/B]}}}{[B]50M[/B]}}
Note that there are 2 50M entries. The first is if the User doesn't exist. The 2nd is if the quota file doesn't exit (less likely, but possible).

Note: that dovecot can also check quotas, but the above method wouldn't affect that.
For dovecot, the quotas must be set in /etc/virtual/domain.com/passwd, from the quota files.. so if you do need it fully covered, then all Users would need to have a quota set in the quota files, then an email_passwd rewrite issued.

John
 
Hello John,

Thank you for the information!

I am experiencing an issue and I think it is an bug. Last night I transferred all users to a new server. Both with the standard limit set to 0 (in directadmin.conf and exim.conf). Now the users are transferred, a lot of email addresses are experiencing a new limit of 50 MB. Because of that I want to give all addresses the 0 limit so the problems are gone.
 
If the 50 limit is in /etc/virtual/*/quota, then you could use a regex to swap that to 0.
Code:
perl -pi -e 's/52428800/0/' /etc/virtual/*/quota
echo "action=rewrite&value=email_passwd" >> /usr/local/directadmin/data/task.queue
You might want to backup the quota files first, but the regex is fairly straightforward.

John
 
Back
Top