Skip to content

Commit 9db5672

Browse files
committed
Implemented: FS#2107 - Add option to disable mailbox quota statistics
1 parent 3560ade commit 9db5672

File tree

5 files changed

+19
-1
lines changed

5 files changed

+19
-1
lines changed

install/tpl/server.ini.master

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ relayhost_user=
3131
relayhost_password=
3232
mailbox_size_limit=0
3333
message_size_limit=0
34+
mailbox_quota_stats=y
3435
realtime_blackhole_list=
3536

3637
[getmail]

interface/web/admin/form/server_config.tform.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,12 @@
292292
'width' => '10',
293293
'maxlength' => '15'
294294
),
295+
'mailbox_quota_stats' => array (
296+
'datatype' => 'VARCHAR',
297+
'formtype' => 'CHECKBOX',
298+
'default' => 'y',
299+
'value' => array(0 => 'n',1 => 'y')
300+
),
295301
'realtime_blackhole_list' => array(
296302
'datatype' => 'VARCHAR',
297303
'formtype' => 'TEXT',

interface/web/admin/lib/lang/en_server_config.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,4 +163,5 @@ $wb["php_settings_txt"] = 'PHP Settings';
163163
$wb["apps_vhost_settings_txt"] = 'Apps Vhost Settings';
164164
$wb["awstats_settings_txt"] = 'AWStats Settings';
165165
$wb["firewall_txt"] = 'Firewall';
166+
$wb["mailbox_quota_stats_txt"] = 'Mailbox quota statistic';
166167
?>

interface/web/admin/templates/server_config_mail_edit.htm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ <h2><tmpl_var name="list_head_txt"></h2>
7171
<label for="message_size_limit">{tmpl_var name='message_size_limit_txt'}</label>
7272
<input name="message_size_limit" id="message_size_limit" value="{tmpl_var name='message_size_limit'}" size="10" maxlength="15" type="text" class="textInput formLengthLimit" />&nbsp;MB
7373
</div>
74+
<div class="ctrlHolder">
75+
<p class="label">{tmpl_var name='mailbox_quota_stats_txt'}</p>
76+
<div class="multiField">
77+
{tmpl_var name='mailbox_quota_stats'}
78+
</div>
79+
</div>
7480
<div class="ctrlHolder">
7581
<label for="realtime_blackhole_list">{tmpl_var name='realtime_blackhole_list_txt'}</label>
7682
<input name="realtime_blackhole_list" id="realtime_blackhole_list" value="{tmpl_var name='realtime_blackhole_list'}" size="40" maxlength="255" type="text" class="textInput" />&nbsp;{tmpl_var name='realtime_blackhole_list_note_txt'}

server/mods-available/monitor_core_module.inc.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,18 @@ private function _doMonitor() {
117117
}
118118

119119
private function _monitorEmailQuota() {
120-
global $app;
120+
global $app, $conf;
121121

122122
/*
123123
* This monitoring is expensive, so do it only every 15 minutes
124124
*/
125125
$min = @date('i');
126126
if ($min % 15 != 0) return;
127127

128+
$app->uses('getconf');
129+
$mail_config = $app->getconf->get_server_config($conf['server_id'], 'mail');
130+
if($mail_config['mailbox_quota_stats'] == 'n') return;
131+
128132

129133
/*
130134
* First we get the Monitoring-data from the tools

0 commit comments

Comments
 (0)