A setting to adjust the max attachment size allowed in webmail


(hany) #1

please add a setting for enhancing roundcube to allow the admin to adjust the max allowed file size for mail attachment
currently it is set to 2mb which is a very small size nowadays , any little pdf file will easily exceed the 2mb allowed max file size
i think we need a setting in the gui to add some enhancement to the mail server


Max upload mailattachment in Roundcube
(Stefano) #2

IMO this is already feasible via db command…
please search the coumentation for php settings


(Gabriel GHEORGHIU) #3

Hi Stefano,

IMO:
As usual, we need to do most of settings (please read all settings) from GUI, not from CLI.

Many of us want to replace Zentyal and/or Endian with NethServer. One of the issues with NethServer is how often we need to use GUI to make usual settings and how often we are forced to use CLI to make usual settings.

With Endian, I use CLI only to check and make the updates for Endian (because I use the Community version, not the paid version). All the settings are made only from GUI. Nothing from CLI.

With Zentyal, all the settings are made only from GUI. Nothing from CLI.

In this forum, for many times, we compare NethServer with Zentyal, with Endian and with other distros. Usually only by how many additional apps are on NethServer vs the others.

Let’s start to compare NethServer with the others starting by GUI facilities.
Let’s see what we will obtain.


(Artem Fedai) #4

@hany please take into consideration, MAX email size, which is restricted by RFC.


(Gabriel GHEORGHIU) #5

I think there are different RFC rules: for email size and for attachment size.

Maybe this can help: http://tools.ietf.org/html/rfc1870; http://www.faqs.org/rfcs/rfc2822.html

Extracts from here: https://wiki.zimbra.com/wiki/Configuring_maxmessagesize

" The following explains how to observe and adjust the Maximum Message
Size for messages passing through the Zimbra MTA (Postfix). The message_size_limit postconf parameter
is configured globally for all Zimbra MTAs. The default Zimbra MTA
configuration uses the default Postfix message_size_limit of 10MB (i.e.
‘10240000’ bytes). Note that this is the size of the full RFC 2822 internet message, after any necessary MIME-encoding.

General Discussion About Value Sizing
This is being added because we find many customers are confused by
the variable sizing and then what users see as the limitation when they
go to upload an attachment. This wiki mentions the various variables
involved with message sizing. The important part to pay attention to is:

"Note that this is the size of the full RFC 2822 internet message, after any necessary MIME-encoding."
There is no predictable % increase of the message size after the
encoding. We recommend a 150% assumption if one doesn’t want to be
tweaking the variables often. Meaning, if your policy it to not allow
the sending of messages/attachments much larger than 25 MB’s BEFORE
encoding, then
use 38MB’s for the variable numbers that you would configure per the
steps below. Normally, the encoding never reaches this level."


(Stéphane de Labrusse) #6

In fact it is the php limit which reach the 2MB…I did some work in the past on roundcunemail and indeed some php admin value should be added to set the limit under 10MB but only in the roundcubemail virtualhost.

Of course we can add a gui for roundcubemail…but if all module gets a gui…You will have quick too much menus in your server manager. Maybe a db value should be better.

In order to solve your issue you can install nethserver-php-scl


If you want a gui to set the limit values of php or you can use the cli command to set the value of php by hand in your terminal.


(Gabriel GHEORGHIU) #7

How to set the attachment size on Zentyal and Endian:


(Stéphane de Labrusse) #8

Roundecubemail is just a php application which takes its limit from php…change the php limit :stuck_out_tongue:

Here the maximum size of email is not the faulty case… But you demonstrate us that the gui way must be done. …i’m a big fan of that…give the control to the end user


(Gabriel GHEORGHIU) #9

I know that.
I know that Jim refer to Roundcube but also to GUI.
With NS you can use also Sogo.
The main settings for e-mail server are made from NS.
I just wanted to show how these settings are made on other distributions, from GUI.


(Gabriel GHEORGHIU) #10

I’m also a big fan of GUI. :smile:
If I should switch from Zentyal and Endian to NethServer, I should have also the GUI facilities, not only additional apps. You know that, all that additional apps can be installed on Ubuntu or on RH …


(Davide Principi) #11

I think the same can be done from the Server Manager UI as documented on

http://docs.nethserver.org/en/latest/mail.html#messages

However that Queue message max size slider does not change the PHP upload limit of Roundcube.


(Gabriel GHEORGHIU) #12

Hi Davide,

Unfortunately, for now, there is no option in NS GUI to set the max size of the attachment for the e-mail.

The Queue message max size slider sets the maximum size of messages traversing the system, not the max size of the attachment.
In the Queue are stored the messages that are waiting to be delivered.


(Artem Fedai) #13

It is not so hard to implement in Section :

Message size 2-5-10-15 and update postfix conf + roundcube php conf + httpd gracefull


(Stefano) #14

I see here 2 things:

  1. a guy has a problem, he needs a solution
  2. there’s something that must be (well, I disagree but it doesn’t matter) developed

I gave a fast solution… OP is free to use my suggestion or wait for the new feature or, but it will never happen, start to dig inside the code and just start doing it himself…

here I see 99% just begging for features because some other distro has them… stop asking, start doing it yourself… we (me and many others reading and writing here) had just started in this way…


(Gabriel GHEORGHIU) #15

Hany said: “i think we need a setting in the gui to add some enhancement to the mail server”.
I expressed my opinion.

Sorry for bothering you (all of you).
It will not happen anymore.

Best regards,
Gabriel


(Stefano) #16

you are welcome, always, just like everyone else

you weren’t, at all

I surely don’t want it, you’re getting me wrong


(Filippo Carletti) #17

An email containing an attachment is roughly 30% bigger than the original file size due to encoding.
What do you think about automatically setting the maximum attachment size to max email size - 30 %?
Or do you think that adding a web option to set the max attachment size is easier to understand?
Side note: we could leave max mail size and add the 30% rule" to the online help.

Please, share your opinions, the code is easy and quick to write, the hard part is deciding the interface and I think that the opinion of the users counts more than anything else.


(Davide Principi) #18

I like it. Whatever we choose, we should avoid sending messages that are bigger than the “queue max size”.


(Gabriel GHEORGHIU) #19

Thank you for hearing (me) us!

IMO, adding a web option to set the max attachment size is easier to understand and more useful.
I usually set the attachment size to 25 MB. But there are situation when you need more size (I have a web app that sending emails with attached files which can reach 75 MB/email).

I think it depends on the system administrator. The sysadmin must know what is better for his system. Let’s give him a chance! ( Firewall UI for policy rules )


(Gabriel GHEORGHIU) #20

We can correlate the two settings, even by a warning.