Compare commits
8 Commits
1_6-4_el8_
...
master
Author | SHA1 | Date | |
---|---|---|---|
17f861165f | |||
1232b55c13 | |||
db97b6834f | |||
c53da784a1 | |||
e953fc8ab6 | |||
98223108e9 | |||
00f46e1e5a | |||
b6255d91c3 |
@ -1 +0,0 @@
|
||||
sme10
|
14
createlinks
14
createlinks
@ -49,22 +49,14 @@ for my $event (qw(
|
||||
smeserver-roundcube-update
|
||||
conf-roundcube
|
||||
roundcube-update
|
||||
post-install
|
||||
post-upgrade
|
||||
))
|
||||
{
|
||||
templates2events("/etc/opt/remi/php81/php-fpm.d/www.conf",$event);
|
||||
templates2events("/etc/httpd/conf/httpd.conf", $event);
|
||||
templates2events("/etc/dovecot/dovecot.conf", $event);
|
||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/php81-php-fpm");
|
||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/mysql.init");
|
||||
safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
|
||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/dovecot");
|
||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/qmail");
|
||||
}
|
||||
|
||||
|
||||
#We want to expand /etc/e-smith/templates-user/.qmail
|
||||
foreach my $event (qw(
|
||||
smeserver-roundcube-update
|
||||
conf-roundcube
|
||||
@ -73,8 +65,12 @@ foreach my $event (qw(
|
||||
post-upgrade
|
||||
))
|
||||
{
|
||||
|
||||
templates2events("/etc/opt/remi/php81/php-fpm.d/www.conf",$event);
|
||||
templates2events("/etc/httpd/conf/httpd.conf", $event);
|
||||
templates2events("/etc/dovecot/dovecot.conf", $event);
|
||||
event_link("qmail-update-user", $event, "20");
|
||||
event_link("roundcube-conf", $event, "03");
|
||||
event_link("roundcube-conf", $event, "05");
|
||||
}
|
||||
safe_symlink("/usr/share/php/Net/LDAP3","root/usr/share/pear/Net/LDAP3");
|
||||
safe_symlink("/usr/share/php/Net/LDAP3.php","root/usr/share/pear/Net/LDAP3.php");
|
||||
|
@ -1 +1 @@
|
||||
roundcubemail:any:/sbin/e-smith/signal-event smeserver-roundcube
|
||||
roundcubemail:any:/sbin/e-smith/signal-event smeserver-roundcube-update
|
||||
|
@ -8,13 +8,23 @@
|
||||
$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() )));
|
||||
$rec->set_prop('DbPassword', sprintf("%15.0f", int( (1000000000000000) * rand() ))) unless $pw;
|
||||
|
||||
my $pwd = $rec->prop('des_key');
|
||||
unless ($pwd) {
|
||||
open( RANDOM, "/dev/urandom" );
|
||||
my $buf;
|
||||
read( RANDOM, $buf, 17);
|
||||
$pwd = encode_base64($buf);
|
||||
chomp $pwd;
|
||||
close RANDOM;
|
||||
$rec->set_prop('des_key', $pwd);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
/usr/bin/sed -i -e 's/^.*error_reporting.*$/ \/\/rem/' /usr/share/roundcubemail/program/lib/Roundcube/bootstrap.php
|
||||
# update composer
|
||||
|
||||
# if installed before user apache becoem an alias of www 102
|
||||
# if installed before user apache becom an alias of www 102
|
||||
/bin/rpm --setugids roundcubemail
|
||||
/bin/rpm --setperms roundcubemail
|
||||
|
||||
|
@ -3,23 +3,20 @@
|
||||
my $user = $roundcube{DbUser} || 'roundcube';
|
||||
my $pass = $roundcube{DbPassword} || 'changeme';
|
||||
$OUT .= <<END
|
||||
#! /bin/sh
|
||||
if [ -d /var/lib/mysql/$db ]; then
|
||||
#if you need to add plugins:
|
||||
# /usr/bin/mysql $db < /usr/share/roundcubemail/plugins/calendar/drivers/database/SQL/mysql.initial.sql
|
||||
# /usr/bin/mysql $db < /usr/share/roundcubemail/plugins/calendar/drivers/kolab/SQL/mysql.initial.sql
|
||||
# /usr/bin/mysql $db < /usr/share/roundcubemail/plugins/tasklist/drivers/database/SQL/mysql.initial.sql
|
||||
exit
|
||||
fi
|
||||
/usr/bin/mysql <<EOF
|
||||
CREATE DATABASE $db DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||
use $db;
|
||||
source /usr/share/roundcubemail/SQL/mysql.initial.sql;
|
||||
#!/bin/sh
|
||||
|
||||
/usr/bin/mariadb <<EOF
|
||||
CREATE DATABASE IF NOT EXISTS $db DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||
use mysql;
|
||||
GRANT ALL PRIVILEGES ON $db.* TO $user\@localhost
|
||||
IDENTIFIED BY '$pass';
|
||||
flush privileges;
|
||||
EOF
|
||||
|
||||
if [ ! -f /var/lib/mysql/$db/users.ibd ] ; then
|
||||
cat /usr/share/roundcubemail/SQL/mysql.initial.sql | /usr/bin/mariadb $db
|
||||
fi
|
||||
|
||||
exit 0
|
||||
END
|
||||
}
|
||||
|
@ -23,6 +23,12 @@
|
||||
} else {
|
||||
$OUT .= " Alias /$place $dirs{$place}\n";
|
||||
}
|
||||
|
||||
$OUT .= " <Location '/$place'>\n";
|
||||
# strict CSP not yet supported see https://github.com/roundcube/roundcubemail/issues/6202 and few others
|
||||
$OUT .= " Header set Content-Security-Policy \"default-src 'none'; script-src 'self' 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self'; frame-src 'self'; connect-src 'self'; frame-ancestors 'self'; base-uri 'self'; form-action 'self';\"\n";
|
||||
$OUT .= " </Location>\n";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -113,14 +113,7 @@ $config['x_frame_options'] = 'sameorigin';
|
||||
// in the session record (and the client cookie if remember password is enabled).
|
||||
// please provide a string of exactly 24 chars.
|
||||
{
|
||||
use MIME::Base64 qw(encode_base64);
|
||||
open( RANDOM, "/dev/urandom" );
|
||||
my $buf;
|
||||
read( RANDOM, $buf, 17);
|
||||
my $pwd = encode_base64($buf);
|
||||
chomp $pwd;
|
||||
close RANDOM;
|
||||
$OUT .= "\$config['des_key'] = \'$pwd\' ;\n";
|
||||
$OUT .= "\$config['des_key'] = \'".$roundcube{'des_key'}."\' ;\n";
|
||||
}
|
||||
|
||||
// Automatically add this domain to user names for login
|
||||
|
@ -1,8 +1,8 @@
|
||||
%define name smeserver-roundcube
|
||||
%define version 1.6
|
||||
%define release 4
|
||||
%define release 10
|
||||
|
||||
Summary: smserver rpm to setup roundcube, an IMAP mail client
|
||||
Summary: smeserver rpm to setup roundcube, an IMAP mail client
|
||||
Name: %{name}
|
||||
Version: %{version}
|
||||
Release: %{release}%{?dist}
|
||||
@ -85,6 +85,22 @@ fi
|
||||
%attr(755,root,root) /usr/bin/rcplugin_update.sh
|
||||
|
||||
%changelog
|
||||
* Thu Apr 10 2025 Jean-Philippe Pialasse <jpp@koozali.org> 1.6-10.sme
|
||||
- fix login to roundcube after restore [SME: 12981]
|
||||
|
||||
* Sun Mar 30 2025 Jean-Philippe Pialasse <jpp@koozali.org> 1.6-8.sme
|
||||
- remove service handling from post-upgrade event [SME: 12977]
|
||||
|
||||
* Mon Feb 17 2025 Jean-Philippe Pialasse <jpp@koozali.org> 1.6-7.sme
|
||||
- fix roundcube not accessible after install [SME: 12928]
|
||||
- avoid need to relog in case of reloading of configuration [SME: 12929]
|
||||
|
||||
* Wed Feb 12 2025 Jean-Philippe Pialasse <jpp@koozali.org> 1.6-6.sme
|
||||
- fix typo in roundcubemail.action [SME: 12917]
|
||||
|
||||
* Fri Jan 03 2025 Jean-Philippe Pialasse <jpp@koozali.org> 1.6-5.sme
|
||||
- set more relaxed CSP for roundcube [SME: 12861]
|
||||
|
||||
* Sat Dec 14 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.6-4.sme
|
||||
- fix roundcube not working on initial install [SME: 12812]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user