full box email

Discussion in 'Installation/Configuration' started by Oitsuki, Mar 14, 2018.

  1. Oitsuki

    Oitsuki Member

    Hello,

    I will know if it's possible to send automatically an email when the email box is full at 80% to someone.
    I don't find an option ispconfig to do that. We have a report but that's all.
    I am under debian
    Thank you.
     
  2. Oitsuki

    Oitsuki Member

    I saw this inormation ; https://wiki2.dovecot.org/Quota/Configuration
    Coul you tell me if I do that is it correct

    Thank you

    vi /etc/dovecot/dovecot.conf
    on this line :
    [code ]
    plugin {
    quote = ....
    steve= ....
    steve_max_redirect=.....
    }
    [/code ]

    become

    [code ]
    plugin {
    quote = ....
    steve= ....
    steve_max_redirect=.....
    quota_warning = storage=95%% quota-warning 95 %u
    quota_warning2 = storage=80%% quota-warning 80 %u
    quota_warning3 = -storage=100%% quota-warning below %u # user is no longer over quota
    }
    service quota-warning {
    executable = script /usr/local/bin/quota-warning.sh
    # use some unprivileged user for executing the quota warnings
    user = vmail
    unix_listener quota-warning {
    }
    }
    [/code ]

    and in /usr/local/bin/quota-warning.sh 'file to create
    inside add :

    [code ]
    #!/bin/sh
    PERCENT=$1
    USER=$2
    cat << EOF | /usr/local/libexec/dovecot/dovecot-lda -d $USER -o "plugin/quota=maildir:User quota:noenforcing"
    From: [email protected]
    Subject: quota warning
    Your mailbox is now $PERCENT% full.
    EOF
    [/code ]
     

Share This Page