How to Adjust the Zimbra Maximum Message and Upload Size via CLI

1. Run as zimbra user :

# su - zimbra

2. Check the default message_size_limit parameter :

$ postconf | grep message_size_limit

Example and Result:

$ postconf | grep message_size_limit

message_size_limit = 10240000

3. Check the default global size for zimbraMtaMaxMessageSize, zimbraFileUploadMaxSize and zimbraMailContentMaxSize :

$ zmprov gcf zimbraMtaMaxMessageSize

zimbraMtaMaxMessageSize: 10240000

$ zmprov gcf zimbraFileUploadMaxSize

zimbraFileUploadMaxSize: 10240000

$ zmprov gcf zimbraMailContentMaxSize

zimbraMailContentMaxSize: 10240000

4. Change zimbraMtaMaxMessageSize and zimbraFileUploadMaxSizeto 40MB (40960000 bytes) globally.

$ zmprov modifyConfig zimbraMtaMaxMessageSize 40960000

$ zmprov modifyConfig zimbraFileUploadMaxSize 40960000

5. Usually overall message size will be bigger because each message may consist multiple upload files or attachment. In this case we will configure zimbraMailContentMaxSize parameter to 100MB :

$ zmprov modifyConfig zimbraMailContentMaxSize 102400000

6. Check the result of above command :

$ postconf | grep message_size_limit

message_size_limit = 40960000

7. How to set the Maximum Message and Upload Size to 40MB per server and overall message size to 100MB per server :

$ zmprov ms `zmhostname` zimbraFileUploadMaxSize 40960000

$ zmprov ms `zmhostname` zimbraMtaMaxMessageSize 40960000

$ zmprov ms `zmhostname` zimbraMailContentMaxSize 102400000

or

$ zmprov modifyServer mail1.ehowstuff.local zimbraFileUploadMaxSize 40960000

$ zmprov modifyServer mail1.ehowstuff.local zimbraMtaMaxMessageSize 40960000

$ zmprov modifyServer mail1.ehowstuff.local zimbraMailContentMaxSize 102400000

7. In most of the cases, all of above command will take effect automatically. But if the change does not happen after a short period of time, most likely we will need to do postfix reload or full zmcontrol restart :

$ postfix reload

$ zmcontrol restart

Note : Server settings override global setting

 


Ref:

https://webhostinggeeks.com/howto/how-to-adjust-the-zimbra-maximum-message-and-upload-size-via-cli/

Comments

Popular posts from this blog

Disabling Zimbra's AntiSpam, Amavis and AntiVirus filtering

Cambium cnPilot E400/E410/E500 Configuration Tutorial

Error "Unable to retrive Zimbra GPG key for package validation"