/[smeserver]/rpms/e-smith-email/sme9/e-smith-email-5.4.0-webmail-only-local-network.patch
ViewVC logotype

Contents of /rpms/e-smith-email/sme9/e-smith-email-5.4.0-webmail-only-local-network.patch

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


Revision 1.2 - (show annotations) (download)
Sat Dec 21 05:19:57 2013 UTC (10 years, 10 months ago) by wellsi
Branch: MAIN
CVS Tags: e-smith-email-5_4_0-11_el6_sme, e-smith-email-5_4_0-10_el6_sme, e-smith-email-5_4_0-12_el6_sme, e-smith-email-5_4_0-7_el6_sme, e-smith-email-5_4_0-9_el6_sme, e-smith-email-5_4_0-8_el6_sme, HEAD
Changes since 1.1: +53 -22 lines
* Fri Dec 20 2013 Ian Wells <esmith@wellsi.com> 5.4.0-7.sme
- Update of allow webmail-only-local-network by Stephane de Labrusse [SME: 7351]

1 diff -Nur e-smith-email-5.4.0-old/root/etc/e-smith/db/configuration/migrate/40change-variable-access-to-httpsonly e-smith-email-5.4.0/root/etc/e-smith/db/configuration/migrate/40change-variable-access-to-httpsonly
2 --- e-smith-email-5.4.0-old/root/etc/e-smith/db/configuration/migrate/40change-variable-access-to-httpsonly 1970-01-01 01:00:00.000000000 +0100
3 +++ e-smith-email-5.4.0/root/etc/e-smith/db/configuration/migrate/40change-variable-access-to-httpsonly 2013-12-13 16:59:23.534028606 +0100
4 @@ -0,0 +1,14 @@
5 +{
6 + my $hordessl = $DB->get_prop('horde', 'access') or return;
7 + if ($hordessl eq 'SSL')
8 + {
9 + $DB->set_prop('horde',"HttpsOnly", "yes" );
10 + $DB->set_prop('horde',"access", "public" );
11 + }
12 + elsif ($hordessl eq 'full')
13 + {
14 + $DB->set_prop('horde',"HttpsOnly", "no" );
15 + $DB->set_prop('horde',"access", "public" );
16 + }
17 +}
18 +
19 diff -Nur e-smith-email-5.4.0-old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/emailsettings e-smith-email-5.4.0/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/emailsettings
20 --- e-smith-email-5.4.0-old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/emailsettings 2013-11-26 19:01:14.391228451 +0100
21 +++ e-smith-email-5.4.0/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/emailsettings 2013-12-13 16:55:06.019972324 +0100
22 @@ -173,6 +173,10 @@
23 <base>ENABLED_SECURE_ONLY</base>
24 <trans>Allow HTTPS (secure)</trans>
25 </entry>
26 + <entry>
27 + <base>ONLY_LOCAL_NETWORK_SSL</base>
28 + <trans>Allow HTTPS (secure) from local networks</trans>
29 + </entry>
30 <entry>
31 <base>INSECURE_POP3</base>
32 <trans>Allow both POP3 and POP3S</trans>
33 diff -Nur e-smith-email-5.4.0-old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/emailsettings.pm e-smith-email-5.4.0/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/emailsettings.pm
34 --- e-smith-email-5.4.0-old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/emailsettings.pm 2013-11-26 19:01:14.406227386 +0100
35 +++ e-smith-email-5.4.0/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/emailsettings.pm 2013-12-13 16:55:06.020972231 +0100
36 @@ -338,7 +338,8 @@
37 $db->set_prop('imp',"status", $webmail );
38 $db->set_prop('horde', "status", $webmail );
39 $db->set_prop('imp',"access", "full" );
40 - $db->set_prop('horde',"access", "full" );
41 + $db->set_prop('horde',"access", "public" );
42 + $db->set_prop('horde',"HttpsOnly", "no" );
43 }
44 elsif ( $webmail eq "enabledSSL" ) {
45 $db->set_prop('php',"status", "enabled" );
46 @@ -346,8 +347,20 @@
47 $db->set_prop('imp',"status", 'enabled' );
48 $db->set_prop('horde',"status", 'enabled' );
49 $db->set_prop('imp',"access", "SSL" );
50 - $db->set_prop('horde',"access", "SSL" );
51 + $db->set_prop('horde',"access", "public" );
52 + $db->set_prop('horde',"HttpsOnly", "yes" );
53 }
54 +
55 + elsif ( $webmail eq "localnetworkSSL" ) {
56 + $db->set_prop('php',"status", "enabled" );
57 + $db->set_prop('mysqld',"status", "enabled" );
58 + $db->set_prop('imp',"status", 'enabled' );
59 + $db->set_prop('horde',"status", 'enabled' );
60 + $db->set_prop('imp',"access", "SSL" );
61 + $db->set_prop('horde',"access", "private" );
62 + $db->set_prop('horde',"HttpsOnly", "yes" );
63 + }
64 +
65 else {
66 $db->set_prop('imp',"status", 'disabled' );
67 $db->set_prop('horde',"status", 'disabled' );
68 @@ -544,7 +557,7 @@
69
70 =head2 get_current_webmail_status
71
72 -returns "disabled", "enabled" or "enabledSSL", depending on whether
73 +returns "disabled", "localnetworkSSL" or "enabledSSL", depending on whether
74 the various components of the webmail subsystem are currently enabled
75
76 =cut
77 @@ -565,15 +578,27 @@
78
79 my $PHPStatus = $db->get_prop('php', 'status') || 'disabled';
80
81 + my $Networkaccess = $db->get_prop('horde','access') || 'disabled';
82 +
83 # all four components must be on for webmail to be working
84 if ( ( $IMPStatus eq "enabled" )
85 && ( $HordeStatus eq "enabled" )
86 && ( $MysqlStatus eq "enabled" )
87 - && ( $PHPStatus eq "enabled" ) )
88 + && ( $PHPStatus eq "enabled" )
89 + && ( $Networkaccess eq "public"))
90 {
91 $WebmailStatus = ( $SSLonly eq "SSL" ) ? "enabledSSL" : "enabled";
92 }
93
94 + elsif ( ( $IMPStatus eq "enabled" )
95 + && ( $HordeStatus eq "enabled" )
96 + && ( $MysqlStatus eq "enabled" )
97 + && ( $PHPStatus eq "enabled" )
98 + && ( $Networkaccess eq "private" ))
99 + {
100 + $WebmailStatus = ( $SSLonly eq "SSL" ) ? "localnetworkSSL" : "enabled";
101 + }
102 +
103 my $options = get_webmail_options();
104
105 return $localise ? $fm->localise($options->{$WebmailStatus})
106 @@ -737,7 +762,8 @@
107 sub get_webmail_options
108 {
109 my %options = ( disabled => 'DISABLED',
110 - enabledSSL => 'ENABLED_SECURE_ONLY' );
111 + enabledSSL => 'ENABLED_SECURE_ONLY',
112 + localnetworkSSL => 'ONLY_LOCAL_NETWORK_SSL' );
113
114 my $access = $db->get_prop('imp', 'access') || 'SSL';
115

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