Zimbra incoming message size limit

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
mrpontifex
Posts: 15
Joined: Mon Oct 10, 2016 11:29 am
ZCS/ZD Version: 8.7.11_3800

Zimbra incoming message size limit

Post by mrpontifex »

Hello, I want to set 50mb as message size limit, so when somebody sends message to my zimbra server with atachments(message size around 40mb) I want to recive it. I read many forum threads, many articles, many blogs and none of that work, limit is always set to 20mb. Setting message size in Zimbra admin panel does nothing,

Code: Select all

[zimbra@x root]$ zmprov mcf zimbraMtaMaxMessageSize 1000000000
[zimbra@x root]$ postfix reload
/postfix-script: refreshing the Postfix mail system
[zimbra@x root]$ zmprov ms `zmhostname` zimbraMailContentMaxSize 50000000
[zimbra@x root]$ zmprov modifyConfig zimbraMailContentMaxSize 50000000
[zimbra@x root]$ zmprov mcf zimbraMtaMaxMessageSize 50000000
[zimbra@x root]$ postfix reload
/postfix-script: refreshing the Postfix mail system
[zimbra@x root]$ zmprov modifyConfig zimbraMailContentMaxSize 52428800
[zimbra@x root]$ zmprov mcf zimbraMtaMaxMessageSize 52428800
[zimbra@x root]$ postconf -e message_size_limit=52428800
[zimbra@x root]$ postfix reload
/postfix-script: refreshing the Postfix mail system
[zimbra@x root]$ postconf -e message_size_limit=9437184
[zimbra@x root]$ postfix reload
/postfix-script: refreshing the Postfix mail system
[zimbra@x root]$ exit
exit
[root@x ~]# postconf -e message_size_limit=5000000000
[root@x ~]# postfix reload
postfix/postfix-script: fatal: the Postfix mail system is not running
[root@x~]# su zimbra
[zimbra@x root]$ zmprov ms `zmhostname` zimbraFileUploadMaxSize 44040192
[zimbra@x root]$ zmprov ms `zmhostname` zimbraMailContentMaxSize 44040192
[zimbra@x root]$ zmprov mcf zimbraMtaMaxMessageSize 44040192
[zimbra@x root]$ postfix reload
/postfix-script: refreshing the Postfix mail system
[zimbra@x root]$
On my private postfix server I get:

Code: Select all

message size 37361972 exceeds size limit 20000000 of
    server x.example.com[111.111.111.111]
Limit is always 20000000, it's not reacting to any changes I made.

So how to change it?
Zimbra version: 8.7.11
User avatar
pup_seba
Outstanding Member
Outstanding Member
Posts: 687
Joined: Sat Sep 13, 2014 2:43 am
Location: Tarragona - Spain
Contact:

Re: Zimbra incoming message size limit

Post by pup_seba »

Hi,

You lost me at "postconf -e"...zimbra provides wrappers for postconf that will handle ldap configurations in case they are needed. Also, you are using your "root" user to execute those commands so most likely you are working on a disabled "postfix" at an OS level, and not on the postfix package that ships with zimbra. So I won't be reading the full stack of commands you issued. Instead, I'll try to give you some bigger picture image so you can make some sense of all of it.

1. If you need 40MB messages, you will need more than a 50MB limit configured...depending on the message. So you may expect that you most likely will need to increade from 50 to something like 60.
2. You may like the use of "zmprov desc -a nameoftheattribute" to better understand what each of those configs do. Limit config names are particulary confusing (at least to me).
3. Unless explicitly needed, use the zimbra user making sure you load its env with "su - zimbra", where the "-" is quite important.
4. For your version, most of the confs are now stored as ldap values, so no need to use "postconf" or "zmlocalconfig". Most likely you will need somehting like this:

$ zmprov mcf zimbraMtaMaxMessageSize 52428800 zimbraMobileMaxMessageSize 52428800

On all of your servers:
$ zmprov ms `zmhostname` zimbraMailContentMaxSize 52428800
$ zmcontrol restart

