Compare commits

...

14 Commits

Author SHA1 Message Date
17f861165f * Thu Apr 10 2025 Jean-Philippe Pialasse <jpp@koozali.org> 1.6-10.sme
- fix login to roundcube after restore [SME: 12981]
2025-04-10 18:34:56 -04:00
1232b55c13 * Tue Apr 08 2025 Jean-Philippe Pialasse <jpp@koozali.org> 1.6-9.sme
- fix login to roundcube after restore [SME: 12981]
2025-04-08 23:21:55 -04:00
db97b6834f * Sun Mar 30 2025 Jean-Philippe Pialasse <jpp@koozali.org> 1.6-8.sme
- remove service handling from post-upgrade event [SME: 12977]
2025-03-30 23:20:31 -04:00
c53da784a1 * 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]
2025-02-17 00:53:59 -05:00
e953fc8ab6 * Mon Feb 17 2025 Jean-Philippe Pialasse <jpp@koozali.org> 1.6-7.sme
- fix roundcube not accessibel after install [SME: 12928]
2025-02-17 00:36:56 -05:00
98223108e9 cleanup 2025-02-17 00:23:11 -05:00
00f46e1e5a * Wed Feb 12 2025 Jean-Philippe Pialasse <jpp@koozali.org> 1.6-6.sme
- fix typo in roundcubemail.action [SME: 12917]
2025-02-12 23:34:49 -05:00
b6255d91c3 * Fri Jan 03 2025 Jean-Philippe Pialasse <jpp@koozali.org> 1.6-5.sme
- set more relaxed CSP for roundcube [SME: 12861]
2025-01-03 14:48:56 -05:00
7f03032404 * Sat Dec 14 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.6-4.sme
- fix roundcube not working on initial install [SME: 12812]
2024-12-14 18:09:44 -05:00
c9aaa2a7fb Add *.bak to .gitignore 2024-11-12 19:21:47 +00:00
29d628469d Update README with specific Bugzilla links with status options 2024-10-27 14:29:36 +00:00
7f716af359 Update readme bugzilla link to show all outstanding bugs 2024-10-27 12:13:21 +00:00
a6162a020c * Sun Sep 01 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.6-3.sme
- initial version for SME11 [SME: 12617]
- build and require rpm for plugins and skins
- improve directory handling, spellchecker
- fix httpd templates
2024-09-20 11:13:53 -04:00
dcda8fd6f2 * Sun Sep 01 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.6-2.sme
- initial version for SME11 [SME: 12617]
- build and require rpm for plugins and skins
2024-09-20 00:32:01 -04:00
15 changed files with 129 additions and 56 deletions

3
.gitignore vendored
View File

@ -1,3 +1,4 @@
*.rpm
*.log
*spec-20*
*spec-20**.bak
*gz

View File

@ -6,7 +6,14 @@ SMEServer Koozali developed git repo for smeserver-roundcube core
<br />https://wiki.koozali.org/smeserver-roundcube
## Bugzilla
Show list of outstanding bugs: [here](https://bugs.koozali.org/buglist.cgi?component=smeserver-roundcube&product=SME%20Server%2011.X&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED)
Show list of outstanding bugs:
[All](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=NEEDINFO&bug_status=IN_PROGRESS&bug_status=RESOLVED&bug_status=VERIFIED&cf_package=smeserver-roundcube&classification=SME+Server&list_id=105756&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&query_format=advanced)
[Confirmed](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=CONFIRMED&cf_package=smeserver-roundcube&classification=SME+Server&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&query_format=advanced)
[Unconfirmed](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=UNCONFIRMED&cf_package=smeserver-roundcube&classification=SME+Server&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&query_format=advanced)
[Need info](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=NEEDINFO&cf_package=smeserver-roundcube&classification=SME+Server&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&query_format=advanced)
[In progress](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=IN_PROGRESS&cf_package=smeserver-roundcube&classification=SME+Server&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&query_format=advanced)
[Resolved](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=RESOLVED&cf_package=smeserver-roundcube&classification=SME+Server&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&query_format=advanced)
[Verified](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=VERIFIED&cf_package=smeserver-roundcube&classification=SME+Server&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&query_format=advanced)
## Description

View File

@ -1 +0,0 @@
sme10

View File

@ -33,6 +33,8 @@ for my $event (qw(
conf-roundcube
roundcube-update
console-save
post-install
post-upgrade
))
{
templates2events("/usr/share/roundcubemail/plugins/managesieve/config.inc.php", $event);
@ -49,26 +51,26 @@ for my $event (qw(
roundcube-update
))
{
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
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);
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");

View File

@ -0,0 +1 @@
roundcubemail:any:/sbin/e-smith/signal-event smeserver-roundcube-update

View File

@ -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);
}
}

View File

