help centre
For more info visit status.atmail.com

How can we help?


Search our knowledge base for answers to
common questions and latest updates.



My activities New request

Follow

attachment file size limit

Stewart -

PROBLEM

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

ENVIRONMENT

  • atmail suite

CAUSE

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.

RESOLUTION

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;
    ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';

    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.
    MAX_UPLOAD=25000000
    MAX_ATTACHMENT=25000000
  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
               └─depends.conf
       Active: active (running) since Fri 2017-08-25 11:51:33 AEST; 2s ago
         Docs: http://www.atmail.com/
      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 mydomain.party systemd[1]: apiserver.service: main process exited, code=exited, sta...MENT
    Aug 25 11:51:33 mydomain.party systemd[1]: Unit apiserver.service entered failed state.
    Aug 25 11:51:33 mydomain.party systemd[1]: apiserver.service failed.
    Aug 25 11:51:33 mydomain.party systemd[1]: Started atmail-api - jmap api for atmail webmail.
    Aug 25 11:51:33 mydomain.party 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

Comments


Contact our support team


+61 (7) 5357 6605       support@atmail.com