1

Topic: Quota warnings

==== Required information ====
- iRedMail version: 0.8.3
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Linux/BSD distribution name and version: Centos 5.8
- Related log if you're reporting an issue:
====
Hi everyone , I want to configure Ired send warning mail when user's mailbox exceeds the 90% quota . I fail
Here is my dovecot.conf

plugin {
    # Quota warning.
    #
    # You can find sample script from Dovecot wiki:
    # http://wiki.dovecot.org/Quota/1.1#head- … b45bec1734
    #
    # If user suddenly receives a huge mail and the quota jumps from
    # 85% to 95%, only the 95% script is executed.
    #
   quota_warning = storage=85%% /usr/local/bin/dovecot-quota-warning.sh 85
   quota_warning2 = storage=90%% /usr/local/bin/dovecot-quota-warning.sh 90
   quota_warning3 = storage=95%% /usr/local/bin/dovecot-quota-warning.sh 95
}

Here is my dovecot-quota-warning.sh :

From: no-reply@demo.iredmail.org
BCC: duydpp@test.vn
Subject: Mailbox Quota Warning: ${PERCENT}% Full.
Your mailbox is now ${PERCENT}% full, please clean up some mails for
further incoming mails.

Where it wrong ? please check , I'm not good at linux script

2

Re: Quota warnings

iRedMail has this feature enabled by default, what do you mean you "fail"?

3

Re: Quota warnings

ZhangHuangbin wrote:

iRedMail has this feature enabled by default, what do you mean you "fail"?

I can't receive alert mail when mailbox full

4

Re: Quota warnings

As mentioned in Dovecot config file:

# If user suddenly receives a huge mail and the quota jumps from
    # 85% to 95%, only the 95% script is executed.

Does your situation same as it?

5

Re: Quota warnings

ZhangHuangbin wrote:

As mentioned in Dovecot config file:

# If user suddenly receives a huge mail and the quota jumps from
    # 85% to 95%, only the 95% script is executed.

Does your situation same as it?

Yes , I create a mailbox ( quota :6M) , I sent an email file attachments 5M to that mailbox , but nothing happend . Does it have any problem with above code ? .

6

Re: Quota warnings

duy_dang2110 wrote:

Yes , I create a mailbox ( quota :6M) , I sent an email file attachments 5M to that mailbox , but nothing happend . Does it have any problem with above code ? .

I suggest you use the default script shipped by iRedMail, then turn on debug mode in Dovecot (search 'debug' in /etc/dovecot/dovecot.conf), restart Dovecot. Then create a new mail user and test again. Show us full log related to your testing email, so that we can help what the problem is.

7

Re: Quota warnings

ZhangHuangbin wrote:
duy_dang2110 wrote:

Yes , I create a mailbox ( quota :6M) , I sent an email file attachments 5M to that mailbox , but nothing happend . Does it have any problem with above code ? .

I suggest you use the default script shipped by iRedMail, then turn on debug mode in Dovecot (search 'debug' in /etc/dovecot/dovecot.conf), restart Dovecot. Then create a new mail user and test again. Show us full log related to your testing email, so that we can help what the problem is.

Hi ZhangHuangbin , I maked some change on dovecot config file and  dovecot-quota-warning.sh in the past , can you provide to me the original file . Thanks .

8

Re: Quota warnings

Here it is:
https://bitbucket.org/zhb/iredmail/src/ … s/dovecot/

9 (edited by duy_dang2110 2014-02-14 12:33:14)

Re: Quota warnings

my dovecot version is 1.2.17 , the dovecot.conf file very diffirent from 2.x version .

10

Re: Quota warnings

My mistake. Try this instead:
https://bitbucket.org/zhb/iredmail/src/ … ult#cl-171

11

Re: Quota warnings

ZhangHuangbin wrote:

My mistake. Try this instead:
https://bitbucket.org/zhb/iredmail/src/ … ult#cl-171

in my code it call a script outside /usr/local/bin/dovecot-quota-warning.sh , can't you show me how to check script dovecot-quota-warning.sh execute or not when storage=85%% and where is storage variable . I can send you dovecot.conf and dovecot-quota-warning.sh if you need .

FYI :
quota_warning = storage=85%% /usr/local/bin/dovecot-quota-warning.sh 85

12

Re: Quota warnings

Official Dovecot wiki for Dovecot-1.x: http://wiki2.dovecot.org/Quota/Configur … a_warnings
Obviously, you missed '%u' at the end of line.