@ -2,4 +2,17 @@
# prevents setting error_reporting in 1.6; removed in newer versions
/usr/bin/sed -i -e 's/^.*error_reporting.*$/ \/\/rem/' /usr/share/roundcubemail/program/lib/Roundcube/bootstrap.php
# update composer
/usr/bin/rcplugin_update.sh
# if installed before user apache becom an alias of www 102
/bin/rpm --setugids roundcubemail
/bin/rpm --setperms roundcubemail
# disabled by default for SME11 as we would rather the stability of rpms
#/usr/bin/rcplugin_update.sh
# prevent bug with spell checker: An error was encountered on the server. Please try again later.
pushd /usr/share/myspell >/dev/null
[ -f en.dic ] || ln -s en_US.dic en.dic
[ -f en.aff ] || ln -s en_US.aff en.aff
popd >/dev/null

View File

@ -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
}

View File

@ -3,8 +3,11 @@
my $webmailStatus = $roundcube{'status'} || "disabled";
my $dirs;
$dirs{horde} = '/usr/share/roundcubemail';
$dirs{webmail} = "$dirs{roundcubemail}";
$dirs{roundcube} = '/usr/share/roundcubemail';
$dirs{roundcubemail} = "$dirs{roundcube}";
$dirs{horde} = "$dirs{roundcube}";
$dirs{webmail} = "$dirs{roundcube}";
my @places=('webmail','horde','roundcubemail','roundcube');
push(@places,$roundcube{'URL'}) if ((exists $roundcube{'URL'}) && ($roundcube{'URL'} ne ''));
@ -20,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";
}
}

View File

