Mail users without individual quota (using just user quota) ?

Discussion in 'Tips/Tricks/Mods' started by radim_h, Oct 29, 2010.

  1. radim_h

    radim_h Member

    Hello everyone!

    is there any way how to create mailusers without setting quota for each of them?
    I mean i want create user with quota -1 as default and only quota which matters will be total Mailbox quota for Client. Better thing should be maildomain quota, but it is not implemented
    This is working in ISPC2 (but different, there is quota for domain)

    I'd like also to know how to set default Spam policy selected for newly created domain and user eg "normal" instead of "not-enabled"

    thaks for any hints
    Last edited: Oct 29, 2010
  2. falko

    falko Super Moderator ISPConfig Developer

    No, because the mail users are virtual, so system quota doesn't apply to them.

    Currently this isn't possible without changing the source code.
  3. radim_h

    radim_h Member

    It should be nice to have options for quotas on domains one day, together or instead of user quotas

    What i can modify please?
    I have about 15 modifications on default setup so one more is fine .o)
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    We would implement this if one of the supported lda's has such a feature. But neither courier nor dovecot supports this.

    You will have to modify the code in the /usr/local/ispconfig/interface/web/mail/mail_user_edit.php file and add e.g. a line like this right after line 95:

    if($this->id == 0) $tmp_user["policy_id"] = 5;

    where 5 is the numeric ID of the policy that you want to select as default. So the resulting file part looks like this:

    $policy_select = "<option value='0'>".$app->tform->lng("no_policy")."</option>";
    if($this->id == 0) $tmp_user["policy_id"] = 5;
    if(is_array($policys)) {
  5. radim_h

    radim_h Member

    i meant filesytem quota on /var/vmail/domain.tld directory...
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats not possible for virtual users as filesystem quota works on the username which is idenntical for all email accounts. Quota in virtual user setups is implemented by the lda and so it has to be implemented in courier or dovecot.

Share This Page