generated from smedev/Template-for-SMEServer-Core-Package
* Sun Sep 01 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.6-1.sme
- initial version for SME11 [SME: ]
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
{
|
||||
# If you set the server dns resolver to external
|
||||
# (for the main domain) you can not login in roundcube
|
||||
# with the imap authentication
|
||||
|
||||
use esmith::DomainsDB;
|
||||
my $d = esmith::DomainsDB->open_ro;
|
||||
my $domainname = $DB->get_value('DomainName') or
|
||||
die ("Unable to retrieve the domain name: $!");
|
||||
|
||||
my $dns = $d->get_prop("$domainname",'Nameservers') or
|
||||
die ("Unable to retrieve the Name Servers: $!");
|
||||
|
||||
if ($dns ne 'localhost') {
|
||||
$DB->set_prop('imaps','access','public');
|
||||
}
|
||||
}
|
20
root/etc/e-smith/db/configuration/migrate/80roundcube
Normal file
20
root/etc/e-smith/db/configuration/migrate/80roundcube
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
use MIME::Base64 qw(encode_base64);
|
||||
|
||||
my $rec = $DB->get('roundcube') || $DB->new_record('roundcube', {type => 'service'});
|
||||
|
||||
# migrate PublicAccess to access
|
||||
if ( my $PublicAccess = $DB->get_prop_and_delete('roundcube','PublicAccess') ) {
|
||||
$DB->set_prop('roundcube','access', "private");
|
||||
$DB->set_prop('roundcube','access', "public") if ($PublicAccess =~ /global/);
|
||||
$DB->set_prop('roundcube','status', "disabled") if ($PublicAccess == "none");
|
||||
}
|
||||
|
||||
|
||||
|
||||
my $pw = $rec->prop('DbPassword');
|
||||
return "" if $pw;
|
||||
|
||||
$rec->set_prop('DbPassword', sprintf("%15.0f", int( (1000000000000000) * rand() )));
|
||||
|
||||
}
|
@@ -0,0 +1,57 @@
|
||||
{
|
||||
use esmith::ConfigDB;
|
||||
my $cdb = esmith::ConfigDB->open() || die "Couldn't open ConfigDB\n";
|
||||
##Added for version smeserver-roundcube-1.1-4
|
||||
my $plugins = $cdb->get_prop('roundcube','PluginsList') || '';
|
||||
|
||||
return unless ($plugins ne '');
|
||||
|
||||
#nextcloud_attachements is used
|
||||
if ($plugins !~ 'nextcloud_attachments')
|
||||
{
|
||||
$plugins = $plugins.',nextcloud_attachments';
|
||||
$cdb->set_prop('roundcube','PluginsList',"$plugins");
|
||||
}
|
||||
#sieverule is now used instead of
|
||||
if ($plugins !~ 'managesieve')
|
||||
{
|
||||
$plugins = $plugins.',managesieve';
|
||||
$cdb->set_prop('roundcube','PluginsList',"$plugins");
|
||||
}
|
||||
# sieverule deprecated
|
||||
if ($plugins =~ 'sieverule')
|
||||
{
|
||||
$plugins =~ s/,sieverule//g;
|
||||
$cdb->set_prop('roundcube','PluginsList',"$plugins");
|
||||
}
|
||||
# markasjunk2 deprecated
|
||||
if ($plugins =~ 'markasjunk')
|
||||
{
|
||||
$plugins =~ s/markasjunk2/markasjunk/g;
|
||||
$cdb->set_prop('roundcube','PluginsList',"$plugins");
|
||||
}
|
||||
#Carddav is a really bad plugin, when available it will become usefull
|
||||
if ($plugins =~ 'carddav')
|
||||
{
|
||||
$plugins =~ s/,carddav//g;
|
||||
$cdb->set_prop('roundcube','PluginsList',"$plugins");
|
||||
}
|
||||
#remove calendar
|
||||
if ($plugins =~ 'calendar')
|
||||
{
|
||||
$plugins =~ s/,calendar//g;
|
||||
$cdb->set_prop('roundcube','PluginsList',"$plugins");
|
||||
}
|
||||
#remove libcalendaring
|
||||
if ($plugins =~ 'libcalendaring')
|
||||
{
|
||||
$plugins =~ s/,libcalendaring//g;
|
||||
$cdb->set_prop('roundcube','PluginsList',"$plugins");
|
||||
}
|
||||
#remove tasklist
|
||||
if ($plugins =~ 'tasklist')
|
||||
{
|
||||
$plugins =~ s/,tasklist//g;
|
||||
$cdb->set_prop('roundcube','PluginsList',"$plugins");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user