Change Maximum Attachment Size in Roundcube

NethServer Version: NethServer release 7.3.1611 (Final)
Module: Roundcube Webmail 1.1.9

Hello,
I need to change the maximum attachment size in Roundcube from 2Mb to 8Mb, but it does not work.
I changed in /etc/php.ini
Upload_max_filesize = 8M
Post_max_size = 8M

But in Roundcube it is not updated. How do I solve it?

Did you reloaded/restarted apache after the change?

There are some php properties that can be changed with config and db commands, without having to manually edit the file.

config setprop php UploadMaxFilesize 8
config setprop php PostMaxSize 8
signal-event nethserver-php-update
3 Likes

Hello @dnutan, sorry for jumping into this support post…but I wanted to confirm something about these config and db commands you’ve listed. Does this change to UploadMaxFilesize and PostMaxSize in PHP also affect the upload size for other apps like Nextcloud? Or are these commands only for mail?

Thanks!

With the commands I work, but modifying the php.ini does not.
Thanks @dnutan

The changes are php wide, affecting other web apps using the base/default php version, unless custom settings are in use (for instance through .htaccess files).

It does not affect nextcloud and other applications using a different php version.

2 Likes

Right, this depends on the version of PHP used by each application. Good to know. :+1:

Thank you.

for the default php version of centos, you can install nethserver-phpsettings from my repo, you will have a panel to trigger your settings.

https://wiki.nethserver.org/doku.php?id=module:phpsettings

2 Likes

Hello,

Since the topic fits here exactly, I let the zombie revive…
I am also limited to 2 MB in Roundcube, although PHP is configured correctly.

Roundcube:
image

PHP:
image

Where can I persuade Roundcube to adopt the PHP settings?
Sincerely, MArko

ps.: I have also customized htaccess unsuccessfully

cat /etc/roundcubemail/htaccess 
php_value upload_max_filesize 64M
php_value post_max_size 64M

which roundcube version are you using, the one from standard repos (1.4.x) or roundcubemail-next (1.5.x that uses rh-php73-php-fpm and so the php files are elsewhere)

1 Like

rpm -qa | grep roundcube
nethserver-roundcubemail-next-1.5.3-1.ns7.noarch

1 Like

however the next rpm update will change this file, I need to set it as a noreplace

3 Likes

Untested, but with the pointer of @stephdl I think you can edit /etc/opt/rh/rh-php73/php-fpm.d/000-roundcubemail.conf and add the parameters you want:

php_value[upload_max_filesize] = 64M
php_value[post_max_size] = 64M

If it doesn’t work try restarting the webserver service or changing php_value to php_admin_value (not sure which one is required here)

However, bear in mind what Stéphane pointed out about the package update.

2 Likes

I would like to make something dynamic like I did here

2 Likes

QA at

and the PR to test

2 Likes

the fix is available to test please jump in

Php custom settings for nethserver-roundcubemail-next · Issue #6666 · NethServer/dev · GitHub

2 Likes

thinking loudly, I set a 32MB size file for attachment, I bet it is too much, what could be the good size ?

1 Like

Most providers seem to allow at least 20MB.

2 Likes

Mountain view has 25mb.

1 Like