/[smecontribs]/rpms/smeserver-email-management/contribs10/smeserver-email-management-1.3.bz9737.handleAdmin.patch
ViewVC logotype

Annotation of /rpms/smeserver-email-management/contribs10/smeserver-email-management-1.3.bz9737.handleAdmin.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Wed Jun 10 08:56:02 2020 UTC (3 years, 11 months ago) by brianr
Branch: MAIN
CVS Tags: smeserver-email-management-1_3-5_el7_sme, smeserver-email-management-1_3-4_el7_sme, HEAD
Initial import

1 brianr 1.1 --- smeserver-email-management-1.3/root/etc/e-smith/web/functions/user-email.ori 2016-08-08 08:42:00.000000000 -0400
2     +++ smeserver-email-management-1.3/root/etc/e-smith/web/functions/user-email 2017-05-29 13:58:53.753846928 -0400
3     @@ -269,7 +269,7 @@
4     if (db_get_type(\%accounts, $_) eq "pseudonym");
5     }
6    
7     - my $numAccts = @userAccounts;
8     + my $numAccts = @userAccounts +1;
9     if ($numAccts == 0)
10     {
11     print $q->h4 ('There are no user accounts in the system.');
12     @@ -310,6 +310,7 @@
13     my $fname = db_get_prop(\%accounts, $acct, "FirstName");
14     my $lname = db_get_prop(\%accounts, $acct, "LastName");
15     my $fullname = "$fname $lname";
16     + my $userpath = ($acct eq 'admin')? "": "files/users/$acct";
17    
18     #clean display
19     if ($EmailForward eq 'local')
20     @@ -363,11 +364,11 @@
21     $tmda = db_get_prop(\%accounts, $acct, "tmda") || '';
22     if ($tmda eq "on")
23     {
24     - if (-e "/home/e-smith/files/users/$acct/.tmda/config")
25     + if (-e "/home/e-smith/$userpath/.tmda/config")
26     {
27     $tmda = 'tmda';
28     }
29     - elsif (-e "/home/e-smith/files/users/$acct/TMDA_restore.tgz")
30     + elsif (-e "/home/e-smith/$userpath/TMDA_restore.tgz")
31     {
32     $tmda = 'tmda!';
33     }
34     @@ -378,7 +379,7 @@
35     }
36     else
37     {
38     - if (-e "/home/e-smith/files/users/$acct/.tmda/config")
39     + if (-e "/home/e-smith/$userpath/.tmda/config")
40     {
41     $tmda = 'tmda*';
42     }
43     @@ -386,7 +387,7 @@
44     }
45     else
46     {
47     - if (-e "/home/e-smith/files/users/$acct/.tmda/config")
48     + if (-e "/home/e-smith/$userpath/.tmda/config")
49     {
50     $tmda = 'tmda*';
51     }
52     @@ -1131,9 +1132,10 @@
53     $acct = $acctName;
54     }
55    
56     - if (db_get_type(\%accounts, $acct) eq "user")
57     + if (db_get_type(\%accounts, $acct) eq "user" || $acct eq "admin")
58     {
59     my $name = db_get_prop(\%accounts, $acct, 'FirstName') . ' ' . db_get_prop(\%accounts, $acct, 'LastName');
60     + my $userpath = ($acct eq 'admin')? "": "files/users/$acct";
61    
62     print $q->p ('Email delivery for the user account "'
63     . $acct
64     @@ -1198,7 +1200,7 @@
65     db_get_prop(\%accounts, $acct, "tmda") : '';
66    
67     my $status = '';
68     - unless (-e "/home/e-smith/files/users/$acct/.tmda/config")
69     + unless (-e "/home/e-smith/$userpath/.tmda/config")
70     {
71     $status = 'NOT';
72     }
73     @@ -1407,10 +1409,10 @@
74     " \"\$SUBJECT\"\n\n".
75     "will be read when I return.\n\n";
76    
77     - if ( -e "/home/e-smith/files/users/$acct/.vacation.msg" )
78     + if ( -e "/home/e-smith/$userpath/.vacation.msg" )
79     {
80     - open (VACATION, "</home/e-smith/files/users/$acct/.vacation.msg")
81     - or die "Error: Could not open file: /home/e-smith/files/users/$acct/.vacation.msg\n";
82     + open (VACATION, "</home/e-smith/$userpath/.vacation.msg")
83     + or die "Error: Could not open file: /home/e-smith/$userpath/.vacation.msg\n";
84     my @vacationTemp = <VACATION>;
85     $vacationText = join ("", @vacationTemp);
86    
87     @@ -1602,6 +1604,8 @@
88     $acct = $1;
89     }
90    
91     + my $userpath = ($acct eq 'admin')? "": "files/users/$acct";
92     +
93     if ($Visible eq 'internal')
94     { db_set_prop(\%accounts, $acct, 'Visible', $Visible); }
95     else
96     @@ -1655,7 +1659,7 @@
97     return;
98     }
99    
100     - open (VACATION, ">/home/e-smith/files/users/$acct/.vacation.msg")
101     + open (VACATION, ">/home/e-smith/$userpath/.vacation.msg")
102     or die ("Error opening vacation message file '/home/e-smith/files/$acct/.vacation.msg': $!\n");
103    
104     print VACATION "$vacationText";
105     @@ -1803,14 +1807,16 @@
106     $acct = $1;
107     }
108    
109     - if (-f "/home/e-smith/files/users/$acct/$file")
110     + my $userpath = ($acct eq 'admin')? "": "files/users/$acct";
111     +
112     + if (-f "/home/e-smith/$userpath/$file")
113     {
114     - system("/bin/rm -f /home/e-smith/files/users/$acct/procmail.log");
115     + system("/bin/rm -f /home/e-smith/$userpath/procmail.log");
116     }
117    
118     - if (-f "/home/e-smith/files/users/$acct/$file")
119     + if (-f "/home/e-smith/$userpath/$file")
120     {
121     - system("/bin/rm -f /home/e-smith/files/users/$acct/mailfilter.log");
122     + system("/bin/rm -f /home/e-smith/$userpath/mailfilter.log");
123     }
124    
125     showEnableProc ($q, "Deleted log file.", $acct);
126     @@ -1831,9 +1837,11 @@
127    
128     print $q->table ({border => 0, cellspacing => 0, cellpadding => 4});
129    
130     - if ( -e "/home/e-smith/files/users/$acct/$file" )
131     + my $userpath = ($acct eq 'admin')? "": "files/users/$acct";
132     +
133     + if ( -e "/home/e-smith$userpath/$file" )
134     {
135     - open (INF,"/home/e-smith/files/users/$acct/$file")
136     + open (INF,"/home/e-smith/$userpath/$file")
137     or die ("can't open $file to read: $1. ");
138    
139     while (<INF>)

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed