Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 8th September 2009, 18:15
voltron81 voltron81 is offline
Senior Member
 
Join Date: Sep 2009
Posts: 292
Thanks: 1
Thanked 4 Times in 3 Posts
Default How to build an email alert notification when a customer is using all his quota space

Hello to everybody,
I'm realizing a mail server with ISPConfig 3 and Roundcube.

I would like to realize an "email alert notification" to send to a customer that is using almost all his email space.

Do you have some idea how to realize it?

Thanks

Michele
Reply With Quote
Sponsored Links
  #2  
Old 9th September 2009, 18:29
voltron81 voltron81 is offline
Senior Member
 
Join Date: Sep 2009
Posts: 292
Thanks: 1
Thanked 4 Times in 3 Posts
Default

I've found a script that check the quota of each email and, if it's more that 90%, it will send an email to me and the customer.

But I think that having this funcion integrated in ISPConfig could be just great...

Any idea?

Thanks
Michele
Reply With Quote
  #3  
Old 15th September 2009, 18:39
voltron81 voltron81 is offline
Senior Member
 
Join Date: Sep 2009
Posts: 292
Thanks: 1
Thanked 4 Times in 3 Posts
Default

I was studing a bit the problem, and I realized that into the dbispconfig database there is a table names mail_user, where there is a quota field.

So I think that the logic way to solve the problem is realize a script that check that quota field for every email and, when this quota is 80% that the space assigned to the customers, just send an email to them saying that the space is almost finished.
Do you think it is difficult to realize?
Any idea?

Thanks
Michele
Reply With Quote
  #4  
Old 16th September 2009, 13:55
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Should not be too difficult if you use a scripting language like PHP.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 16th September 2009, 14:32
voltron81 voltron81 is offline
Senior Member
 
Join Date: Sep 2009
Posts: 292
Thanks: 1
Thanked 4 Times in 3 Posts
Default

Yes, I'm trying to write a PHP script.
I'm with manuals and books studying what I've to do

Basically I've integrated a slider into Roundcube. This slider have 11 steps.
With ISPConfig I've created 11 spam policy, I now the policy_id of that policy.

So now what I want to do is connect PHP with MySQL, so that I could realize something like that:
Code:
$db_host = "localhost";
        $db_user = "root";
        $db_password = "password";
        $db_name = "dbispconfig";
        $db = mysql_connect($db_host, $db_user, $db_password);
        
        if ($db == FALSE)
        die ("Communication error. Please check the parameters of the connection to the mysql database");

        mysql_select_db($db_name, $db)
        or die ("Communication error. Please check the parameters of the connection to the mysql database");

        mysql_query("UPDATE spamfilter_users SET policy_id = '$VALUE_SPAM' WHERE email = '$ROUNDCUBE_USER'");
        //where $VALUE_SPAM is the value of the spam policy releated with the slider level

        mysql_close($db);


        $out .= "</table>";

        return $out;
At the moment I've 2 problems:
1) I don't know where to find the $ROUNDCUBE_USER, means the email of the user that at that time is using roundcube
2)I don't know where this slider is setting his variables releated with the status (0-10)

Suggestions?
Reply With Quote
  #6  
Old 19th November 2009, 10:30
mixo mixo is offline
Junior Member
 
Join Date: Aug 2009
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,
I've ISPConfig 2 and want the same feature.Inform users with mail, when quota is more then 90%.

Has anybody made such a script?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix Quota Notification Email Script asyadiqin Installation/Configuration 14 23rd July 2010 13:35
Help with Email Alert ethanlifka Server Operation 0 26th February 2009 18:02
quota: howto include datatabase space gilas Installation/Configuration 1 8th November 2008 14:28
ISPConfig Installation error linuxuser1 Installation/Configuration 4 26th February 2008 06:38
ERROR: The PHP binary coming with ISPConfig does not work properly on your system! qvindesland Installation/Configuration 22 21st May 2007 16:05


All times are GMT +2. The time now is 20:12.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.