Then make sure the config has been replicated from the "global" (mcf) to each server conf (gs)
$ zmprov gs `zmhostname` zimbraMailContentMaxSize zimbraMtaMaxMessageSize zimbraMobileMaxMessageSize

Good luck.
mrpontifex
Posts: 15
Joined: Mon Oct 10, 2016 11:29 am
ZCS/ZD Version: 8.7.11_3800

Re: Zimbra incoming message size limit

Post by mrpontifex »

Pasted commands was example of what i try. Now with your advice i do:

Code: Select all

[root@x ~]# su - zimbra
[zimbra@x ~]$ zmprov ms `zmhostname` zimbraMailContentMaxSize 52428800
[zimbra@x ~]$ zmprov mcf zimbraMtaMaxMessageSize 52428800
[zimbra@x~]$ zmcontrol restart
Host s.exapmple.com
        Stopping zmconfigd...Done.
        Stopping zimlet webapp...Done.
        Stopping zimbraAdmin webapp...Done.
        Stopping zimbra webapp...Done.
        Stopping service webapp...Done.
        Stopping stats...Done.
        Stopping mta...Done.
        Stopping spell...Done.
        Stopping snmp...Done.
        Stopping cbpolicyd...Done.
        Stopping archiving...Done.
        Stopping opendkim...Done.
        Stopping amavis...Done.
        Stopping antivirus...Done.
        Stopping antispam...Done.
        Stopping proxy...Done.
        Stopping memcached...Done.
        Stopping mailbox...Done.
        Stopping logger...Done.
        Stopping dnscache...Done.
        Stopping ldap...Done.
Host x.example.com
        Starting ldap...Done.
        Starting zmconfigd...Done.
        Starting logger...Done.
        Starting mailbox...Done.
        Starting memcached...Done.
        Starting proxy...Done.
        Starting amavis...Done.
        Starting antispam...Done.
        Starting antivirus...Done.
        Starting opendkim...Done.
        Starting snmp...Done.
        Starting spell...Done.
        Starting mta...Done.
        Starting stats...Done.
        Starting service webapp...Done.
        Starting zimbra webapp...Done.
        Starting zimbraAdmin webapp...Done.
        Starting zimlet webapp...Done.
[zimbra@x~]$
[zimbra@x~]$ zmprov gs `zmhostname` zimbraMailContentMaxSize zimbraMtaMaxMessageSize
# name x.example.com
zimbraMailContentMaxSize: 52428800
And after that, I try to send message to one of zimbra mailbox and...

Code: Select all

This is the mail system at host <my private postfix server>.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<user@x.example.com>: message size 37361972 exceeds size limit 20000000 of
    server x.example.com[<zimbra ip address>]
mrpontifex
Posts: 15
Joined: Mon Oct 10, 2016 11:29 am
ZCS/ZD Version: 8.7.11_3800

Re: Zimbra incoming message size limit

Post by mrpontifex »

Code: Select all

[zimbra@x ~]$ zmprov gs $(zmhostname) zimbraMailContentMaxSize zimbraMtaMaxMessageSize zimbraMobileMaxMessageSize
# name x.example.com
zimbraMailContentMaxSize: 52428800
zimbraMobileMaxMessageSize: 52428800

[zimbra@x~]$
This is the output of this command
User avatar
pup_seba
Outstanding Member
Outstanding Member
Posts: 687
Joined: Sat Sep 13, 2014 2:43 am
Location: Tarragona - Spain
Contact:

Re: Zimbra incoming message size limit

Post by pup_seba »

Hi,

Maybe I'm confused and that attribute is not valid for this version? Mrpontifex If you run "zmprov desc -a zimbraMtaMaxMessageSize", what does it says? If as user zimbra, you execute "postconf message_size_limit", what does it says?

That particular value defaults to 10MB, which would not explain why you keep seeing that 200000 thing.
phoenix
Ambassador
Ambassador
Posts: 27278
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: Zimbra incoming message size limit

