From 4a1ae3f66ce360fb3ab368c84ecabec92f973824 Mon Sep 17 00:00:00 2001
From: Thom Pol <thom@amsterdamtech.nl>
Date: Wed, 18 May 2022 20:17:11 +0200
Subject: [PATCH] Implement quota notification to reseller for all notification
 types (#6346)

---
 install/tpl/server.ini.master                 |  3 +
 .../web/admin/form/server_config.tform.php    | 18 +++++
 .../web/admin/lib/lang/ar_server_config.lng   |  2 +
 .../web/admin/lib/lang/bg_server_config.lng   |  2 +
 .../web/admin/lib/lang/br_server_config.lng   |  2 +
 .../web/admin/lib/lang/ca_server_config.lng   |  2 +
 .../web/admin/lib/lang/cz_server_config.lng   |  2 +
 .../web/admin/lib/lang/de_server_config.lng   |  2 +
 .../web/admin/lib/lang/dk_server_config.lng   |  2 +
 .../web/admin/lib/lang/el_server_config.lng   |  2 +
 .../web/admin/lib/lang/en_server_config.lng   |  2 +
 .../web/admin/lib/lang/es_server_config.lng   |  2 +
 .../web/admin/lib/lang/fi_server_config.lng   |  2 +
 .../web/admin/lib/lang/fr_server_config.lng   |  2 +
 .../web/admin/lib/lang/hr_server_config.lng   |  2 +
 .../web/admin/lib/lang/hu_server_config.lng   |  2 +
 .../web/admin/lib/lang/id_server_config.lng   |  2 +
 .../web/admin/lib/lang/it_server_config.lng   |  2 +
 .../web/admin/lib/lang/ja_server_config.lng   |  2 +
 .../web/admin/lib/lang/nl_server_config.lng   |  2 +
 .../web/admin/lib/lang/pl_server_config.lng   |  2 +
 .../web/admin/lib/lang/pt_server_config.lng   |  2 +
 .../web/admin/lib/lang/ro_server_config.lng   |  2 +
 .../web/admin/lib/lang/ru_server_config.lng   |  2 +
 .../web/admin/lib/lang/se_server_config.lng   |  2 +
 .../web/admin/lib/lang/sk_server_config.lng   |  2 +
 .../web/admin/lib/lang/tr_server_config.lng   |  2 +
 .../templates/server_config_mail_edit.htm     |  6 ++
 .../templates/server_config_web_edit.htm      | 12 ++++
 .../classes/cron.d/300-quota_notify.inc.php   | 72 +++++++++++++++++++
 30 files changed, 161 insertions(+)

diff --git a/install/tpl/server.ini.master b/install/tpl/server.ini.master
index 6fc05368db..a4544171d5 100644
--- a/install/tpl/server.ini.master
+++ b/install/tpl/server.ini.master
@@ -60,6 +60,7 @@ mailbox_quota_stats=y
 realtime_blackhole_list=zen.spamhaus.org
 overquota_notify_threshold=90
 overquota_notify_admin=y
+overquota_notify_reseller=y
 overquota_notify_client=y
 overquota_notify_freq=7
 overquota_notify_onok=n
@@ -122,10 +123,12 @@ php_ini_check_minutes=1
 overtraffic_disable_web=y
 overquota_notify_threshold=90
 overquota_notify_admin=y
+overquota_notify_reseller=y
 overquota_notify_client=y
 overquota_notify_freq=7
 overquota_db_notify_threshold=90
 overquota_db_notify_admin=y
+overquota_db_notify_reseller=y
 overquota_db_notify_client=y
 overquota_notify_onok=n
 logging=yes
diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php
index af87df628f..eb291d02ba 100644
--- a/interface/web/admin/form/server_config.tform.php
+++ b/interface/web/admin/form/server_config.tform.php
@@ -758,6 +758,12 @@ $form["tabs"]['mail'] = array(
 			'default' => 'y',
 			'value' => array(0 => 'n', 1 => 'y')
 		),
+		'overquota_notify_reseller' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
+			'default' => 'y',
+			'value' => array(0 => 'n', 1 => 'y')
+		),
 		'overquota_notify_client' => array(
 			'datatype' => 'VARCHAR',
 			'formtype' => 'CHECKBOX',
@@ -1118,6 +1124,12 @@ $form["tabs"]['web'] = array(
 			'default' => 'y',
 			'value' => array(0 => 'n', 1 => 'y')
 		),
+		'overquota_notify_reseller' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
+			'default' => 'y',
+			'value' => array(0 => 'n', 1 => 'y')
+		),
 		'overquota_notify_client' => array(
 			'datatype' => 'VARCHAR',
 			'formtype' => 'CHECKBOX',
@@ -1142,6 +1154,12 @@ $form["tabs"]['web'] = array(
 			'default' => 'y',
 			'value' => array(0 => 'n', 1 => 'y')
 		),
+		'overquota_db_notify_reseller' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
+			'default' => 'y',
+			'value' => array(0 => 'n', 1 => 'y')
+		),
 		'overquota_db_notify_client' => array(
 			'datatype' => 'VARCHAR',
 			'formtype' => 'CHECKBOX',
diff --git a/interface/web/admin/lib/lang/ar_server_config.lng b/interface/web/admin/lib/lang/ar_server_config.lng
index f06dbc330e..56331a97da 100644
--- a/interface/web/admin/lib/lang/ar_server_config.lng
+++ b/interface/web/admin/lib/lang/ar_server_config.lng
@@ -199,6 +199,7 @@ $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
 $wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
 $wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
@@ -280,6 +281,7 @@ $wb['do_not_try_rescue_mongodb_txt'] = 'Disable MongoDB monitoring';
 $wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounted';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Send DB quota warnings to admin';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Send DB quota warnings to client';
 $wb['php_handler_txt'] = 'Default PHP Handler';
 $wb['php_fpm_default_chroot_txt'] = 'Default chrooted PHP-FPM';
diff --git a/interface/web/admin/lib/lang/bg_server_config.lng b/interface/web/admin/lib/lang/bg_server_config.lng
index 773b6c5da1..8a741a641b 100644
--- a/interface/web/admin/lib/lang/bg_server_config.lng
+++ b/interface/web/admin/lib/lang/bg_server_config.lng
@@ -199,6 +199,7 @@ $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
 $wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
 $wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
@@ -280,6 +281,7 @@ $wb['do_not_try_rescue_mongodb_txt'] = 'Disable MongoDB monitoring';
 $wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounted';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Send DB quota warnings to admin';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Send DB quota warnings to client';
 $wb['php_handler_txt'] = 'Default PHP Handler';
 $wb['php_fpm_default_chroot_txt'] = 'Default chrooted PHP-FPM';
diff --git a/interface/web/admin/lib/lang/br_server_config.lng b/interface/web/admin/lib/lang/br_server_config.lng
index 0d0e8b6d18..af3eb367ee 100644
--- a/interface/web/admin/lib/lang/br_server_config.lng
+++ b/interface/web/admin/lib/lang/br_server_config.lng
@@ -206,6 +206,7 @@ $wb['rbl_error_regex'] = 'Por favor, insira nomes de host válidos para RBLs.';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Enviar alerta da cota para o administrador';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Enviar alerta da cota para o cliente';
 $wb['overquota_notify_onok_txt'] = 'Enviar mensagem da cota para o cliente';
 $wb['overquota_notify_freq_txt'] = 'Enviar alerta da cota a cada N dias';
@@ -230,6 +231,7 @@ $wb['backup_dir_mount_cmd_txt'] = 'Comando mount, se o diretório não está mon
 $wb['backup_delete_txt'] = 'Remover backups de domínios/site';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Enviar alerta da cota do Banco de Dados para o administrador';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Enviar alerta da cota do Banco de Dados para o cliente';
 $wb['monitor_system_updates_txt'] = 'Verificar por atualizações do sistema';
 $wb['php_handler_txt'] = 'Manipulador padrão PHP';
diff --git a/interface/web/admin/lib/lang/ca_server_config.lng b/interface/web/admin/lib/lang/ca_server_config.lng
index acadb5b313..0bc67affe0 100644
--- a/interface/web/admin/lib/lang/ca_server_config.lng
+++ b/interface/web/admin/lib/lang/ca_server_config.lng
@@ -202,6 +202,7 @@ $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
 $wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
 $wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
@@ -226,6 +227,7 @@ $wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounte
 $wb['backup_delete_txt'] = 'Delete backups on domain/website delete';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Send DB quota warnings to admin';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Send DB quota warnings to client';
 $wb['monitor_system_updates_txt'] = 'Check for Linux updates';
 $wb['php_handler_txt'] = 'Default PHP Handler';
diff --git a/interface/web/admin/lib/lang/cz_server_config.lng b/interface/web/admin/lib/lang/cz_server_config.lng
index 7f9da6ce69..bf86abd2ba 100644
--- a/interface/web/admin/lib/lang/cz_server_config.lng
+++ b/interface/web/admin/lib/lang/cz_server_config.lng
@@ -185,6 +185,7 @@ $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Poslat varování o překročení nebo vyčerpání kvót adminovi';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Poslat varování o překročení nebo vyčerpání kvót klientovi';
 $wb['overquota_notify_onok_txt'] = 'Poslat zprávu klientovi, že kvóta je již v pořádku';
 $wb['overquota_notify_freq_txt'] = 'Poslat varování o kvótách každý X dní';
@@ -276,6 +277,7 @@ $wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounte
 $wb['backup_delete_txt'] = 'Odstranit zálohy pokud byla smazána doména/webové stránky';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Poslat varování o překročení nebo vyčerpání DB kvót adminovi';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Poslat varování o překročení nebo vyčerpání DB kvót klientovi';
 $wb['php_handler_txt'] = 'Výchozí PHP obslužná rutina';
 $wb['php_fpm_default_chroot_txt'] = 'Default chrooted PHP-FPM';
diff --git a/interface/web/admin/lib/lang/de_server_config.lng b/interface/web/admin/lib/lang/de_server_config.lng
index 9b82a429dd..2a2cbc5223 100644
--- a/interface/web/admin/lib/lang/de_server_config.lng
+++ b/interface/web/admin/lib/lang/de_server_config.lng
@@ -205,6 +205,7 @@ $wb['rbl_error_regex'] = 'Bitte geben Sie gültige RBL-Hostnamen an.';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Quota-Warnungen an den Administrator senden';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Quota-Warnungen an den Kunden senden';
 $wb['overquota_notify_onok_txt'] = 'Meldung an den Kunden senden, wenn Belegung wieder ok';
 $wb['overquota_notify_freq_txt'] = 'Quota-Warnung alle X Tage versenden';
@@ -283,6 +284,7 @@ $wb['cron_wget_error_regex'] = 'Invalid cron wget path.';
 $wb['network_filesystem_txt'] = 'Netzwerk-Dateisystem';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Datenbank-Quota-Warnungen an den Administrator senden';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Datenbank-Quota-Warnungen an den Kunden senden';
 $wb['php_ini_check_minutes_txt'] = 'Prüfe php.ini alle X Minuten auf Änderungen';
 $wb['php_ini_check_minutes_error_empty'] = 'Bitte geben Sie einen Wert an, wie oft die php.ini auf Änderungen geprüft werden soll.';
diff --git a/interface/web/admin/lib/lang/dk_server_config.lng b/interface/web/admin/lib/lang/dk_server_config.lng
index d4194e02e8..722c68889e 100644
--- a/interface/web/admin/lib/lang/dk_server_config.lng
+++ b/interface/web/admin/lib/lang/dk_server_config.lng
@@ -188,6 +188,7 @@ $wb['rbl_error_regex'] = 'Angiv gyldige RBL værtsnavne.';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Send kvote advarsler til admin';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Send kvote advarsler til kunde';
 $wb['overquota_notify_onok_txt'] = 'Send kvote ok meddelelse til kunde';
 $wb['overquota_notify_freq_txt'] = 'Send kvote advarsler X dage';
@@ -279,6 +280,7 @@ $wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounte
 $wb['backup_delete_txt'] = 'Delete backups on domain/website delete';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Send DB quota warnings to admin';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Send DB quota warnings to client';
 $wb['php_handler_txt'] = 'Default PHP Handler';
 $wb['php_fpm_default_chroot_txt'] = 'Default chrooted PHP-FPM';
diff --git a/interface/web/admin/lib/lang/el_server_config.lng b/interface/web/admin/lib/lang/el_server_config.lng
index e4dd91cfb9..4a6d1eb3e2 100644
--- a/interface/web/admin/lib/lang/el_server_config.lng
+++ b/interface/web/admin/lib/lang/el_server_config.lng
@@ -199,6 +199,7 @@ $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
 $wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
 $wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
@@ -280,6 +281,7 @@ $wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounte
 $wb['backup_delete_txt'] = 'Delete backups on domain/website delete';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Send DB quota warnings to admin';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Send DB quota warnings to client';
 $wb['php_handler_txt'] = 'Default PHP Handler';
 $wb['php_fpm_default_chroot_txt'] = 'Default chrooted PHP-FPM';
diff --git a/interface/web/admin/lib/lang/en_server_config.lng b/interface/web/admin/lib/lang/en_server_config.lng
index 714f563357..fc4d12e0c8 100644
--- a/interface/web/admin/lib/lang/en_server_config.lng
+++ b/interface/web/admin/lib/lang/en_server_config.lng
@@ -212,6 +212,7 @@ $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
 $wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
 $wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
@@ -236,6 +237,7 @@ $wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounte
 $wb['backup_delete_txt'] = 'Delete backups on domain/website delete';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Send DB quota warnings to admin';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Send DB quota warnings to client';
 $wb['monitor_system_updates_txt'] = 'Check for Linux updates';
 $wb['php_handler_txt'] = 'Default PHP Handler';
diff --git a/interface/web/admin/lib/lang/es_server_config.lng b/interface/web/admin/lib/lang/es_server_config.lng
index 0ff3716c80..9a49046ad9 100644
--- a/interface/web/admin/lib/lang/es_server_config.lng
+++ b/interface/web/admin/lib/lang/es_server_config.lng
@@ -191,10 +191,12 @@ $wb['nginx_vhost_conf_enabled_dir_txt'] = 'Directorio de configuración de host
 $wb['no_notifications_txt'] = 'Sin notificaciones';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Enviar advertencias de cuota de base de datos al administrador';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Enviar advertencias de cuota de base de datos a los clientes';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Enviar advertencias de cuota excedida al administrador';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Enviar advertencias de cuota excedida al cliente';
 $wb['overquota_notify_freq_note_txt'] = '0 = enviar mensaje solo una vez, sin volver a notificar';
 $wb['overquota_notify_freq_txt'] = 'Enviar advertencia de cuota cada X días';
diff --git a/interface/web/admin/lib/lang/fi_server_config.lng b/interface/web/admin/lib/lang/fi_server_config.lng
index aac24a6a34..abf9453646 100644
--- a/interface/web/admin/lib/lang/fi_server_config.lng
+++ b/interface/web/admin/lib/lang/fi_server_config.lng
@@ -199,6 +199,7 @@ $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
 $wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
 $wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
@@ -280,6 +281,7 @@ $wb['do_not_try_rescue_mongodb_txt'] = 'Disable MongoDB monitoring';
 $wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounted';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Send DB quota warnings to admin';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Send DB quota warnings to client';
 $wb['php_handler_txt'] = 'Default PHP Handler';
 $wb['php_fpm_default_chroot_txt'] = 'Default chrooted PHP-FPM';
diff --git a/interface/web/admin/lib/lang/fr_server_config.lng b/interface/web/admin/lib/lang/fr_server_config.lng
index 572e3f4f77..d569e520a9 100644
--- a/interface/web/admin/lib/lang/fr_server_config.lng
+++ b/interface/web/admin/lib/lang/fr_server_config.lng
@@ -187,6 +187,7 @@ $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
 $wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
 $wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
@@ -278,6 +279,7 @@ $wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounte
 $wb['backup_delete_txt'] = 'Delete backups on domain/website delete';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Send DB quota warnings to admin';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Send DB quota warnings to client';
 $wb['php_handler_txt'] = 'Default PHP Handler';
 $wb['php_fpm_default_chroot_txt'] = 'Default chrooted PHP-FPM';
diff --git a/interface/web/admin/lib/lang/hr_server_config.lng b/interface/web/admin/lib/lang/hr_server_config.lng
index c512715f98..fa34621e95 100644
--- a/interface/web/admin/lib/lang/hr_server_config.lng
+++ b/interface/web/admin/lib/lang/hr_server_config.lng
@@ -199,6 +199,7 @@ $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
 $wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
 $wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
@@ -280,6 +281,7 @@ $wb['apps_vhost_enabled_txt'] = 'Apps-vhost enabled';
 $wb['do_not_try_rescue_mongodb_txt'] = 'Disable MongoDB monitoring';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Send DB quota warnings to admin';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Send DB quota warnings to client';
 $wb['php_handler_txt'] = 'Default PHP Handler';
 $wb['php_fpm_default_chroot_txt'] = 'Default chrooted PHP-FPM';
diff --git a/interface/web/admin/lib/lang/hu_server_config.lng b/interface/web/admin/lib/lang/hu_server_config.lng
index 8f8347053f..6c73a7d20b 100644
--- a/interface/web/admin/lib/lang/hu_server_config.lng
+++ b/interface/web/admin/lib/lang/hu_server_config.lng
@@ -199,6 +199,7 @@ $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
 $wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
 $wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
@@ -280,6 +281,7 @@ $wb['do_not_try_rescue_mongodb_txt'] = 'Disable MongoDB monitoring';
 $wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounted';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Send DB quota warnings to admin';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Send DB quota warnings to client';
 $wb['php_handler_txt'] = 'Default PHP Handler';
 $wb['php_fpm_default_chroot_txt'] = 'Default chrooted PHP-FPM';
diff --git a/interface/web/admin/lib/lang/id_server_config.lng b/interface/web/admin/lib/lang/id_server_config.lng
index b632a9f287..8a06d38b48 100644
--- a/interface/web/admin/lib/lang/id_server_config.lng
+++ b/interface/web/admin/lib/lang/id_server_config.lng
@@ -199,6 +199,7 @@ $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
 $wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
 $wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
@@ -280,6 +281,7 @@ $wb['do_not_try_rescue_mongodb_txt'] = 'Disable MongoDB monitoring';
 $wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounted';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Send DB quota warnings to admin';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Send DB quota warnings to client';
 $wb['php_handler_txt'] = 'Default PHP Handler';
 $wb['php_fpm_default_chroot_txt'] = 'Default chrooted PHP-FPM';
diff --git a/interface/web/admin/lib/lang/it_server_config.lng b/interface/web/admin/lib/lang/it_server_config.lng
index d5afddbcff..384cb65343 100644
--- a/interface/web/admin/lib/lang/it_server_config.lng
+++ b/interface/web/admin/lib/lang/it_server_config.lng
@@ -187,6 +187,7 @@ $wb['rbl_error_regex'] = 'Per cortesia specificare nomi host RBL validi.';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Trasmetti allarmi quota ad admin';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Trasmetti allarmi quota al cliente';
 $wb['overquota_notify_onok_txt'] = 'Trasmetti messaggio quota ok al cliente';
 $wb['overquota_notify_freq_txt'] = 'Trasmetti allarmi quota ogni X giorni';
@@ -277,6 +278,7 @@ $wb['v6_prefix_length'] = 'Prefisso troppo lungo secondo le regole IPv6';
 $wb['backup_dir_mount_cmd_txt'] = 'Comanda mount se la directory di backup non è montata';
 $wb['backup_delete_txt'] = 'Cancellare i backup alla cancellazione dei domini/siti web';
 $wb['overquota_db_notify_admin_txt'] = 'Invia avviso di quota DB all\'amministratore';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Invia avviso di quota DB al cliente';
 $wb['php_handler_txt'] = 'Default PHP Handler';
 $wb['php_fpm_default_chroot_txt'] = 'Default chrooted PHP-FPM';
diff --git a/interface/web/admin/lib/lang/ja_server_config.lng b/interface/web/admin/lib/lang/ja_server_config.lng
index 589fccb6e5..bf6d47d59e 100644
--- a/interface/web/admin/lib/lang/ja_server_config.lng
+++ b/interface/web/admin/lib/lang/ja_server_config.lng
@@ -199,6 +199,7 @@ $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
 $wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
 $wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
@@ -280,6 +281,7 @@ $wb['do_not_try_rescue_mongodb_txt'] = 'Disable MongoDB monitoring';
 $wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounted';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Send DB quota warnings to admin';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Send DB quota warnings to client';
 $wb['php_handler_txt'] = 'Default PHP Handler';
 $wb['php_fpm_default_chroot_txt'] = 'Default chrooted PHP-FPM';
diff --git a/interface/web/admin/lib/lang/nl_server_config.lng b/interface/web/admin/lib/lang/nl_server_config.lng
index cb8cafc822..c89c345e77 100644
--- a/interface/web/admin/lib/lang/nl_server_config.lng
+++ b/interface/web/admin/lib/lang/nl_server_config.lng
@@ -199,6 +199,7 @@ $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
 $wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
 $wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
@@ -280,6 +281,7 @@ $wb['do_not_try_rescue_mongodb_txt'] = 'Disable MongoDB monitoring';
 $wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounted';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Send DB quota warnings to admin';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Send DB quota warnings to client';
 $wb['php_handler_txt'] = 'Default PHP Handler';
 $wb['php_fpm_default_chroot_txt'] = 'Default chrooted PHP-FPM';
diff --git a/interface/web/admin/lib/lang/pl_server_config.lng b/interface/web/admin/lib/lang/pl_server_config.lng
index ef351a1431..93ded596ea 100644
--- a/interface/web/admin/lib/lang/pl_server_config.lng
+++ b/interface/web/admin/lib/lang/pl_server_config.lng
@@ -199,6 +199,7 @@ $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
 $wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
 $wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
@@ -280,6 +281,7 @@ $wb['do_not_try_rescue_mongodb_txt'] = 'Disable MongoDB monitoring';
 $wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounted';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Send DB quota warnings to admin';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Send DB quota warnings to client';
 $wb['php_handler_txt'] = 'Default PHP Handler';
 $wb['php_fpm_default_chroot_txt'] = 'Default chrooted PHP-FPM';
diff --git a/interface/web/admin/lib/lang/pt_server_config.lng b/interface/web/admin/lib/lang/pt_server_config.lng
index 07530dfee8..95faebb41e 100644
--- a/interface/web/admin/lib/lang/pt_server_config.lng
+++ b/interface/web/admin/lib/lang/pt_server_config.lng
@@ -199,6 +199,7 @@ $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
 $wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
 $wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
@@ -280,6 +281,7 @@ $wb['do_not_try_rescue_mongodb_txt'] = 'Disable MongoDB monitoring';
 $wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounted';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Send DB quota warnings to admin';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Send DB quota warnings to client';
 $wb['php_handler_txt'] = 'Default PHP Handler';
 $wb['php_fpm_default_chroot_txt'] = 'Default chrooted PHP-FPM';
diff --git a/interface/web/admin/lib/lang/ro_server_config.lng b/interface/web/admin/lib/lang/ro_server_config.lng
index 59ff1a77f1..bb474f5930 100644
--- a/interface/web/admin/lib/lang/ro_server_config.lng
+++ b/interface/web/admin/lib/lang/ro_server_config.lng
@@ -199,6 +199,7 @@ $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
 $wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
 $wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
@@ -280,6 +281,7 @@ $wb['do_not_try_rescue_mongodb_txt'] = 'Disable MongoDB monitoring';
 $wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounted';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Send DB quota warnings to admin';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Send DB quota warnings to client';
 $wb['php_handler_txt'] = 'Default PHP Handler';
 $wb['php_fpm_default_chroot_txt'] = 'Default chrooted PHP-FPM';
diff --git a/interface/web/admin/lib/lang/ru_server_config.lng b/interface/web/admin/lib/lang/ru_server_config.lng
index 8a68657fe8..1cd7c64cc4 100644
--- a/interface/web/admin/lib/lang/ru_server_config.lng
+++ b/interface/web/admin/lib/lang/ru_server_config.lng
@@ -199,6 +199,7 @@ $wb['rbl_error_regex'] = 'Пожалуйста, укажите действит
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Присылать предупреждения квоты администратору';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Присылать предупреждения квоты клиенту';
 $wb['overquota_notify_onok_txt'] = 'Присылать сообщение квоты ОК клиенту';
 $wb['overquota_notify_freq_txt'] = 'Присылать предупреждения квоты каждые Х дней';
@@ -280,6 +281,7 @@ $wb['do_not_try_rescue_mongodb_txt'] = 'Отключить мониторинг
 $wb['backup_dir_mount_cmd_txt'] = 'Выполните команду монтирования, если каталог резервного копирования не установлен';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Присылать предупреждения квоты DB администратору';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Присылать предупреждения квоты DB клиенту';
 $wb['php_handler_txt'] = 'Обработчик PHP по умолчанию';
 $wb['php_fpm_default_chroot_txt'] = 'Default chrooted PHP-FPM';
diff --git a/interface/web/admin/lib/lang/se_server_config.lng b/interface/web/admin/lib/lang/se_server_config.lng
index c6fc39fad7..da6d90d1ec 100644
--- a/interface/web/admin/lib/lang/se_server_config.lng
+++ b/interface/web/admin/lib/lang/se_server_config.lng
@@ -199,6 +199,7 @@ $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
 $wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
 $wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
@@ -280,6 +281,7 @@ $wb['do_not_try_rescue_mongodb_txt'] = 'Disable MongoDB monitoring';
 $wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounted';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Send DB quota warnings to admin';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Send DB quota warnings to client';
 $wb['php_handler_txt'] = 'Default PHP Handler';
 $wb['php_fpm_default_chroot_txt'] = 'Default chrooted PHP-FPM';
diff --git a/interface/web/admin/lib/lang/sk_server_config.lng b/interface/web/admin/lib/lang/sk_server_config.lng
index aea4f45cf6..37a3d597fb 100644
--- a/interface/web/admin/lib/lang/sk_server_config.lng
+++ b/interface/web/admin/lib/lang/sk_server_config.lng
@@ -199,6 +199,7 @@ $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
 $wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
 $wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
@@ -280,6 +281,7 @@ $wb['do_not_try_rescue_mongodb_txt'] = 'Disable MongoDB monitoring';
 $wb['backup_dir_mount_cmd_txt'] = 'Mount command, if backup directory not mounted';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Send DB quota warnings to admin';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Send DB quota warnings to client';
 $wb['php_handler_txt'] = 'Default PHP Handler';
 $wb['php_fpm_default_chroot_txt'] = 'Default chrooted PHP-FPM';
diff --git a/interface/web/admin/lib/lang/tr_server_config.lng b/interface/web/admin/lib/lang/tr_server_config.lng
index 3058506d2d..9b8bfb383f 100644
--- a/interface/web/admin/lib/lang/tr_server_config.lng
+++ b/interface/web/admin/lib/lang/tr_server_config.lng
@@ -206,6 +206,7 @@ $wb['rbl_error_regex'] = 'Lütfen geçerli RBL sunucu adları yazın.';
 $wb['overquota_notify_threshold_txt'] = 'Quota warning usage level';
 $wb['overquota_notify_threshold_error'] = 'Quota warning usage level must be between 0-100%';
 $wb['overquota_notify_admin_txt'] = 'Kota Uyarıları Yöneticiye Gönderilsin';
+$wb['overquota_notify_reseller_txt'] = 'Send quota warnings to reseller';
 $wb['overquota_notify_client_txt'] = 'Kota Uyarıları Müşteriye Gönderilsin';
 $wb['overquota_notify_onok_txt'] = 'Kota Tamam İletisi Müşteriye Gönderilsin';
 $wb['overquota_notify_freq_txt'] = 'Kota Uyarısı Gönderim Sıklığı (Gün)';
@@ -230,6 +231,7 @@ $wb['backup_dir_mount_cmd_txt'] = 'Mount komutu, yedek klasörü takılı değil
 $wb['backup_delete_txt'] = 'Etki alanı ya da web sitesi silindiğinde yedekler de silinsin';
 $wb['overquota_db_notify_threshold_txt'] = 'DB quota warning usage level';
 $wb['overquota_db_notify_admin_txt'] = 'Veritabanı Kotası Bildirimleri Yöneticiye Gönderilsin';
+$wb['overquota_db_notify_reseller_txt'] = 'Send DB quota warnings to reseller';
 $wb['overquota_db_notify_client_txt'] = 'Veritabanı Kotası Bildirimleri Müşteriye Gönderilsin';
 $wb['monitor_system_updates_txt'] = 'Linux Güncellemeleri Denetlensin';
 $wb['php_handler_txt'] = 'Varsayılan PHP İşleyici';
diff --git a/interface/web/admin/templates/server_config_mail_edit.htm b/interface/web/admin/templates/server_config_mail_edit.htm
index d23a23a59c..1876b78f4b 100644
--- a/interface/web/admin/templates/server_config_mail_edit.htm
+++ b/interface/web/admin/templates/server_config_mail_edit.htm
@@ -157,6 +157,12 @@
                     {tmpl_var name='overquota_notify_admin'}
                 </div>
             </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">{tmpl_var name='overquota_notify_reseller_txt'}</label>
+                <div class="col-sm-9">
+                    {tmpl_var name='overquota_notify_reseller'}
+                </div>
+            </div>
             <div class="form-group">
                 <label class="col-sm-3 control-label">{tmpl_var name='overquota_notify_client_txt'}</label>
                 <div class="col-sm-9">
diff --git a/interface/web/admin/templates/server_config_web_edit.htm b/interface/web/admin/templates/server_config_web_edit.htm
index 630dc200a6..2161907cb5 100644
--- a/interface/web/admin/templates/server_config_web_edit.htm
+++ b/interface/web/admin/templates/server_config_web_edit.htm
@@ -162,6 +162,12 @@
                     {tmpl_var name='overquota_notify_admin'}
                 </div>
             </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">{tmpl_var name='overquota_notify_reseller_txt'}</label>
+                <div class="col-sm-9">
+                    {tmpl_var name='overquota_notify_reseller'}
+                </div>
+            </div>
             <div class="form-group">
                 <label class="col-sm-3 control-label">{tmpl_var name='overquota_notify_client_txt'}</label>
                 <div class="col-sm-9">
@@ -179,6 +185,12 @@
 					{tmpl_var name='overquota_db_notify_admin'}
 				 </div>
 			</div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">{tmpl_var name='overquota_db_notify_reseller_txt'}</label>
+                <div class="col-sm-9">
+                    {tmpl_var name='overquota_db_notify_reseller'}
+                </div>
+            </div>
 			<div class="form-group">
 				<label class="col-sm-3 control-label">{tmpl_var name='overquota_db_notify_client_txt'}</label>
 				<div class="col-sm-9">
diff --git a/server/lib/classes/cron.d/300-quota_notify.inc.php b/server/lib/classes/cron.d/300-quota_notify.inc.php
index ea99444096..3a271ac5d6 100644
--- a/server/lib/classes/cron.d/300-quota_notify.inc.php
+++ b/server/lib/classes/cron.d/300-quota_notify.inc.php
@@ -243,6 +243,18 @@ class cronjob_quota_notify extends cronjob {
 								$recipients[] = $global_config['admin_mail'];
 							}
 
+							//* Send email to reseller
+							if($web_config['overquota_notify_reseller'] == 'y') {
+								$client_group_id = $rec["sys_groupid"];
+								$app->db->queryOneRecord("SELECT parent_client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
+								if($client['parent_client_id'] > 0) {
+									$reseller = $app->db->queryOneRecord("SELECT email FROM client WHERE client_id = ?", $client['parent_client_id']);
+								}
+								if($reseller['email'] != '') {
+									$recipients[] = $reseller['email'];
+								}
+							}
+
 							//* Send email to client
 							if($web_config['overquota_notify_client'] == 'y') {
 								$client_group_id = $rec["sys_groupid"];
@@ -278,6 +290,18 @@ class cronjob_quota_notify extends cronjob {
 								$recipients[] = $global_config['admin_mail'];
 							}
 
+							//* Send email to reseller
+							if($web_config['overquota_notify_reseller'] == 'y') {
+								$client_group_id = $rec["sys_groupid"];
+								$app->db->queryOneRecord("SELECT parent_client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
+								if($client['parent_client_id'] > 0) {
+									$reseller = $app->db->queryOneRecord("SELECT email FROM client WHERE client_id = ?", $client['parent_client_id']);
+								}
+								if($reseller['email'] != '') {
+									$recipients[] = $reseller['email'];
+								}
+							}
+
 							//* Send email to client
 							if($web_config['overquota_notify_client'] == 'y') {
 								$client_group_id = $rec["sys_groupid"];
@@ -371,6 +395,18 @@ class cronjob_quota_notify extends cronjob {
 								$recipients[] = $global_config['admin_mail'];
 							}
 
+							//* Send email to reseller
+							if($web_config['overquota_notify_reseller'] == 'y') {
+								$client_group_id = $rec["sys_groupid"];
+								$app->db->queryOneRecord("SELECT parent_client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
+								if($client['parent_client_id'] > 0) {
+									$reseller = $app->db->queryOneRecord("SELECT email FROM client WHERE client_id = ?", $client['parent_client_id']);
+								}
+								if($reseller['email'] != '') {
+									$recipients[] = $reseller['email'];
+								}
+							}
+
 							//* Send email to client
 							if($mail_config['overquota_notify_client'] == 'y') {
 								$client_group_id = $rec["sys_groupid"];
@@ -406,6 +442,18 @@ class cronjob_quota_notify extends cronjob {
 								$recipients[] = $global_config['admin_mail'];
 							}
 
+							//* Send email to reseller
+							if($web_config['overquota_notify_reseller'] == 'y') {
+								$client_group_id = $rec["sys_groupid"];
+								$app->db->queryOneRecord("SELECT parent_client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
+								if($client['parent_client_id'] > 0) {
+									$reseller = $app->db->queryOneRecord("SELECT email FROM client WHERE client_id = ?", $client['parent_client_id']);
+								}
+								if($reseller['email'] != '') {
+									$recipients[] = $reseller['email'];
+								}
+							}
+
 							//* Send email to client
 							if($mail_config['overquota_notify_client'] == 'y') {
 								$client_group_id = $rec["sys_groupid"];
@@ -493,6 +541,18 @@ class cronjob_quota_notify extends cronjob {
 										if($global_config['admin_mail'] != '' && $web_config['overquota_db_notify_admin'] == 'y')
 											$recipients[] = $global_config['admin_mail'];
 
+										//* Send email to reseller
+										if($web_config['overquota_db_notify_reseller'] == 'y') {
+											$client_group_id = $rec["sys_groupid"];
+											$app->db->queryOneRecord("SELECT parent_client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
+											if($client['parent_client_id'] > 0) {
+												$reseller = $app->db->queryOneRecord("SELECT email FROM client WHERE client_id = ?", $client['parent_client_id']);
+											}
+											if($reseller['email'] != '') {
+												$recipients[] = $reseller['email'];
+											}
+										}
+										
 										//* Send email to client
 										if($web_config['overquota_db_notify_client'] == 'y' && $client['email'] != '')
 											$recipients[] = $client['email'];
@@ -521,6 +581,18 @@ class cronjob_quota_notify extends cronjob {
 										if($global_config['admin_mail'] != '' && $web_config['overquota_db_notify_admin'] == 'y')
 											$recipients[] = $global_config['admin_mail'];
 
+										//* Send email to reseller
+										if($web_config['overquota_db_notify_reseller'] == 'y') {
+											$client_group_id = $rec["sys_groupid"];
+											$app->db->queryOneRecord("SELECT parent_client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
+											if($client['parent_client_id'] > 0) {
+												$reseller = $app->db->queryOneRecord("SELECT email FROM client WHERE client_id = ?", $client['parent_client_id']);
+											}
+											if($reseller['email'] != '') {
+												$recipients[] = $reseller['email'];
+											}
+										}
+
 										//* Send email to client
 										if($web_config['overquota_db_notify_client'] == 'y' && $client['email'] != '')
 											$recipients[] = $client['email'];
-- 
GitLab