imscp - postfix overquota notification e-mails

  • Hello,


    I've made a small perl script that warn the e-mail owner if it's e-mail usage space reached 85% or more than 85%.
    I've worked in perl loooong time ago(over 10 years ago), I can't say that i'm a perl programmer, the whole script took 2 hours, including remembering how to use arrays
    define subs etc, since I forgot perl. :)


    Sorry for not commenting the whole script -- I've wrote it on hurry, because one of our customer complained over this,
    his e-mail account is almost all the time overquota regardless how much space we set on his email account.


    Currently the script it's separated from imscp, but I want to integrate this feature in it, to be able to do the script settings from imscp config.
    (change percentage, e-mail warning template, administrator e-mail report address - different that the one give on imscp setup, etc)


    I want to know if anyone is working on the same script, I don't want to re-invent the wheel!
    My perl script does not require to change any table in imscp, I'm just reading the mail_users table and do the calculations, and mail sending.


    I need a little time to understand how to use imscp perl classes to connect to db and do the mysql query.


    If anyone is interessed on this feature, let me know, the script is running on my servers ISPCP and IMSCP - you just have to adjust the variables for your needs.



    IMSCP team - anyone interessed on this feature to be added on IMSCP?

  • Dovecot has support for quota-notification out of the box. Example for dovecot 2 (90-quota.conf):


    Code
    1. service quota-warning { executable = script /usr/local/bin/quota-warning.sh user = vmail unix_listener quota-warning { }}



    Code
    1. plugin { quota_warning = storage=95%% quota-warning 95 %u quota_warning2 = storage=80%% quota-warning 80 %u }