Post by phoenix »

Run the following commands on your server:

Code: Select all

zmprov ms $(zmhostname) zimbraFileUploadMaxSize 62914560
zmprov ms $(zmhostname) zimbraMailContentMaxSize 62914560
zmprov mcf zimbraMtaMaxMessageSize 62914560
postfix reload

zmprov gs $(zmhostname) zimbraFileUploadMaxSize zimbraMailContentMaxSize ; postconf | grep message_size_limit
Do note that you should allow a fifty-percent increase in size fo incoming messages to allow for conversion.

BTW, did you follow the instructions from the wiki? https://wiki.zimbra.com/wiki/Configurin ... ssage_size
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
mrpontifex
Posts: 15
Joined: Mon Oct 10, 2016 11:29 am
ZCS/ZD Version: 8.7.11_3800

Re: Zimbra incoming message size limit

Post by mrpontifex »

pup_seba wrote:Hi,

Maybe I'm confused and that attribute is not valid for this version? Mrpontifex If you run "zmprov desc -a zimbraMtaMaxMessageSize", what does it says? If as user zimbra, you execute "postconf message_size_limit", what does it says?

That particular value defaults to 10MB, which would not explain why you keep seeing that 200000 thing.
So this command gave me:

Code: Select all

[zimbra@x~]$ zmprov desc -a zimbraMtaMaxMessageSize
zimbraMtaMaxMessageSize
    Maximum total size of a mail message. Enforced in mailbox server and
    also used as value for postconf message_size_limit. 0 means "no limit"

               type : long
              value :
           callback :
          immutable : false
        cardinality : single
         requiredIn :
         optionalIn : globalConfig
              flags : accountInfo
           defaults : 10240000
                min : 0
                max :
                 id : 198
    requiresRestart : mta
              since :
    deprecatedSince :
And

Code: Select all

[zimbra@x~]$ postconf message_size_limit
message_size_limit = 52428800


phoenix wrote:Run the following commands on your server:

Code: Select all

zmprov ms $(zmhostname) zimbraFileUploadMaxSize 62914560
zmprov ms $(zmhostname) zimbraMailContentMaxSize 62914560
zmprov mcf zimbraMtaMaxMessageSize 62914560
postfix reload

zmprov gs $(zmhostname) zimbraFileUploadMaxSize zimbraMailContentMaxSize ; postconf | grep message_size_limit
Do note that you should allow a fifty-percent increase in size fo incoming messages to allow for conversion.

BTW, did you follow the instructions from the wiki? https://wiki.zimbra.com/wiki/Configurin ... ssage_size
Okey so I done what you said.

Code: Select all

[zimbra@x~]$ zmprov ms $(zmhostname) zimbraFileUploadMaxSize 62914560
zmprov ms $(zmhostname) zimbraMailContentMaxSize 62914560[zimbra@masz18 ~]$ zmprov ms $(zmhostname) zimbraMailContentMaxSize 62914560
[zimbra@x~]$ zmprov mcf zimbraMtaMaxMessageSize 62914560
[zimbra@x~]$ postfix reload
/postfix-script: refreshing the Postfix mail system
[zimbra@x~]$ zmprov gs $(zmhostname) zimbraFileUploadMaxSize zimbraMailContentMaxSize ; postconf | grep message_size_limit
# name x.example.com
zimbraFileUploadMaxSize: 62914560
zimbraMailContentMaxSize: 62914560

message_size_limit = 62914560
And still i get Undelivered Mail Return to Sender, nothing changed, still not working.

Code: Select all

message size 37361972 exceeds size limit 20000000 of
    server x.example.com[<zimbra ip address>]
This wiki page that you mentioned is first thing I read and done to try change message size limit.
phoenix
Ambassador
Ambassador
Posts: 27278
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: Zimbra incoming message size limit

Post by phoenix »

