1 |
diff -Nur e-smith-email-5.4.0/root/etc/e-smith/db/configuration/migrate/35enableImap e-smith-email-5.4.0-enable_imap/root/etc/e-smith/db/configuration/migrate/35enableImap |
2 |
--- e-smith-email-5.4.0/root/etc/e-smith/db/configuration/migrate/35enableImap 1970-01-01 01:00:00.000000000 +0100 |
3 |
+++ e-smith-email-5.4.0-enable_imap/root/etc/e-smith/db/configuration/migrate/35enableImap 2013-06-23 21:25:56.356705376 +0200 |
4 |
@@ -0,0 +1,10 @@ |
5 |
+{ |
6 |
+ |
7 |
+my $imap = $DB->get('imap') || |
8 |
+ $DB->new_record('imap', {type => 'service'}); |
9 |
+my $status = $imap->prop('status') || 'disabled'; |
10 |
+return "" if ($status eq 'enabled'); |
11 |
+$imap->set_prop('status', 'enabled'); |
12 |
+$imap->set_prop('access', 'localhost'); |
13 |
+ |
14 |
+} |
15 |
diff -Nur e-smith-email-5.4.0/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/emailsettings.pm e-smith-email-5.4.0-enable_imap/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/emailsettings.pm |
16 |
--- e-smith-email-5.4.0/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/emailsettings.pm 2013-02-06 22:56:01.000000000 +0100 |
17 |
+++ e-smith-email-5.4.0-enable_imap/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/emailsettings.pm 2013-06-23 21:24:34.485440639 +0200 |
18 |
@@ -304,20 +304,23 @@ |
19 |
|
20 |
my $imapAccess = ($q->param('IMAPAccess') || 'private'); |
21 |
if ($imapAccess eq 'disabled') { |
22 |
- $db->set_prop('imap', "status", "disabled" ); |
23 |
+ $db->set_prop('imap', "status", "enabled" ); |
24 |
+ $db->set_prop('imap', "access", "localhost" ); |
25 |
$db->set_prop('imaps', "status", "disabled" ); |
26 |
- } else { |
27 |
+ } elsif ($imapAccess eq 'public') { |
28 |
$db->set_prop('imap', "status", "enabled" ); |
29 |
- $db->set_prop('imaps', "status", "enabled" ); |
30 |
- } |
31 |
- if ($imapAccess eq 'public') { |
32 |
$db->set_prop('imap', "access", "public" ); |
33 |
+ $db->set_prop('imaps', "status", "enabled" ); |
34 |
$db->set_prop('imaps', "access", "public" ); |
35 |
} elsif ($imapAccess eq 'publicSSL') { |
36 |
+ $db->set_prop('imap', "status", "enabled" ); |
37 |
$db->set_prop('imap', "access", "private" ); |
38 |
+ $db->set_prop('imaps', "status", "enabled" ); |
39 |
$db->set_prop('imaps', "access", "public" ); |
40 |
} else { |
41 |
+ $db->set_prop('imap', "status", "enabled" ); |
42 |
$db->set_prop('imap', "access", "private" ); |
43 |
+ $db->set_prop('imaps', "status", "enabled" ); |
44 |
$db->set_prop('imaps', "access", "private" ); |
45 |
} |
46 |
|
47 |
@@ -494,7 +497,7 @@ |
48 |
|
49 |
my $options = get_imap_options(); |
50 |
|
51 |
- if ($imapStatus ne 'enabled' && $imapsStatus ne 'enabled') |
52 |
+ if (($imapStatus ne 'enabled' || $imapAccess eq 'localhost') && $imapsStatus ne 'enabled') |
53 |
{ |
54 |
return $localise ? $fm->localise($options->{disabled}) : 'disabled'; |
55 |
} |