diff --git a/quota/CHANGELOG b/quota/CHANGELOG index 0a675b161..7718a3ae2 100644 --- a/quota/CHANGELOG +++ b/quota/CHANGELOG @@ -33,4 +33,4 @@ Quotas are considered active for a filesystem if the usrquota or grpquota option ---- Changes since 1.400 ---- If a user to email is a Virtualmin domain owner, send email to the domain's contact address. ---- Changes since 1.430 ---- -Email to users who are over quota on some filesystem can also be Cc'd to another address, such as the system administrator. +Email to users and groups who are over quota on some filesystem can also be Cc'd to another address, such as the system administrator. diff --git a/quota/email.pl b/quota/email.pl index 8a95f7cbe..8ff6b874e 100755 --- a/quota/email.pl +++ b/quota/email.pl @@ -154,9 +154,10 @@ foreach $k (keys %config) { $group{$i,'ublocks'}, $f, $upercent, - $config{'email_from_'.$f}, + $config{'gemail_from_'.$f}, $group{$i,'gblocks'}, 'gemail', + $config{'gemail_cc_'.$f}, ); } diff --git a/quota/list_groups.cgi b/quota/list_groups.cgi index c9d9a9285..a840103f2 100755 --- a/quota/list_groups.cgi +++ b/quota/list_groups.cgi @@ -266,7 +266,11 @@ if ($access{'email'} && &foreign_check("cron") && print &ui_table_row($text{'lusers_from'}, &ui_textbox("from", $config{"gemail_from_$f"} || - 'webmin@'.&get_system_hostname(), 20)); + 'webmin@'.&get_system_hostname(), 30)); + + print &ui_table_row($text{'lusers_cc'}, + &ui_opt_textbox("cc", $config{"gemail_cc_$f"}, 30, + $text{'lusers_nocc'}), 3); print &ui_table_end(); print &ui_form_end([ [ 'save', $text{'lusers_apply'} ] ]); diff --git a/quota/save_gemail.cgi b/quota/save_gemail.cgi index d6e8dcc39..49ea985a0 100755 --- a/quota/save_gemail.cgi +++ b/quota/save_gemail.cgi @@ -14,6 +14,7 @@ if ($in{'email'}) { $in{'from'} =~ /^\S+$/i || &error($text{'email_efrom'}); $in{'tomode'} != 1 || $in{'to'} =~ /^\S+$/ || &error($text{'email_eto'}); + $in{'cc_def'} || $in{'cc'} =~ /^\S+$/i || &error($text{'email_ecc'}); } # Save settings @@ -25,6 +26,7 @@ $config{"gemail_percent_".$in{'filesys'}} = $in{'percent'}; $config{"gemail_from_".$in{'filesys'}} = $in{'from'}; $config{"gemail_to_".$in{'filesys'}} = $in{'to'}; $config{"gemail_tomode_".$in{'filesys'}} = $in{'tomode'}; +$config{"gemail_cc_".$in{'filesys'}} = $in{'cc'}; &save_module_config(); &unlock_file($module_config_file);