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 |
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 |
--- 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-09 21:22:30.060593986 +0100 |
+++ 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 |
@@ -174,6 +174,10 @@ |
@@ -173,6 +173,10 @@ |
23 |
|
<base>ENABLED_SECURE_ONLY</base> |
24 |
<trans>Allow HTTPS (secure)</trans> |
<trans>Allow HTTPS (secure)</trans> |
25 |
</entry> |
</entry> |
26 |
<entry> |
+ <entry> |
27 |
+ <base>ONLY_LOCAL_NETWORK_SSL</base> |
+ <base>ONLY_LOCAL_NETWORK_SSL</base> |
28 |
+ <trans>Allow HTTPS (secure) from local networks</trans> |
+ <trans>Allow HTTPS (secure) from local networks</trans> |
29 |
+ </entry> |
+ </entry> |
30 |
+ <entry> |
<entry> |
31 |
<base>INSECURE_POP3</base> |
<base>INSECURE_POP3</base> |
32 |
<trans>Allow both POP3 and POP3S</trans> |
<trans>Allow both POP3 and POP3S</trans> |
|
</entry> |
|
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 |
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 |
--- 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-09 21:46:09.807126763 +0100 |
+++ 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 |
@@ -345,9 +345,20 @@ |
@@ -338,7 +338,8 @@ |
37 |
$db->set_prop('mysqld',"status", "enabled" ); |
$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' ); |
$db->set_prop('imp',"status", 'enabled' ); |
48 |
$db->set_prop('horde',"status", 'enabled' ); |
$db->set_prop('horde',"status", 'enabled' ); |
|
+ $db->set_prop('horde',"httpsaccess", 'public' ); |
|
49 |
$db->set_prop('imp',"access", "SSL" ); |
$db->set_prop('imp',"access", "SSL" ); |
50 |
$db->set_prop('horde',"access", "SSL" ); |
- $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" ) { |
+ elsif ( $webmail eq "localnetworkSSL" ) { |
57 |
+ $db->set_prop('mysqld',"status", "enabled" ); |
+ $db->set_prop('mysqld',"status", "enabled" ); |
58 |
+ $db->set_prop('imp',"status", 'enabled' ); |
+ $db->set_prop('imp',"status", 'enabled' ); |
59 |
+ $db->set_prop('horde',"status", 'enabled' ); |
+ $db->set_prop('horde',"status", 'enabled' ); |
|
+ $db->set_prop('horde',"httpsaccess", 'private' ); |
|
60 |
+ $db->set_prop('imp',"access", "SSL" ); |
+ $db->set_prop('imp',"access", "SSL" ); |
61 |
+ $db->set_prop('horde',"access", "SSL" ); |
+ $db->set_prop('horde',"access", "private" ); |
62 |
|
+ $db->set_prop('horde',"HttpsOnly", "yes" ); |
63 |
+ } |
+ } |
64 |
|
+ |
65 |
else { |
else { |
66 |
$db->set_prop('imp',"status", 'disabled' ); |
$db->set_prop('imp',"status", 'disabled' ); |
67 |
$db->set_prop('horde',"status", 'disabled' ); |
$db->set_prop('horde',"status", 'disabled' ); |
68 |
@@ -544,7 +555,7 @@ |
@@ -544,7 +557,7 @@ |
69 |
|
|
70 |
=head2 get_current_webmail_status |
=head2 get_current_webmail_status |
71 |
|
|
74 |
the various components of the webmail subsystem are currently enabled |
the various components of the webmail subsystem are currently enabled |
75 |
|
|
76 |
=cut |
=cut |
77 |
@@ -565,14 +576,25 @@ |
@@ -565,15 +578,27 @@ |
78 |
|
|
79 |
my $PHPStatus = $db->get_prop('php', 'status') || 'disabled'; |
my $PHPStatus = $db->get_prop('php', 'status') || 'disabled'; |
80 |
|
|
81 |
+ my $Networkaccess = $db->get_prop('horde','httpsaccess') || 'disabled'; |
+ my $Networkaccess = $db->get_prop('horde','access') || 'disabled'; |
82 |
+ |
+ |
83 |
# all four components must be on for webmail to be working |
# all four components must be on for webmail to be working |
84 |
if ( ( $IMPStatus eq "enabled" ) |
if ( ( $IMPStatus eq "enabled" ) |
86 |
&& ( $MysqlStatus eq "enabled" ) |
&& ( $MysqlStatus eq "enabled" ) |
87 |
- && ( $PHPStatus eq "enabled" ) ) |
- && ( $PHPStatus eq "enabled" ) ) |
88 |
+ && ( $PHPStatus eq "enabled" ) |
+ && ( $PHPStatus eq "enabled" ) |
89 |
+ && ( $Networkaccess eq "public" ) ) |
+ && ( $Networkaccess eq "public")) |
90 |
{ |
{ |
91 |
$WebmailStatus = ( $SSLonly eq "SSL" ) ? "enabledSSL" : "enabled"; |
$WebmailStatus = ( $SSLonly eq "SSL" ) ? "enabledSSL" : "enabled"; |
92 |
} |
} |
93 |
+ elsif ( ( $IMPStatus eq "enabled" ) |
|
94 |
|
+ elsif ( ( $IMPStatus eq "enabled" ) |
95 |
+ && ( $HordeStatus eq "enabled" ) |
+ && ( $HordeStatus eq "enabled" ) |
96 |
+ && ( $MysqlStatus eq "enabled" ) |
+ && ( $MysqlStatus eq "enabled" ) |
97 |
+ && ( $PHPStatus eq "enabled" ) |
+ && ( $PHPStatus eq "enabled" ) |
98 |
+ && ( $Networkaccess eq "private" ) ) |
+ && ( $Networkaccess eq "private" )) |
99 |
+ { |
+ { |
100 |
+ $WebmailStatus = ( $SSLonly eq "SSL" ) ? "localnetworkSSL" : "enabled"; |
+ $WebmailStatus = ( $SSLonly eq "SSL" ) ? "localnetworkSSL" : "enabled"; |
101 |
+ } |
+ } |
102 |
|
+ |
103 |
my $options = get_webmail_options(); |
my $options = get_webmail_options(); |
104 |
|
|
105 |
@@ -737,7 +759,8 @@ |
return $localise ? $fm->localise($options->{$WebmailStatus}) |
106 |
|
@@ -737,7 +762,8 @@ |
107 |
sub get_webmail_options |
sub get_webmail_options |
108 |
{ |
{ |
109 |
my %options = ( disabled => 'DISABLED', |
my %options = ( disabled => 'DISABLED', |
110 |
- enabledSSL => 'ENABLED_SECURE_ONLY' ); |
- enabledSSL => 'ENABLED_SECURE_ONLY' ); |
111 |
+ enabledSSL => 'ENABLED_SECURE_ONLY', |
+ enabledSSL => 'ENABLED_SECURE_ONLY', |
112 |
+ localnetworkSSL => 'ONLY_LOCAL_NETWORK_SSL' ); |
+ localnetworkSSL => 'ONLY_LOCAL_NETWORK_SSL' ); |
113 |
|
|
114 |
my $access = $db->get_prop('imp', 'access') || 'SSL'; |
my $access = $db->get_prop('imp', 'access') || 'SSL'; |
115 |
|
|