/[smecontribs]/rpms/smeserver-roundcube/contribs10/smeserver-roundcube-1.2-bz12489-bz12263.patch
ViewVC logotype

Annotation of /rpms/smeserver-roundcube/contribs10/smeserver-roundcube-1.2-bz12489-bz12263.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Sat Feb 24 22:44:49 2024 UTC (9 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-roundcube-1_2-20_el7_sme
Changes since 1.1: +164 -8 lines
* Sat Feb 24 2024 Jean-Philippe Pialasse <tests@pialasse.com> 1.2-20.sme
- add nextcloud_attachements plugin support [SME: 12489]
- simplify access setting using access(private,public)/status [SME: 12263]
- Requires roundcube >= 1.6
  up to php81,   add dedicated php pool
  using update event to config plugins

1 jpp 1.1 diff -Nur --no-dereference smeserver-roundcube-1.2.old/createlinks smeserver-roundcube-1.2/createlinks
2     --- smeserver-roundcube-1.2.old/createlinks 2024-02-24 09:22:05.481000000 -0500
3 jpp 1.2 +++ smeserver-roundcube-1.2/createlinks 2024-02-24 17:35:58.066000000 -0500
4     @@ -8,7 +8,7 @@
5 jpp 1.1 #see the /etc/systemd/system-preset/49-koozali.preset should be present for systemd integration on all you yum update event
6    
7     foreach my $file (qw(
8     - /etc/systemd/system-preset/49-koozali.preset
9     + /etc/systemd/system-preset/49-koozali.preset
10     ))
11     {
12     templates2events( $file, $event );
13 jpp 1.2 @@ -36,8 +36,10 @@
14     ))
15     {
16 jpp 1.1 templates2events("/usr/share/roundcubemail/plugins/managesieve/config.inc.php", $event);
17 jpp 1.2 + templates2events("/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php", $event);
18 jpp 1.1 templates2events("/etc/roundcubemail/config.inc.php", $event);
19     templates2events("/etc/e-smith/sql/init/80roundcube", $event);
20     +
21     }
22    
23     #restart specific services to avoid to reboot after the installation
24     @@ -47,8 +49,10 @@
25     roundcube-update
26     ))
27     {
28     + templates2events("/etc/opt/remi/php81/php-fpm.d/www.conf",$event);
29     templates2events("/etc/httpd/conf/httpd.conf", $event);
30     templates2events("/etc/dovecot/dovecot.conf", $event);
31     + safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/php81-php-fpm");
32     safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/mysql.init");
33     safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
34     safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/dovecot");
35     @@ -64,6 +68,7 @@
36     ))
37     {
38     event_link("qmail-update-user", $event, "20");
39 jpp 1.2 + event_link("roundcube-conf", $event, "03");
40 jpp 1.1 }
41     safe_symlink("/usr/share/php/Net/LDAP3","root/usr/share/pear/Net/LDAP3");
42     safe_symlink("/usr/share/php/Net/LDAP3.php","root/usr/share/pear/Net/LDAP3.php");
43     diff -Nur --no-dereference smeserver-roundcube-1.2.old/root/etc/e-smith/db/configuration/defaults/roundcube/access smeserver-roundcube-1.2/root/etc/e-smith/db/configuration/defaults/roundcube/access
44     --- smeserver-roundcube-1.2.old/root/etc/e-smith/db/configuration/defaults/roundcube/access 1969-12-31 19:00:00.000000000 -0500
45     +++ smeserver-roundcube-1.2/root/etc/e-smith/db/configuration/defaults/roundcube/access 2024-02-24 11:59:38.299000000 -0500
46     @@ -0,0 +1 @@
47     +public
48     diff -Nur --no-dereference smeserver-roundcube-1.2.old/root/etc/e-smith/db/configuration/defaults/roundcube/PluginsList smeserver-roundcube-1.2/root/etc/e-smith/db/configuration/defaults/roundcube/PluginsList
49     --- smeserver-roundcube-1.2.old/root/etc/e-smith/db/configuration/defaults/roundcube/PluginsList 2024-02-24 09:22:05.478000000 -0500
50     +++ smeserver-roundcube-1.2/root/etc/e-smith/db/configuration/defaults/roundcube/PluginsList 2024-02-24 11:31:22.111000000 -0500
51     @@ -1 +1 @@
52     -globaladdressbook,contextmenu,markasjunk,vcard_attachments,newmail_notifier,emoticons,managesieve
53     +globaladdressbook,contextmenu,markasjunk,vcard_attachments,newmail_notifier,emoticons,managesieve,nextcloud_attachments
54     diff -Nur --no-dereference smeserver-roundcube-1.2.old/root/etc/e-smith/db/configuration/defaults/roundcube/PublicAccess smeserver-roundcube-1.2/root/etc/e-smith/db/configuration/defaults/roundcube/PublicAccess
55     --- smeserver-roundcube-1.2.old/root/etc/e-smith/db/configuration/defaults/roundcube/PublicAccess 2015-04-01 20:05:54.000000000 -0400
56     +++ smeserver-roundcube-1.2/root/etc/e-smith/db/configuration/defaults/roundcube/PublicAccess 1969-12-31 19:00:00.000000000 -0500
57     @@ -1 +0,0 @@
58     -global
59     diff -Nur --no-dereference smeserver-roundcube-1.2.old/root/etc/e-smith/db/configuration/migrate/80roundcube smeserver-roundcube-1.2/root/etc/e-smith/db/configuration/migrate/80roundcube
60     --- smeserver-roundcube-1.2.old/root/etc/e-smith/db/configuration/migrate/80roundcube 2015-04-01 20:05:54.000000000 -0400
61     +++ smeserver-roundcube-1.2/root/etc/e-smith/db/configuration/migrate/80roundcube 2024-02-24 11:45:39.162000000 -0500
62     @@ -3,6 +3,15 @@
63    
64     my $rec = $DB->get('roundcube') || $DB->new_record('roundcube', {type => 'service'});
65    
66     +# migrate PublicAccess to access
67     + if ( my $PublicAccess = $DB->get_prop_and_delete('roundcube','PublicAccess') ) {
68     + $DB->set_prop('roundcube','access', "private");
69     + $DB->set_prop('roundcube','access', "public") if ($PublicAccess =~ /global/);
70     + $DB->set_prop('roundcube','status', "disabled") if ($PublicAccess == "none");
71     + }
72     +
73     +
74     +
75     my $pw = $rec->prop('DbPassword');
76     return "" if $pw;
77    
78     diff -Nur --no-dereference smeserver-roundcube-1.2.old/root/etc/e-smith/db/configuration/migrate/80roundcube_Plugins_Migration smeserver-roundcube-1.2/root/etc/e-smith/db/configuration/migrate/80roundcube_Plugins_Migration
79     --- smeserver-roundcube-1.2.old/root/etc/e-smith/db/configuration/migrate/80roundcube_Plugins_Migration 2024-02-24 09:22:05.479000000 -0500
80     +++ smeserver-roundcube-1.2/root/etc/e-smith/db/configuration/migrate/80roundcube_Plugins_Migration 2024-02-24 11:31:03.956000000 -0500
81     @@ -6,6 +6,12 @@
82    
83     return unless ($plugins ne '');
84    
85     +#nextcloud_attachements is used
86     +if ($plugins !~ 'nextcloud_attachments')
87     + {
88     + $plugins = $plugins.',nextcloud_attachments';
89     + $cdb->set_prop('roundcube','PluginsList',"$plugins");
90     + }
91     #sieverule is now used instead of
92     if ($plugins !~ 'managesieve')
93     {
94     @@ -18,35 +24,30 @@
95     $plugins =~ s/,sieverule//g;
96     $cdb->set_prop('roundcube','PluginsList',"$plugins");
97     }
98     -
99     # markasjunk2 deprecated
100     if ($plugins =~ 'markasjunk')
101     {
102     $plugins =~ s/markasjunk2/markasjunk/g;
103     $cdb->set_prop('roundcube','PluginsList',"$plugins");
104     }
105     -
106     #Carddav is a really bad plugin, when available it will become usefull
107     if ($plugins =~ 'carddav')
108     {
109     $plugins =~ s/,carddav//g;
110     $cdb->set_prop('roundcube','PluginsList',"$plugins");
111     }
112     -
113     #remove calendar
114     if ($plugins =~ 'calendar')
115     {
116     $plugins =~ s/,calendar//g;
117     $cdb->set_prop('roundcube','PluginsList',"$plugins");
118     }
119     -
120     #remove libcalendaring
121     if ($plugins =~ 'libcalendaring')
122     {
123     $plugins =~ s/,libcalendaring//g;
124     $cdb->set_prop('roundcube','PluginsList',"$plugins");
125     }
126     -
127     #remove tasklist
128     if ($plugins =~ 'tasklist')
129     {
130     diff -Nur --no-dereference smeserver-roundcube-1.2.old/root/etc/e-smith/events/actions/roundcube-conf smeserver-roundcube-1.2/root/etc/e-smith/events/actions/roundcube-conf
131     --- smeserver-roundcube-1.2.old/root/etc/e-smith/events/actions/roundcube-conf 1969-12-31 19:00:00.000000000 -0500
132     +++ smeserver-roundcube-1.2/root/etc/e-smith/events/actions/roundcube-conf 2024-02-24 12:23:40.761000000 -0500
133     @@ -0,0 +1,2 @@
134     +#!/bin/bash
135     +/usr/bin/rcplugin_update.sh
136     diff -Nur --no-dereference smeserver-roundcube-1.2.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/92roundcube smeserver-roundcube-1.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/92roundcube
137     --- smeserver-roundcube-1.2.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/92roundcube 2024-02-24 09:22:05.466000000 -0500
138     +++ smeserver-roundcube-1.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/92roundcube 2024-02-24 11:53:20.478000000 -0500
139     @@ -4,49 +4,17 @@
140     unless $status eq 'enabled';
141    
142     $OUT = "";
143     - my $allow = 'all granted';
144     - my $pass = '0';
145     + my $allow = "ip $localAccess";
146     my $satisfy = 'all';
147     my $name = $roundcube{'Name'} || 'RoundCube IMAP Client';
148     + my $version = 81; # php version to use
149    
150     for ('exit-if-none')
151     {
152     - if ($roundcube{'PublicAccess'})
153     + if ( (exists($roundcube{'access'}) && ($roundcube{'access'} eq 'public') )
154     {
155     - if ($roundcube{'PublicAccess'} eq 'none')
156     - {
157     - next;
158     - }
159     - elsif ($roundcube{'PublicAccess'} eq 'local')
160     - {
161     - $allow = "ip $localAccess";
162     - $pass = 0;
163     - $satisfy = 'all';
164     - }
165     - elsif ($roundcube{'PublicAccess'} eq 'local-pw')
166     - {
167     - $allow = "ip $localAccess";
168     - $pass = 1;
169     - $satisfy = 'all';
170     - }
171     - elsif ($roundcube{'PublicAccess'} eq 'global')
172     - {
173     $allow = 'all granted';
174     - $pass = 0;
175     $satisfy = 'all';
176     - }
177     - elsif ($roundcube{'PublicAccess'} eq 'global-pw')
178     - {
179     - $allow = 'all granted';
180     - $pass = 1;
181     - $satisfy = 'all';
182     - }
183     - elsif ($roundcube{'PublicAccess'} eq 'global-pw-remote')
184     - {
185     - $allow = "ip $localAccess";
186     - $pass = 1;
187     - $satisfy = 'any';
188     - }
189     }
190    
191     $OUT .= "#------------------------------------------------------------\n";
192     @@ -64,30 +32,15 @@
193     $OUT .= "\n";
194     $OUT .= "<Directory /usr/share/roundcubemail>\n";
195     $OUT .= " Require $allow\n";
196     -
197     - if ($pass)
198     - {
199     - $OUT .= " AuthName \"$name\"\n";
200     - $OUT .= " AuthBasicProvider external\n";
201     - $OUT .= " AuthType Basic\n";
202     - $OUT .= " AuthExternal pwauth\n";
203     - $OUT .= " require valid-user\n";
204     - $OUT .= " Satisfy $satisfy\n";
205     - }
206     - $OUT .= " AddType application/x-httpd-php .php\n";
207     - $version = 74;
208     - $OUT .= "<FilesMatch \.php\$\>\n";
209     - $OUT .= "SetHandler \"proxy:unix:/var/run/php-fpm/php$version.sock|fcgi://localhost\"\n";
210     - $OUT .= "</FilesMatch>\n";
211     -# $OUT .= " php_admin_value eaccelerator.enable 1\n";
212     - $OUT .= "</Directory>\n";
213     -
214     + $OUT .= " AddType application/x-httpd-php .php\n";
215     + $OUT .= "<FilesMatch \.php\$\>\n";
216     + $OUT .= "SetHandler \"proxy:unix:/var/run/php-fpm/php$version-roundcube.sock|fcgi://localhost\"\n";
217     + $OUT .= "</FilesMatch>\n";
218     + $OUT .= "</Directory>\n";
219     $OUT .= qq (
220     <Directory /usr/share/roundcubemail/installer/>
221     Require all denied
222     </Directory>
223     );
224     -
225     -
226     }
227     }
228     diff -Nur --no-dereference smeserver-roundcube-1.2.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15roundcube smeserver-roundcube-1.2/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15roundcube
229     --- smeserver-roundcube-1.2.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15roundcube 1969-12-31 19:00:00.000000000 -0500
230 jpp 1.2 +++ smeserver-roundcube-1.2/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15roundcube 2024-02-24 16:55:55.607000000 -0500
231 jpp 1.1 @@ -0,0 +1,67 @@
232     +{
233     + my $phpversion="81";
234     +
235     +if ($PHP_VERSION eq $phpversion){
236     + if (($roundcube{'status'} || 'disabled') eq 'enabled'){
237     + my $max_upload_size = ($roundcube{MaxUploadSize} || '100M');
238     + $max_upload_size .= 'M' if ($max_upload_size =~ m/^\d+$/);
239     + my $memory_limit = ($roundcube{MemoryLimit} || '512M');
240     + $memory_limit .= 'M' if ($memory_limit =~ m/^\d+$/);
241     + my $open_basedir= $roundcube{PHPBaseDir} || '';
242 jpp 1.2 + $open_basedir = "/usr/share/roundcubemail:/var/lib/roundcube:/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";
243 jpp 1.1 + my $id = 'roundcube';
244     + my $max_children = $roundcube{'PHPmaxChildren'} || 20;
245     + my $min_spare_servers = $roundcube{'PHPminServers'} || 4;
246     + my $start_servers = $roundcube{'PHPstartServers'} || 6;
247     + my $max_spare_servers = $roundcube{'PHPmaxServers'} || 8;
248     + my $max_requests = $roundcube{'PHPmaxRequests'} || 1000;
249     + $min_spare_servers = ( $min_spare_servers > $max_spare_servers ) ? printf("%.0f",$max_spare_servers/2) : $min_spare_servers;
250     + $start_servers = ( $start_servers > $max_spare_servers ) ? printf("%.0f", $max_spare_servers /2 + $min_spare_servers/2 ) : $start_servers;
251     +
252     + $OUT .=<<_EOF;
253     +
254     +[php$PHP_VERSION-$id]
255     +user = www
256     +group = www
257     +listen.owner = root
258     +listen.group = www
259     +listen.mode = 0660
260     +listen = /var/run/php-fpm/php$PHP_VERSION-$id.sock
261     +pm = dynamic
262     +pm.max_children = $max_children
263     +pm.start_servers = $start_servers
264     +pm.min_spare_servers = $min_spare_servers
265     +pm.max_spare_servers = $max_spare_servers
266     +pm.max_requests = $max_requests
267     +php_admin_value[sys_temp_dir] = /var/lib/php/$id/tmp
268     +php_admin_value[session.save_path] = /var/lib/php/$id/session
269     +php_admin_value[session.gc_maxlifetime] = 86400
270     +php_admin_value[upload_tmp_dir] = /var/lib/php/$id/tmp
271     +php_admin_value[error_log] = /var/log/php/$id/error.log
272     +slowlog = /var/log/php/roundcube/slow.log
273     +php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f php@{ $DomainName }
274     +php_admin_flag[display_errors] = off
275     +php_admin_flag[log_errors] = on
276     +php_admin_value[error_log] = syslog
277     +php_admin_value[memory_limit] = $memory_limit
278     +php_admin_value[max_execution_time] = 3600
279     +php_admin_value[post_max_size] = $max_upload_size
280     +php_admin_value[upload_max_filesize] = $max_upload_size
281     +php_admin_value[disable_functions] = system, show_source, symlink, dl, passthru
282     +php_admin_value[open_basedir] = $open_basedir
283     +php_admin_flag[allow_url_fopen] = on
284     +php_admin_flag[file_upload] = on
285     +php_admin_flag[session.cookie_httponly] = on
286     +php_admin_flag[allow_url_include] = off
287     +php_admin_value[session.save_handler] = files
288     +php_admin_flag[output_buffering] = off
289     +
290     +_EOF
291     +
292     + }
293     + else{
294     + $OUT .= '; RoudnCube is disabled';
295     + }
296     +}
297     +}
298     +
299 jpp 1.2 diff -Nur --no-dereference smeserver-roundcube-1.2.old/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/20nextcloud_attachment_server smeserver-roundcube-1.2/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/20nextcloud_attachment_server
300     --- smeserver-roundcube-1.2.old/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/20nextcloud_attachment_server 1969-12-31 19:00:00.000000000 -0500
301     +++ smeserver-roundcube-1.2/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/20nextcloud_attachment_server 2024-02-24 17:24:25.423000000 -0500
302     @@ -0,0 +1,5 @@
303     +// Full URL to the Nextcloud server
304     +// e.g. https://example.com/nextcloud if in sub-path
305     +// or https://cloud.example.com if in root
306     +$config["nextcloud_attachment_server"] = "https://{$roundcube{'nextcloudURI'}||$nextcloud{'Virtualhost'}||$DomainName."/nextcloud"}";
307     +
308     diff -Nur --no-dereference smeserver-roundcube-1.2.old/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/25nextcloud_attachment_username smeserver-roundcube-1.2/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/25nextcloud_attachment_username
309     --- smeserver-roundcube-1.2.old/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/25nextcloud_attachment_username 1969-12-31 19:00:00.000000000 -0500
310     +++ smeserver-roundcube-1.2/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/25nextcloud_attachment_username 2024-02-24 17:25:55.035000000 -0500
311     @@ -0,0 +1,11 @@
312     +// Username resolving strategy from internal Roundcube
313     +// username which usually is the email address e.g. user@example.com or IMAP User
314     +// Placeholders are replaced as following
315     +// %s => verbatim RC username as reported by rcmail->get_user_name(). Depending on config loginuser@domain or login
316     +// %i => username used to login to imap. usually equal to %s
317     +// %e => user email
318     +// %l, %u => email localpart (%u is for backward compatibility)
319     +// %d => email domain
320     +// %h => IMAP Host
321     +$config["nextcloud_attachment_username"] = "%u";
322     +
323     diff -Nur --no-dereference smeserver-roundcube-1.2.old/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/30dont_try_mail_password smeserver-roundcube-1.2/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/30dont_try_mail_password
324     --- smeserver-roundcube-1.2.old/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/30dont_try_mail_password 1969-12-31 19:00:00.000000000 -0500
325     +++ smeserver-roundcube-1.2/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/30dont_try_mail_password 2024-02-24 17:25:48.875000000 -0500
326     @@ -0,0 +1,4 @@
327     +// Don't try the email password at all, because we know it won't work
328     +// Defaults to false, i.e. try the password
329     +$config["nextcloud_attachment_dont_try_mail_password"] = false;
330     +
331     diff -Nur --no-dereference smeserver-roundcube-1.2.old/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/33folder smeserver-roundcube-1.2/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/33folder
332     --- smeserver-roundcube-1.2.old/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/33folder 1969-12-31 19:00:00.000000000 -0500
333     +++ smeserver-roundcube-1.2/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/33folder 2024-02-24 17:32:13.004000000 -0500
334     @@ -0,0 +1,12 @@
335     +// Name for the sub-folder to upload to
336     +// Defaults to "Mail Attachments"
337     +// Can't be sub-folder of sub-folder link folder/sub
338     +$config["nextcloud_attachment_folder"] = "{$roundcube{'nextcloudFolder'}||'Mail Attachments'}";
339     +
340     +// Translate the folder name according to the users configured locale
341     +// When activating this $config["nextcloud_attachment_folder"] has to be an array
342     +// of locale => name, e.g.
343     +// $config["nextcloud_attachment_folder"] = ["en_US" => "Mail Attachments", "de_DE" => "E-Mail Anhänge"]
344     +// If locale doesn't exist, en_US or first will be used
345     +// Defaults to false
346     +$config["nextcloud_attachment_folder_translate_name"] = false;
347     diff -Nur --no-dereference smeserver-roundcube-1.2.old/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/35softlimit smeserver-roundcube-1.2/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/35softlimit
348     --- smeserver-roundcube-1.2.old/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/35softlimit 1969-12-31 19:00:00.000000000 -0500
349     +++ smeserver-roundcube-1.2/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/35softlimit 2024-02-24 17:29:39.128000000 -0500
350     @@ -0,0 +1,5 @@
351     +// Limit to show a warning at for large attachments.
352     +// has to be smaller then $config['max_message_size']
353     +// set to null to disable
354     +$config["nextcloud_attachment_softlimit"] = "{$roundcube{'NCsoftlimit'}||$qmail{'MaxMessageSize'}||'25M'}";
355     +
356     diff -Nur --no-dereference smeserver-roundcube-1.2.old/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/37behavior smeserver-roundcube-1.2/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/37behavior
357     --- smeserver-roundcube-1.2.old/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/37behavior 1969-12-31 19:00:00.000000000 -0500
358     +++ smeserver-roundcube-1.2/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/37behavior 2024-02-24 17:31:24.266000000 -0500
359     @@ -0,0 +1,6 @@
360     +// Behavior if $config['max_message_size'] is hit.
361     +// "prompt" to show dialog a la outlook or apple
362     +// "upload" to automatically upload without asking a la google
363     +// Defaults to "prompt"
364     +$config["nextcloud_attachment_behavior"] = "{$roundcube{'nextcloudBehavior'}||'prompt'}";
365     +
366     diff -Nur --no-dereference smeserver-roundcube-1.2.old/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/40excludeUsers smeserver-roundcube-1.2/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/40excludeUsers
367     --- smeserver-roundcube-1.2.old/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/40excludeUsers 1969-12-31 19:00:00.000000000 -0500
368     +++ smeserver-roundcube-1.2/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/40excludeUsers 2024-02-24 17:33:50.406000000 -0500
369     @@ -0,0 +1,57 @@
370     +// List of users to exclude
371     +// They won't be able to interact with the plugin at all
372     +// No prompts, no automatic uploading, no settings.
373     +// List by RC username or resolved username e.g. ["user@demo.com", "user"]
374     +$config["nextcloud_attachment_exclude_users"] = [];
375     +
376     +// Exclude users listed by uid (you need add the mapping to the address book) or email in any of the following
377     +// address books. This allows you to configure a hidden LDAP address book containing the users
378     +// to exclude.
379     +//
380     +// Hide an addressbook by setting
381     +// $config['ldap_public'][*] = [
382     +// ...
383     +// 'hidden' => true,
384     +// ...
385     +// ];
386     +// in the global config.
387     +//
388     +// Add the uid mapping via
389     +// $config['ldap_public'][*] = [
390     +// ...
391     +// 'fieldmap' => [
392     +// ...
393     +// //internal => ldapattr
394     +// 'uid' => 'uid',
395     +// ...
396     +// ],
397     +// ...
398     +// ]
399     +// in the global config. Replace mapped attribute with appropriate value for your directory e.g. cn
400     +// And replace "*" with the appropriate address book name
401     +$config["nextcloud_attachment_exclude_users_in_addr_books"] = [];
402     +
403     +// Exclude users that have a mapped value in an address book
404     +// format [ [ 'address_book', 'mapped_attribute', 'matched_value' ], ... ]
405     +//
406     +// Resulting in every user listed in the address book "address_book"
407     +// to be excluded if they have a "mapped_attribute", matching "matched_value".
408     +//
409     +// E.g. ['public', 'memberOf', 'cn=no_cloud,ou=groups,dc=example,dc=com']
410     +//
411     +// multiple attributes and multiple address books are supported
412     +$config["nextcloud_attachment_exclude_users_with_addr_book_value"] = [];
413     +
414     +// Exclude user that that are in a given group in an address book
415     +// format [ [ 'address_book', 'group' ], ... ]
416     +//
417     +// Resulting in every user listed in the address book "address_book" that is
418     +// is in group "group" to be excluded. You have to correctly configure the group
419     +// mapping for the LDAP entry
420     +//
421     +// E.g. ['public', 'nocloud']
422     +//
423     +// multiple groups and multiple address books are supported
424     +$config["nextcloud_attachment_exclude_users_in_addr_book_group"] = [];
425     +
426     +
427     diff -Nur --no-dereference smeserver-roundcube-1.2.old/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/60verify_https smeserver-roundcube-1.2/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/60verify_https
428     --- smeserver-roundcube-1.2.old/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/60verify_https 1969-12-31 19:00:00.000000000 -0500
429     +++ smeserver-roundcube-1.2/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/60verify_https 2024-02-24 17:34:52.039000000 -0500
430     @@ -0,0 +1,4 @@
431     +// Enable/Disable certificate validation for https on WebDAV and API requests
432     +// Defaults to true (enabled)
433     +$config["nextcloud_attachment_verify_https"] = {$roundcube{'nextcloudVerifyCerts'}||'true'};
434     +
435     diff -Nur --no-dereference smeserver-roundcube-1.2.old/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/template-begin smeserver-roundcube-1.2/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/template-begin
436     --- smeserver-roundcube-1.2.old/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/template-begin 1969-12-31 19:00:00.000000000 -0500
437     +++ smeserver-roundcube-1.2/root/etc/e-smith/templates/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php/template-begin 2024-02-24 17:20:03.116000000 -0500
438     @@ -0,0 +1,14 @@
439     +{
440     + $OUT = <<HERE;
441     +<?php
442     +/*
443     +HERE
444     +
445     + $OUT .=
446     + Text::Template::_load_text("/etc/e-smith/templates-default/template-begin");
447     +
448     + $OUT .= <<HERE;
449     +*/
450     +HERE
451     +
452     +}
453 jpp 1.1 diff -Nur --no-dereference smeserver-roundcube-1.2.old/root/usr/bin/rcplugin_update.sh smeserver-roundcube-1.2/root/usr/bin/rcplugin_update.sh
454     --- smeserver-roundcube-1.2.old/root/usr/bin/rcplugin_update.sh 2024-02-24 09:22:05.482000000 -0500
455 jpp 1.2 +++ smeserver-roundcube-1.2/root/usr/bin/rcplugin_update.sh 2024-02-24 17:36:14.068000000 -0500
456 jpp 1.1 @@ -1,19 +1,20 @@
457     #!/bin/bash
458     -/sbin/e-smith/db configuration setprop php AllowUrlFopen On
459     -/sbin/e-smith/expand-template /etc/php.ini
460     -/etc/init.d/httpd-e-smith restart >/dev/null 2>&1
461     +/sbin/e-smith/db configuration setprop php81 AllowUrlFopen On
462     +/sbin/e-smith/expand-template /etc/opt/remi/php81/php.ini
463     +/usr/bin/systemctl restart php81-php-fpm >/dev/null 2>&1
464     +#/etc/init.d/httpd-e-smith restart >/dev/null 2>&1
465     pathroundcube=$(pwd)
466    
467     cd /usr/share/roundcubemail
468     -COMPOSER_ALLOW_SUPERUSER=1 /usr/bin/php74 /usr/local/bin/composer require johndoh/contextmenu --with-dependencies
469     -COMPOSER_ALLOW_SUPERUSER=1 /usr/bin/php74 /usr/local/bin/composer require johndoh/globaladdressbook ~2.1 --with-dependencies
470     -COMPOSER_ALLOW_SUPERUSER=1 /usr/bin/php74 /usr/local/bin/composer require roundcube/larry ~1.6.0 --with-dependencies
471     +COMPOSER_ALLOW_SUPERUSER=1 /usr/bin/php81 /usr/local/bin/composer require johndoh/contextmenu --with-dependencies
472     +COMPOSER_ALLOW_SUPERUSER=1 /usr/bin/php81 /usr/local/bin/composer require johndoh/globaladdressbook ~2.1 --with-dependencies
473     +COMPOSER_ALLOW_SUPERUSER=1 /usr/bin/php81 /usr/local/bin/composer require roundcube/larry ~1.6.0 --with-dependencies
474     +COMPOSER_ALLOW_SUPERUSER=1 /usr/bin/php81 /usr/local/bin/composer require bennet0496/nextcloud_attachments --with-dependencies
475    
476     -
477     -COMPOSER_ALLOW_SUPERUSER=1 /usr/bin/php74 /usr/local/bin/composer self-update
478     -COMPOSER_ALLOW_SUPERUSER=1 /usr/bin/php74 /usr/local/bin/composer update --with-dependencies
479     -/sbin/e-smith/db configuration setprop php74 AllowUrlFopen off
480     -/sbin/e-smith/expand-template /etc/opt/remi/php74/php.ini
481     -/usr/bin/systemctl restart php74-php-fpm >/dev/null 2>&1
482     +COMPOSER_ALLOW_SUPERUSER=1 /usr/bin/php81 /usr/local/bin/composer self-update
483     +COMPOSER_ALLOW_SUPERUSER=1 /usr/bin/php81 /usr/local/bin/composer update --with-dependencies
484     +/sbin/e-smith/db configuration setprop php81 AllowUrlFopen off
485     +/sbin/e-smith/expand-template /etc/opt/remi/php81/php.ini
486     +/usr/bin/systemctl restart php81-php-fpm >/dev/null 2>&1
487     cd $pathroundcube
488    

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed