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

Annotation 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 - (hide 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 wellsi 1.2 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 burnat 1.1 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 wellsi 1.2 +++ 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 burnat 1.1 <trans>Allow HTTPS (secure)</trans>
25     </entry>
26 wellsi 1.2 + <entry>
27 burnat 1.1 + <base>ONLY_LOCAL_NETWORK_SSL</base>
28     + <trans>Allow HTTPS (secure) from local networks</trans>
29     + </entry>
30 wellsi 1.2 <entry>
31 burnat 1.1 <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 wellsi 1.2 +++ 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 burnat 1.1 $db->set_prop('imp',"status", 'enabled' );
48     $db->set_prop('horde',"status", 'enabled' );
49     $db->set_prop('imp',"access", "SSL" );
50 wellsi 1.2 - $db->set_prop('horde',"access", "SSL" );
51     + $db->set_prop('horde',"access", "public" );
52     + $db->set_prop('horde',"HttpsOnly", "yes" );
53 burnat 1.1 }
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 wellsi 1.2 + $db->set_prop('horde',"access", "private" );
62     + $db->set_prop('horde',"HttpsOnly", "yes" );
63 burnat 1.1 + }
64 wellsi 1.2 +
65 burnat 1.1 else {
66     $db->set_prop('imp',"status", 'disabled' );
67     $db->set_prop('horde',"status", 'disabled' );
68 wellsi 1.2 @@ -544,7 +557,7 @@
69 burnat 1.1
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 wellsi 1.2 @@ -565,15 +578,27 @@
78 burnat 1.1
79     my $PHPStatus = $db->get_prop('php', 'status') || 'disabled';
80    
81 wellsi 1.2 + my $Networkaccess = $db->get_prop('horde','access') || 'disabled';
82 burnat 1.1 +
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 wellsi 1.2 + && ( $Networkaccess eq "public"))
90 burnat 1.1 {
91     $WebmailStatus = ( $SSLonly eq "SSL" ) ? "enabledSSL" : "enabled";
92     }
93 wellsi 1.2
94     + elsif ( ( $IMPStatus eq "enabled" )
95 burnat 1.1 + && ( $HordeStatus eq "enabled" )
96     + && ( $MysqlStatus eq "enabled" )
97     + && ( $PHPStatus eq "enabled" )
98 wellsi 1.2 + && ( $Networkaccess eq "private" ))
99 burnat 1.1 + {
100     + $WebmailStatus = ( $SSLonly eq "SSL" ) ? "localnetworkSSL" : "enabled";
101     + }
102 wellsi 1.2 +
103 burnat 1.1 my $options = get_webmail_options();
104    
105 wellsi 1.2 return $localise ? $fm->localise($options->{$WebmailStatus})
106     @@ -737,7 +762,8 @@
107 burnat 1.1 sub get_webmail_options
108     {
109     my %options = ( disabled => 'DISABLED',
110     - enabledSSL => 'ENABLED_SECURE_ONLY' );
111 wellsi 1.2 + enabledSSL => 'ENABLED_SECURE_ONLY',
112     + localnetworkSSL => 'ONLY_LOCAL_NETWORK_SSL' );
113 burnat 1.1
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