mrpontifex wrote:And still i get Undelivered Mail Return to Sender, nothing changed, still not working. This wiki page that you mentioned is first thing I read and done to try change message size limit.
Then you should tell us what instructions you've followed so we don't go over the same ground again. The first thing to point out is that you obviously missed the setting for "zimbraMtaMaxMessageSize" as you still had the old 20mb setting. Is it you that's sending a test email to your Zimbra server? If it is then what is the exact error that's being shown and is there anything in your ZCS log files that shows this error and if so, what is it?
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
User avatar
DualBoot
Elite member
Elite member
Posts: 1326
Joined: Mon Apr 18, 2016 8:18 pm
Location: France - Earth
ZCS/ZD Version: ZCS FLOSS - 8.8.15 Mutli servers
Contact:

Re: Zimbra incoming message size limit

Post by DualBoot »

Hello,

as far I can read from your posts, you're running a cluster of 2 Zimbra server and each Zimbra server is running a Zimbra MTA.
So my question is : did you modify the settings on each server ? If not, you should do this. And you should not have use
since the beginning the legacy postfix commands. My second advice is to use "zmprov mcf" instead of "zmprov ms server_name", but now
it is too late unless you delete the local server configuration per attribute.

Regards,
mrpontifex
Posts: 15
Joined: Mon Oct 10, 2016 11:29 am
ZCS/ZD Version: 8.7.11_3800

Re: Zimbra incoming message size limit

Post by mrpontifex »

phoenix wrote:
mrpontifex wrote:And still i get Undelivered Mail Return to Sender, nothing changed, still not working. This wiki page that you mentioned is first thing I read and done to try change message size limit.
Then you should tell us what instructions you've followed so we don't go over the same ground again. The first thing to point out is that you obviously missed the setting for "zimbraMtaMaxMessageSize" as you still had the old 20mb setting. Is it you that's sending a test email to your Zimbra server? If it is then what is the exact error that's being shown and is there anything in your ZCS log files that shows this error and if so, what is it?
Instructions above, everybody uses the same commands, and that commands sets something but not te real message size limit, every value I set always ends as 20mb limit.

I have my own VPS server where I have postfix, I use my own domain. In my company I have Zimbra server, and I use company domain. And I'm sending email with 25mb attachment from my private vps to my company mail to test message size limit, and right after that, I reciveing "Undelivered Mail Returned to Sender" mail. Check below to see content of this, mail, I censored my company mail address and my private vpn hostname.

Code: Select all

This is the mail system at host X.com.

I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can delete your own text from the attached returned message.

                   The mail system

<user@Y.com>: message size 37361973 exceeds size limit 20000000 of
    server Y.com[<server ip address>]
And details.txt attachment

Code: Select all

Reporting-MTA: dns; X.com
X-Postfix-Queue-ID: 867F225431
X-Postfix-Sender: rfc822; user@X.com
Arrival-Date: Thu, 18 Apr 2019 13:15:41 +0200 (CEST)

Final-Recipient: rfc822; user@Y.com
Original-Recipient: rfc822;user@Y.com
Action: failed
Status: 5.3.4
Diagnostic-Code: X-Postfix; message size 37361973 exceeds size limit 20000000
    of server Y.com[<server ip address>]
I cannot find any information about this incident in maillog on zimbra server.
DualBoot wrote:Hello,

as far I can read from your posts, you're running a cluster of 2 Zimbra server and each Zimbra server is running a Zimbra MTA.
So my question is : did you modify the settings on each server ? If not, you should do this. And you should not have use
since the beginning the legacy postfix commands. My second advice is to use "zmprov mcf" instead of "zmprov ms server_name", but now
it is too late unless you delete the local server configuration per attribute.

Regards,
No, I'm running one zimbra server in my company, and one simply postfix server on my own VPS, coworkers notify me, that some people from outside our company are sending them mails with photos as attachments, but they cannot reach our zimbra server because of 20mb message size limit, which I can't change. I earlier used commands from wiki page which phoenix mentioned, and want to try if it works by sending mail from my own private vps with postfix to company zimbra server.
Post Reply