smeserver-roundcube/root/etc/e-smith/db/configuration/migrate/80roundcube_Plugins_Migration

41 lines
1.4 KiB
Plaintext
Raw Permalink Normal View History

{
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') || '';
# force add plugin we use
for my $plug (qw(nextcloud_attachments html5_notifier fail2ban message_highlight thunderbird_labels) )
{
next unless ($plugins !~ "$plug");
$plugins = $plugins. (($plugins eq "")? "":",") . $plug;
$cdb->set_prop('roundcube','PluginsList',"$plugins");
}
# list of outdated, depreacted or dangerous 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");
}
#remove tasklist
if ($plugins =~ 'tasklist')
{
$plugins =~ s/,tasklist//g;
$cdb->set_prop('roundcube','PluginsList',"$plugins");
}
}