How can we help?


attachment file size limit

Stewart -


How can I set the atmail suite attachment file size limit?


  • atmail suite


Users unable to upload certain size files. This guide advises setting a maximum attachment size of 25MB which what most receiving MTA's will accept.


Update NginX

  1. Open your atmail.conf for NginX
    [root@mydomain ~]# vim /etc/nginx/conf.d/atmail.conf
  2. Add the client_max_body_size variable to the server block as seen below. In this example, the limit is set to 25MB, you can set this limit at your digression. Note that NginX denotes MB as m.
    server_name _;

    error_log /var/log/nginx/atmail_error;
    access_log /var/log/nginx/atmail_access;

    gzip on;
    gzip_types text/plain application/xml application/json application/javascript text/css;

    ssl_certificate_key  /etc/pki/nginx/private/atmail.key;
    ssl_certificate      /etc/pki/nginx/certs/atmail.pem;
    #       ssl_trusted_certificate /etc/pki/nginx/certs/letsencrypt_ca.pem;

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;

    client_max_body_size 25m;
  3. Test NginX configuration and restart to make changes take effect.
    [root@mydomain ~]# nginx -t
    nginx: [warn] "ssl_stapling" ignored, issuer certificate not found
    nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
    nginx: configuration file /etc/nginx/nginx.conf test is successful
    [root@mydomain ~]# nginx -s reload
    nginx: [warn] "ssl_stapling" ignored, issuer certificate not found

Update atmail API

  1. Open your atmail api.conf.
    [root@mydomain ~]# vim /etc/atmail/api/api.conf
  2. Update the following variables to your desired limit.
  3. Restart and check your API server.
    [root@mydomain ~]# systemctl restart apiserver
    [root@mydomain ~]# systemctl status apiserver
    ● apiserver.service - atmail-api - jmap api for atmail webmail
       Loaded: loaded (/usr/lib/systemd/system/apiserver.service; enabled; vendor preset: disabled)
      Drop-In: /etc/systemd/system/apiserver.service.d
       Active: active (running) since Fri 2017-08-25 11:51:33 AEST; 2s ago
      Process: 2350 ExecStop=/bin/kill -s QUIT $MAINPID (code=exited, status=0/SUCCESS)
     Main PID: 2353 (apiserver)
       CGroup: /system.slice/apiserver.service
               └─2353 /usr/bin/apiserver -config /etc/atmail/api/api.conf

    Aug 25 11:51:33 systemd[1]: apiserver.service: main process exited, code=exited, sta...MENT
    Aug 25 11:51:33 systemd[1]: Unit apiserver.service entered failed state.
    Aug 25 11:51:33 systemd[1]: apiserver.service failed.
    Aug 25 11:51:33 systemd[1]: Started atmail-api - jmap api for atmail webmail.
    Aug 25 11:51:33 systemd[1]: Starting atmail-api - jmap api for atmail webmail...
    Hint: Some lines were ellipsized, use -l to show in full.

Have more questions? Submit a request


Contact our support team

+61 (7) 5357 6605