Enforcing email quota through customer template

Discussion in 'Installation/Configuration' started by exynenem, Aug 31, 2015.

  1. exynenem

    exynenem New Member


    I'am using ISPConfig + Florian's DKIM Patch and for some reason I can't enforce the email quota that I've defined in my customer template.
    Whenever I change the email quota of the template and update this record absolutely nothing happens to the quota of the corresponding customer mailboxes, they simply remain at 0.

    However, direct quota changes to a mailbox work. I've also already enabled ISPC's debug log and MySQL's general log to check what is going on, but there is no error logged, but also no MySQL log line logged over any update queries - of course, direct quota changes to a single mailbox are logged...

    Datalog seems to work at least they are being inserted and afterwards processed.

    Any ideas how I could further debug this situation or is this already a known bug?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The template is a quota limit for new mailboxes or edited mailboxes, it does not affect existing mailboxes. If it would alter existing mailboxes then it would have to delete emails and I guess you dont want to get calls from your customers that they lost their email just because you adjusted a global email template limit.
  3. exynenem

    exynenem New Member

    If it does not affect existing mailboxes then I dont understand why _editing_ existent mailboxes would change this circumtance.
    It doesn't in my case...

    I apply or change a client template to my client and then I would expect that the template gets applied and working.
    However, in my case it doesn't work even when I apply a template to my customer, assign a new email domain, then I log in as the customer and want to create a completely new mailbox to a completely newly created maildomain and this is what I then get:

    In this case I've defined 1000MB quota through the template, but the value isn't set in the mailbox creation process nor is it displayed.
    It displays "0" as value and the simple try to change any value triggers the above quoted error message.

    So, what kind of problem is this now?
    Maybe I should mention that this is only a "email_only_template" so the client shall not be able to use any website settings.
    So, can't ISPConfig handle email only templates or, could this be a bug, or is my installation messed up, or is ISPConfig's template/quota handling sub-optimal?

    That's a behaviour I would'nt expect, especially why do you mention "it would have to delete emails"? Or do you rather mean entire mailboxes?
    Simple quota changes don't delete mailboxes except ISPConfig is developed that way that it deletes emails but the raw quota tools never deletes stuff. That's the first time in my life that I hear something like that....
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    the template got applied to the cutsomer and thats exactly what you see when you try to edit the mailbox. You reduced the available space of the client in the client limits but there are already mailboxes where you assigned more space, as ispconfig cant simply delete emails or decied which mailbox shall loose mail or which mailbox shall have which size, you or the customer has to decide that when you edit the mailbox the next time.

    The sum of quota space that you assigned to addresses of this client is 27000 MB larger then the limit that you set for this client As you dont seem to want to believe this number, calculate it yourself in the database. Select all mailboxes of all domains of this client in the mail_user table, this value is 27000 MB larger then the value that you set as limit in the client limits for this client.

    When you edit a mailbx, then the limits for this mailbox get recaclculated to ensure that you can not enter a value that is higher then the limit.

    I nowhere said that ispconfig deletes a mailboxes and furthermore I said that no mail system can apply a enforced reduction of storage space without data loss and therefor ISPConfig is not enforcing it.
  5. exynenem

    exynenem New Member

    Just to clarify the template situation, because I've the feeling that we slightly talk at cross-purposes:

    I was expecting that I can set quota limits per mailbox through the template without declaring the max available space under the web limit tab. If I understand you correctly, then ISPConfig needs also this value set, otherwise it can't properly calculate the quota, or do I dont get you? I actually just want the email limits, it's not intended to be a website/email template.

    However, if I go this way, altering the intended email-only template with enough website space (enough for the quotas and the currently used raw mailbox space on the hdd), then I can edit one mailbox, and the email quota of the template gets applied as you mentioned it.

    When I want to edit another mailbox then ISPConfig says
    This error also occurs when I want to create a completely new mailbox and dont edit one.
    I already tested this with other mailboxes and it's not a certain mailbox thing. This occurs to any mailbox that I try, the first edited one is being altered with the correct email quota limit and the next one not, so, what is wrong, or what am I doing wrong?
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Web limits are not related to email at all. Please reread my post, I stated nowhere to set something under web limits.

    This error must occur off course as you used all available space of this client already, I explained that in the post above in detail.

    You try to assign mailboxes with a combined quota that is bigger then the quota that you allowed for this customer and therefor the system rejects the new mailbox.
  7. exynenem

    exynenem New Member

    Alright, got it now! :D :rolleyes:

    I wasn't initally sure how this stuff gets calculated, since I thought the email limit would be per mailbox and not for all mailboxes assigned to the client. Thank your for taking your time!

Share This Page