@ -10,7 +10,7 @@ if ($PHP_VERSION eq $phpversion){
my $open_basedir= $roundcube{PHPBaseDir} || '';
my $include_path = ".:/usr/share/pear-addons:/usr/share/pear:/usr/share/pear-data/:/usr/share/php".
":/opt/remi/php81/root/usr/share/pear:/opt/remi/php81/root/usr/share/php".
":/opt/remi/php81/root/usr/share/pear-data/:/opt/remi/php82/root/usr/share/pear-data/: /opt/remi/php83/root/usr/share/pear-data/";
":/opt/remi/php81/root/usr/share/pear-data/:/opt/remi/php82/root/usr/share/pear-data/:/opt/remi/php83/root/usr/share/pear-data/";
$open_basedir = "/usr/share/roundcubemail:/etc/roundcubemail/:/var/log/roundcubemail:/var/lib/roundcubemail:/var/log/roundcube.log:/var/lib/php/roundcube:/home/e-smith/files/roundcube:/dev/urandom:/proc/meminfo:/usr/share/GeoIP/GeoLite2-Country.mmdb:/proc/cpuinfo:$open_basedir:$include_path";
my $id = 'roundcube';
my $max_children = $roundcube{'PHPmaxChildren'} || 20;

View File

@ -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

View File

@ -1,6 +1,23 @@
// ----------------------------------
// USER INTERFACE
// ----------------------------------
{
# configuring default folders
# using same default as was with Horde
# note: archive, template not available here
$drafts_mbox=$imap{'draft'}||'Drafts';
$junk_mbox=$imap{'junkmail'}||'junkmail';
$sent_mbox=$imap{'sent'}||'Sent';
$trash_mbox=$imap{'trash'}||'Trash';
$default_folders=$roundcube{'default_folders'}||'';
$default_folder =~ tr/'//d;
my @def_fold=split(',',$default_folders);
push(@def_fold,('INBOX',$drafts_mbox,$junk_mbox,$sent_mbox,$trash_mbox));
use List::MoreUtils qw(uniq);
@def_fold= uniq @def_fold;
$default_folders=join',' , map "'$_'" , @def_fold;
$OUT="";
}
// default messages sort column. Use empty value for default server's sorting,
// or 'arrival', 'date', 'subject', 'from', 'to', 'fromto', 'size', 'cc'
@ -39,29 +56,29 @@ $config['date_long'] = 'Y-m-d H:i';
// store draft message is this mailbox
// leave blank if draft messages should not be stored
// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
$config['drafts_mbox'] = 'Drafts';
$config['drafts_mbox'] = '{$drafts_mbox}';
// store spam messages in this mailbox
// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
$config['junk_mbox'] = 'junkmail';
$config['junk_mbox'] = '{$junk_mbox}';
// store sent message is this mailbox
// leave blank if sent messages should not be stored
// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
$config['sent_mbox'] = 'sent-mail';
$config['sent_mbox'] = '{$sent_mbox}';
// move messages to this folder when deleting them
// leave blank if they should be deleted directly
// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
$config['trash_mbox'] = 'Trash';
$config['trash_mbox'] = '{$trash_mbox}';
// display these folders separately in the mailbox list.
// these folders will also be displayed with localized names
// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
$config['default_folders'] = array('INBOX', 'Drafts', 'sent-mail', 'junkmail', 'Trash');
$config['default_folders'] = array({$default_folders});
// Disable localization of the default folder names listed above
$config['show_real_foldernames'] = false;
$config['show_real_foldernames'] = { $roundcube{'show_real_foldernames'} || 'false'; };
// automatically create the above listed default folders on first login
$config['create_default_folders'] = true;
@ -79,7 +96,7 @@ $config['enable_spellcheck'] = true;
// Enables spellchecker exceptions dictionary.
// Setting it to 'shared' will make the dictionary shared by all users.
$config['spellcheck_dictionary'] = false;
$config['spellcheck_dictionary'] = true;
// Set the spell checking engine. Possible values:
// - 'googie' - the default
@ -88,7 +105,7 @@ $config['spellcheck_dictionary'] = false;
// - 'atd' - install your own After the Deadline server or check with the people at http://www.afterthedeadline.com before using their API
// Since Google shut down their public spell checking service, you need to
// connect to a Nox Spell Server when using 'googie' here. Therefore specify the 'spellcheck_uri'
$config['spellcheck_engine'] = 'googie';
$config['spellcheck_engine'] = 'enchant';
// For locally installed Nox Spell Server or After the Deadline services,
// please specify the URI to call it.

View File

@ -14,7 +14,7 @@ $config['address_book_type'] = 'sql';
// In order to enable public ldap search, configure an array like the Verisign
// example further below. if you would like to test, simply uncomment the example.
// Array key must contain only safe characters, ie. a-zA-Z0-9_
$config['ldap_public']['Local_LDAP'] = array('hosts' => array('localhost:389'),
$config['ldap_public']['Local_LDAP'] = array('hosts' => array('localhost:389'),
{
$OUT .= " 'base_dn' \=\> " ."'". esmith::util::ldapBase($DomainName)."',";
@ -39,7 +39,7 @@ $config['address_book_type'] = 'sql';
// An ordered array of the ids of the addressbooks that should be searched
// when populating address autocomplete fields server-side. ex: array('sql','Verisign');
{
$OUT .= "\$config['autocomplete_addressbooks'] = array('sql','Local_LDAP');";
$OUT .= "\$config['autocomplete_addressbooks'] = array('sql','Local_LDAP');\n";
$OUT .= "\$config['globaladdressbook_autocomplete'] = true;";
}

View File

@ -83,7 +83,7 @@ $config['mime_param_folding'] = 1;
// Set true if deleted messages should not be displayed
// This will make the application run slower
$config['skip_deleted'] = false;
$config['skip_deleted'] = true;
// Set true to Mark deleted messages as read as well as deleted
// False means that a message's read status is not affected by marking it as deleted
@ -189,7 +189,7 @@ $config['default_font'] = 'Verdana';
$config['default_font_size'] = '10pt';
// Enables display of email address with name instead of a name (and address in title)
$config['message_show_email'] = false;
$config['message_show_email'] = true;
// Default behavior of Reply-All button:
// 0 - Reply-All always

View File

@ -1,8 +1,8 @@
%define name smeserver-roundcube
%define version 1.6
%define release 1
%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}
@ -16,6 +16,7 @@ BuildArchitectures: noarch
BuildRequires: smeserver-devtools
Requires: smeserver-release >= 11.0
Requires: smeserver-apache >= 11.0
Requires: smeserver-php
Requires: roundcubemail >= 1.6
Requires: roundcubemail < 1.7
Requires: composer >= 2.7.8
@ -35,7 +36,11 @@ Requires: roundcube-skin-classic
Requires: roundcube-plugin-nextcloud_attachments
Requires: roundcube-plugin-globaladdressbook
Requires: roundcube-plugin-contextmenu
Requires: php-sabre-dav php-sabre-event php-sabre-http php-sabre-uri2 php-sabre-vobject4444 php-sabre-xml2
Requires: php-sabre-dav php-sabre-event php-sabre-http php-sabre-uri2 php-sabre-vobject4 php-sabre-xml2
Requires: php81-php-pspell php82-php-pspell php83-php-pspell
Requires: enchant php81-php-enchant php82-php-enchant php83-php-enchant
Requires: php81-php-xml php82-php-xml php83-php-xml
Requires: hunspell-en hunspell-en-GB
AutoReqProv: no
%description
@ -80,11 +85,30 @@ fi
%attr(755,root,root) /usr/bin/rcplugin_update.sh
%changelog
* Sun Sep 01 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.6-1.sme
- initial version for SME11 [SME: ]
* 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]
* Sun Sep 01 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.6-3.sme
- initial version for SME11 [SME: 12617]
- build and require rpm for plugins and skins
- TODO: allow custom server IMAP/SMTP
- TODO: Install deps without symphony
- improve directory handling, spellchecker
- fix httpd templates
* Mon Mar 25 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.2-24.sme
- fix temp event not ending because of interactive install of plugin [SME: 12530]