Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 7th July 2012, 23:43
weezul weezul is offline
Member
 
Join Date: Jul 2008
Posts: 43
Thanks: 3
Thanked 3 Times in 2 Posts
Default getting the mailbox traffic / checking quota

hello, i looked through the remoting lib and didn't find an example to get the mailbox traffic, also i noticed that when i create a mailbox the quota of the mailbox isn't checked against the client mailbox quota, so i guess i have to handle this myself.

regarding the mailbox traffic, can i query the db just with

Code:
// $sql = "SELECT * FROM mail_traffic";
// $app->db->queryAllRecords($sql)
to get all records or won't that scale if there are more servers?

how does ispconfig handle scaling, does it store the user information seperately on each server and does the adminpanel just pull everything together or does it keep all information on the "master" server ?

to my quota issue, i thought about storing the quota limits in my application, which i think is a bead idea because if anything changes over the ispconfig panel my data would be inconsistent, so i guess i've to write a sql query to do the check for me which brings me back to my previous question.

Last edited by weezul; 7th July 2012 at 23:48.
Reply With Quote
Sponsored Links
  #2  
Old 8th July 2012, 12:15
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,805
Thanks: 821
Thanked 5,339 Times in 4,188 Posts
Default

Quote:
regarding the mailbox traffic, can i query the db just with

Code:
// $sql = "SELECT * FROM mail_traffic";
// $app->db->queryAllRecords($sql)
to get all records or won't that scale if there are more servers?
Yes.

Quote:
how does ispconfig handle scaling, does it store the user information seperately on each server and does the adminpanel just pull everything together or does it keep all information on the "master" server ?
Config data is mirrored on the slaves to avoid a single point of failure and traffic data is accumulated on the master to allow traffic accounting for mirrored servers. So systems that consist of a few hundred servers are no problem at all. If you scale into thousands of servers then it might be nescessary to run the master system on a mysql cluster where a few hundred ispconfig nodes are attached to each node of the cluster. The ispconfig slaves use still single mysql instances as they were only used for config data caching.

Quote:
also i noticed that when i create a mailbox the quota of the mailbox isn't checked against the client mailbox quota, so i guess i have to handle this myself.
The api runs with admin user priveliges and one of the priveliged of the admin user is to overrde client quotas.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 8th July 2012, 17:48
weezul weezul is offline
Member
 
Join Date: Jul 2008
Posts: 43
Thanks: 3
Thanked 3 Times in 2 Posts
Default

hello till,

thanks for your response, so i can just pull out everything of the masters sql db and should be fine then.

another question

i would like to know if it's possible to update the monitor_data table in order to see if things changed, when i create a new mailbox, login and run the cron_daily.sh it just prints inserts into mail_traffic to stdout, the monitor_data stays unchanged. is there an other script involed or is this handled by postfix somehow? would be great if i could update the data in those tables for testing purposes.

Last edited by weezul; 8th July 2012 at 19:22.
Reply With Quote
  #4  
Old 9th July 2012, 10:31
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,805
Thanks: 821
Thanked 5,339 Times in 4,188 Posts
 
Default

The cron_daily script is the only script involved, like the name says, its is a daily script and will not work if you run it manually at another time as the log files and other data required for this script to work correctly might not exist yet at the moment were you had run it manually. Also running it manually more then once per day will corrupt the statistics.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
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
MyDNS Install Problems - rezilient Installation/Configuration 4 18th April 2013 21:48
rkhunter warnings esezako General 7 27th September 2011 07:28
Installation -- pcre_exec.c:403: internal compiler error: Segmentation fault zerman Installation/Configuration 2 23rd September 2008 23:58
Ubuntu 8.04 server edition ISPconfig installation error malinens Installation/Configuration 4 30th July 2008 07:30
Update php shajazzi Server Operation 6 6th April 2008 18:20


All times are GMT +2. The time now is 11:34.


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