Skip to content

Commit 7a03791

Browse files
Judah - MWMarius Burkard
authored andcommitted
Changed hardcoded quota warning levels to be adjustable in server config
1 parent 19b24c6 commit 7a03791

30 files changed

+135
-6
lines changed

install/tpl/server.ini.master

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ mailbox_size_limit=0
5858
message_size_limit=0
5959
mailbox_quota_stats=y
6060
realtime_blackhole_list=zen.spamhaus.org
61+
overquota_notify_threshold=90
6162
overquota_notify_admin=y
6263
overquota_notify_client=y
6364
overquota_notify_freq=7
@@ -118,9 +119,11 @@ connect_userid_to_webid_start=10000
118119
web_folder_protection=y
119120
php_ini_check_minutes=1
120121
overtraffic_disable_web=y
122+
overquota_notify_threshold=90
121123
overquota_notify_admin=y
122124
overquota_notify_client=y
123125
overquota_notify_freq=7
126+
overquota_db_notify_threshold=90
124127
overquota_db_notify_admin=y
125128
overquota_db_notify_client=y
126129
overquota_notify_onok=n

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

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,18 @@
740740
'default' => 'y',
741741
'value' => array(0 => 'n', 1 => 'y')
742742
),
743+
'overquota_notify_threshold' => array(
744+
'datatype' => 'INTEGER',
745+
'formtype' => 'TEXT',
746+
'default' => '90',
747+
'validators' => array(
748+
0 => array('type' => 'NOTEMPTY', 'errmsg' => 'overquota_notify_threshold_error'),
749+
1 => array('type' => 'RANGE', 'range' => '0:100', 'errmsg' => 'overquota_notify_threshold_error'),
750+
),
751+
'value' => '',
752+
'width' => '20',
753+
'maxlength' => '3'
754+
),
743755
'overquota_notify_admin' => array(
744756
'datatype' => 'VARCHAR',
745757
'formtype' => 'CHECKBOX',
@@ -1082,6 +1094,18 @@
10821094
'default' => 'y',
10831095
'value' => array(0 => 'n', 1 => 'y')
10841096
),
1097+
'overquota_notify_threshold' => array(
1098+
'datatype' => 'INTEGER',
1099+
'formtype' => 'TEXT',
1100+
'default' => '90',
1101+
'validators' => array(
1102+
0 => array('type' => 'NOTEMPTY', 'errmsg' => 'overquota_notify_threshold_error'),
1103+
1 => array('type' => 'RANGE', 'range' => '0:100', 'errmsg' => 'overquota_notify_threshold_error'),
1104+
),
1105+
'value' => '',
1106+
'width' => '20',
1107+
'maxlength' => '3'
1108+
),
10851109
'overquota_notify_admin' => array(
10861110
'datatype' => 'VARCHAR',
10871111
'formtype' => 'CHECKBOX',
@@ -1094,6 +1118,18 @@
10941118
'default' => 'y',
10951119
'value' => array(0 => 'n', 1 => 'y')
10961120
),
1121+
'overquota_db_notify_threshold' => array(
1122+
'datatype' => 'INTEGER',
1123+
'formtype' => 'TEXT',
1124+
'default' => '90',
1125+
'validators' => array(
1126+
0 => array('type' => 'NOTEMPTY', 'errmsg' => 'overquota_notify_threshold_error'),
1127+
1 => array('type' => 'RANGE', 'range' => '0:100', 'errmsg' => 'overquota_notify_threshold_error'),
1128+
),
1129+
'value' => '',
1130+
'width' => '20',
1131+
'maxlength' => '3'
1132+
),
10971133
'overquota_db_notify_admin' => array(
10981134
'datatype' => 'VARCHAR',
10991135
'formtype' => 'CHECKBOX',

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
193193
$wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
194194
$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
195195
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
196+
$wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
197+
$wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
196198
$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
197199
$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
198200
$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
@@ -273,6 +275,7 @@ $wb['disable_bind_log_txt'] = 'Disable bind9 messages for Loglevel WARN';
273275
$wb['apps_vhost_enabled_txt'] = 'Apps-vhost enabled';
274276
$wb['do_not_try_rescue_mongodb_txt'] = 'Disable MongoDB monitoring';
275277
$wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounted';
278+
$wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
276279
$wb['overquota_db_notify_admin_txt'] = 'Send DB quota warnings to admin';
277280
$wb['overquota_db_notify_client_txt'] = 'Send DB quota warnings to client';
278281
$wb['php_handler_txt'] = 'Default PHP Handler';

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
193193
$wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
194194
$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
195195
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
196+
$wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
197+
$wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
196198
$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
197199
$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
198200
$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
@@ -273,6 +275,7 @@ $wb['disable_bind_log_txt'] = 'Disable bind9 messages for Loglevel WARN';
273275
$wb['apps_vhost_enabled_txt'] = 'Apps-vhost enabled';
274276
$wb['do_not_try_rescue_mongodb_txt'] = 'Disable MongoDB monitoring';
275277
$wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounted';
278+
$wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
276279
$wb['overquota_db_notify_admin_txt'] = 'Send DB quota warnings to admin';
277280
$wb['overquota_db_notify_client_txt'] = 'Send DB quota warnings to client';
278281
$wb['php_handler_txt'] = 'Default PHP Handler';

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ $wb['overtraffic_notify_admin_txt'] = 'Enviar notificação de tráfego excedido
200200
$wb['overtraffic_notify_client_txt'] = 'Enviar notificação de tráfego excedido para o cliente';
201201
$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
202202
$wb['rbl_error_regex'] = 'Por favor, insira nomes de host válidos para RBLs.';
203+
$wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
204+
$wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
203205
$wb['overquota_notify_admin_txt'] = 'Enviar alerta da cota para o administrador';
204206
$wb['overquota_notify_client_txt'] = 'Enviar alerta da cota para o cliente';
205207
$wb['overquota_notify_onok_txt'] = 'Enviar mensagem da cota para o cliente';
@@ -223,6 +225,7 @@ $wb['v6_prefix_length'] = 'O prefixo é muito longo de acordo com as definiçõe
223225
$wb['backup_dir_is_mount_txt'] = 'O diretório de backup está montando?';
224226
$wb['backup_dir_mount_cmd_txt'] = 'Comando mount, se o diretório não está montado';
225227
$wb['backup_delete_txt'] = 'Remover backups de domínios/site';
228+
$wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
226229
$wb['overquota_db_notify_admin_txt'] = 'Enviar alerta da cota do Banco de Dados para o administrador';
227230
$wb['overquota_db_notify_client_txt'] = 'Enviar alerta da cota do Banco de Dados para o cliente';
228231
$wb['monitor_system_updates_txt'] = 'Verificar por atualizações do sistema';

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
196196
$wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
197197
$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
198198
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
199+
$wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
200+
$wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
199201
$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
200202
$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
201203
$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
@@ -219,6 +221,7 @@ $wb['v6_prefix_length'] = 'Prefix too long according to defined IPv6 ';
219221
$wb['backup_dir_is_mount_txt'] = 'Backup directory is a mount?';
220222
$wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounted';
221223
$wb['backup_delete_txt'] = 'Delete backups on domain/website delete';
224+
$wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
222225
$wb['overquota_db_notify_admin_txt'] = 'Send DB quota warnings to admin';
223226
$wb['overquota_db_notify_client_txt'] = 'Send DB quota warnings to client';
224227
$wb['monitor_system_updates_txt'] = 'Check for Linux updates';

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ $wb['overtraffic_notify_admin_txt'] = 'Při překročení limitu přenesených d
179179
$wb['overtraffic_notify_client_txt'] = 'Při překročení limitu přenesených dat, poslat oznámení klientovi';
180180
$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
181181
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
182+
$wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
183+
$wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
182184
$wb['overquota_notify_admin_txt'] = 'Poslat varování o překročení nebo vyčerpání kvót adminovi';
183185
$wb['overquota_notify_client_txt'] = 'Poslat varování o překročení nebo vyčerpání kvót klientovi';
184186
$wb['overquota_notify_onok_txt'] = 'Poslat zprávu klientovi, že kvóta je již v pořádku';
@@ -269,6 +271,7 @@ $wb['vhost_rewrite_v6_txt'] = 'Rewrite IPv6 on Mirror';
269271
$wb['v6_prefix_length'] = 'Prefix too long according to defined IPv6 ';
270272
$wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounted';
271273
$wb['backup_delete_txt'] = 'Odstranit zálohy pokud byla smazána doména/webové stránky';
274+
$wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
272275
$wb['overquota_db_notify_admin_txt'] = 'Poslat varování o překročení nebo vyčerpání DB kvót adminovi';
273276
$wb['overquota_db_notify_client_txt'] = 'Poslat varování o překročení nebo vyčerpání DB kvót klientovi';
274277
$wb['php_handler_txt'] = 'Výchozí PHP obslužná rutina';

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ $wb['overtraffic_notify_admin_txt'] = 'Überschreiten des Datentransfer Limits a
199199
$wb['overtraffic_notify_client_txt'] = 'Überschreiten des Datentransfer Limits an den Kunden senden';
200200
$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
201201
$wb['rbl_error_regex'] = 'Bitte geben Sie gültige RBL-Hostnamen an.';
202+
$wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
203+
$wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
202204
$wb['overquota_notify_admin_txt'] = 'Quota-Warnungen an den Administrator senden';
203205
$wb['overquota_notify_client_txt'] = 'Quota-Warnungen an den Kunden senden';
204206
$wb['overquota_notify_onok_txt'] = 'Meldung an den Kunden senden, wenn Belegung wieder ok';
@@ -276,6 +278,7 @@ $wb['cron_init_script_error_regex'] = 'Invalid cron init script.';
276278
$wb['crontab_dir_error_regex'] = 'Invalid crontab directory.';
277279
$wb['cron_wget_error_regex'] = 'Invalid cron wget path.';
278280
$wb['network_filesystem_txt'] = 'Netzwerk-Dateisystem';
281+
$wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
279282
$wb['overquota_db_notify_admin_txt'] = 'Datenbank-Quota-Warnungen an den Administrator senden';
280283
$wb['overquota_db_notify_client_txt'] = 'Datenbank-Quota-Warnungen an den Kunden senden';
281284
$wb['php_ini_check_minutes_txt'] = 'Prüfe php.ini alle X Minuten auf Änderungen';

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ $wb['overtraffic_notify_admin_txt'] = 'Send over-trafik meddelelse til admin';
182182
$wb['overtraffic_notify_client_txt'] = 'Send over-trafik meddelelse til kunde';
183183
$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
184184
$wb['rbl_error_regex'] = 'Angiv gyldige RBL værtsnavne.';
185+
$wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
186+
$wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
185187
$wb['overquota_notify_admin_txt'] = 'Send kvote advarsler til admin';
186188
$wb['overquota_notify_client_txt'] = 'Send kvote advarsler til kunde';
187189
$wb['overquota_notify_onok_txt'] = 'Send kvote ok meddelelse til kunde';
@@ -272,6 +274,7 @@ $wb['vhost_rewrite_v6_txt'] = 'Rewrite IPv6 on Mirror';
272274
$wb['v6_prefix_length'] = 'Prefix too long according to defined IPv6 ';
273275
$wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounted';
274276
$wb['backup_delete_txt'] = 'Delete backups on domain/website delete';
277+
$wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
275278
$wb['overquota_db_notify_admin_txt'] = 'Send DB quota warnings to admin';
276279
$wb['overquota_db_notify_client_txt'] = 'Send DB quota warnings to client';
277280
$wb['php_handler_txt'] = 'Default PHP Handler';

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
193193
$wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
194194
$wb['overtraffic_disable_web_txt'] = 'Disable websites that exceed traffic limit';
195195
$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
196+
$wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
197+
$wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
196198
$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
197199
$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
198200
$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
@@ -273,6 +275,7 @@ $wb['vhost_rewrite_v6_txt'] = 'Rewrite IPv6 on Mirror';
273275
$wb['v6_prefix_length'] = 'Prefix too long according to defined IPv6 ';
274276
$wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounted';
275277
$wb['backup_delete_txt'] = 'Delete backups on domain/website delete';
278+
$wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
276279
$wb['overquota_db_notify_admin_txt'] = 'Send DB quota warnings to admin';
277280
$wb['overquota_db_notify_client_txt'] = 'Send DB quota warnings to client';
278281
$wb['php_handler_txt'] = 'Default PHP Handler';

0 commit comments

Comments
 (0)