Attachment max file size

Roundcube says the maximum attachment file size is 2M. How can I adjust this to a higher value?
I was searching all over this forum, as well as googled around, but nothing seems to help. I modified appropriate values in /etc/php/8.0/fpm/php.ini, restarted php and nginx, but nothing seems to help. To me it looks like roundcube limit, but I don’t know how to adjust it.
Thank you for advice.

Hi
Have you tried:
You’ve to change the php parameters “upload_max_filesize” & “post_max_size” either in your global php. ini or within the . htaccess file in the roundcoube directory. Whatever you change the “upload_max_filesize” to, the “post_max_size” should be at least 1M higher.

Yes, I modified both.

do you get any error message?
anything in mail.log?

The limit is displayed even before I try to attach anything - seems to me like some configuration issue in roundcube:

Nothing special in log:

Feb 16 18:26:47 imap-login: Info: Login: user=<adam@chvaja.cz>, method=PLAIN, rip=18.198.221.141, lip=172.31.20.200, mpid=1247243, TLS, session=<YSJ5DIMRKKgSxt2N>
Feb 16 18:26:47 imap(adam@chvaja.cz)<1247243><YSJ5DIMRKKgSxt2N>: Info: Disconnected: Logged out in=87 out=630 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Feb 16 18:26:49 imap-login: Info: Login: user=<adam@chvaja.cz>, method=PLAIN, rip=18.198.221.141, lip=172.31.20.200, mpid=1247245, TLS, session=<n2OODIMRLKgSxt2N>
Feb 16 18:26:49 imap(adam@chvaja.cz)<1247245><n2OODIMRLKgSxt2N>: Info: Disconnected: Logged out in=99 out=894 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Feb 16 18:27:41 imap-login: Info: Login: user=<adam@chvaja.cz>, method=PLAIN, rip=18.198.221.141, lip=172.31.20.200, mpid=1247247, TLS, session=<wFWrD4MRes4Sxt2N>
Feb 16 18:27:41 imap(adam@chvaja.cz)<1247247><wFWrD4MRes4Sxt2N>: Info: Disconnected: Logged out in=192 out=1181 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0

postfix has a setting for the message size I wonder if this could be related…

can you run # postconf |grep message_size_limit

this says:
message_size_limit = 52428800

which is over 50M, not 2M. I wonder where does this 2M come from.

Ok I’m no expert on PHP but going back to the php side, there are two php.ini files have you looked into :
/etc/php/8.0/cli/php.ini

BTW what version of miab are you running?

I’m running the latest version of MiaB and mine shows a max size of 75MB:

I to am running the latest version and likewise 75MB

miab v65

I have edited both /etc/php/8.0/cli/php.ini and /etc/php/8.0/fpm/php.ini.

But here’s the thing: my roundcube client is running on another server, outside of the miab box.
I edited the php settings there, too, to the same values. Without results.

I just can’t figure out whether it’s some setting on miab, or on the other machine with roundcube.

What would be helpful is to find out, where does this info-text “Maximum allowed file size is 75 MB” tak the value from.

Ok found the little blighter:

edit /usr/local/lib/roundcubemail/config/defaults.inc.php
goto line - $config[‘max_message_size’] = ‘100M’;

as a test just double the number say to 200M - go back to roundcube and attachment size should now say 150MB.
afterthought might be an idea to clear your browser cache and reload roundcube.

Let us know how you get on.

so I edited roundcubemail/config/defaults.inc.php, cleared cache and reloaded roundcube, but I’m still seeing 2M

Hi
When I tried it, it worked fine, so I’m not sure what’s happening here, afraid that’s as far as I go with this.
Have you tried the roundcube on the miab server?

Yes I tried but there were some problems (I think there was no possibility to install plugins or something like that), so I turned to a standalone roundube installation.
Never mind, I’ll try to dig into it more when I have some more time. Thank you anyway for you valuable help!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.