1 |
brianr |
1.1 |
diff -Nur smeserver-mailsorting-1.4.old/root/etc/e-smith/events/actions/mailsorting-update-user smeserver-mailsorting-1.4/root/etc/e-smith/events/actions/mailsorting-update-user |
2 |
|
|
--- smeserver-mailsorting-1.4.old/root/etc/e-smith/events/actions/mailsorting-update-user 2014-12-02 01:32:45.000000000 -0500 |
3 |
|
|
+++ smeserver-mailsorting-1.4/root/etc/e-smith/events/actions/mailsorting-update-user 2017-07-04 13:49:59.584000000 -0400 |
4 |
|
|
@@ -41,7 +41,7 @@ |
5 |
|
|
"Account $userName is not a user account; update mailsorting failed.\n" |
6 |
|
|
unless ($user && $user->prop('type') eq "user" || $userName eq "admin"); |
7 |
|
|
@users = ($user); |
8 |
|
|
-my $geekmode = $user->prop('geekmode') || 'disabled'; |
9 |
|
|
+ my $geekmode = $user->prop('geekmode') || 'disabled'; |
10 |
|
|
if($geekmode eq "enabled"){ |
11 |
|
|
print "User $userName in geek mode, do not update mailfilter and procmail rules.\n"; |
12 |
|
|
exit; |
13 |
|
|
@@ -56,10 +56,16 @@ |
14 |
|
|
foreach my $userName (@users) |
15 |
|
|
{ |
16 |
|
|
$userName = $userName->key; |
17 |
|
|
+ my $geekmode = $accountsdb->get_prop ($userName,'geekmode') || 'disabled'; |
18 |
|
|
+ if ( $geekmode eq "enabled" ) |
19 |
|
|
+ { |
20 |
|
|
+ print "User $userName in geek mode, do not update mailfilter and procmail rules.\n"; |
21 |
|
|
+ next; |
22 |
|
|
+ } |
23 |
|
|
|
24 |
|
|
for my $dotfile ( qw(.procmailrc .mailfilter) ) |
25 |
|
|
{ |
26 |
|
|
-my $pathtohome = ($userName eq 'admin')? "/home/e-smith":"/home/e-smith/files/users/$userName"; |
27 |
|
|
+ my $pathtohome = ($userName eq 'admin')? "/home/e-smith":"/home/e-smith/files/users/$userName"; |
28 |
|
|
|
29 |
|
|
esmith::templates::processTemplate ( |
30 |
|
|
{ |