modoboa / modoboa-webmail

The webmail of Modoboa
MIT License
73 stars 48 forks source link

Attachment upload not possible #128

Closed danielsatanik closed 6 years ago

danielsatanik commented 6 years ago

I don't know how I should explain the issue, but basically I cannot upload any attachments in webmail. The version and extensions are as follows

screen shot 2017-11-12 at 20 38 13

The upload dialog just keeps spinning and looks like that

screen shot 2017-11-12 at 20 46 54

The only error I receive is one in the console

screen shot 2017-11-12 at 20 47 24

kryskool commented 6 years ago

Hi

Have you enable HTTP/2.0 on Nginx or it's by default ?

Regards,

danielsatanik commented 6 years ago

Hi,

just for your information, it was working before, I usually are not using the webmail, so I didn't notice. But it probably stopped working after one of the updates. For completion I add the nginx-conf I'm using for modoboa

upstream modoboa {
    server unix:/run/uwsgi/app/modoboa_instance/socket fail_timeout=0;
}

server {
    listen 80;
    server_name mail.example.com;
    return 307 https://$host$request_uri;
}

server {
    listen 443 ssl http2;
    server_name mail.example.com;
    root /srv/modoboa/instance;

    ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
    ssl_prefer_server_ciphers on;
    ssl_session_cache shared:SSL:10m;
    ssl_ecdh_curve secp384r1;
    ssl_verify_depth 3;
    ssl_dhparam /etc/ssl/certs/dhparam.pem;
    ssl_session_timeout 10m;
    ssl_session_tickets off;
    ssl_stapling on;
    ssl_stapling_verify on;
    resolver 8.8.8.8 8.8.4.4 valid=300s;
    resolver_timeout 5s;

    add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
#   add_header X-Frame-Options DENY;
    add_header X-Content-Type-Options nosniff;

#    client_max_body_size 10M;

    access_log /var/log/nginx/mail.example.com-access.log;
    error_log /var/log/nginx/mail.example.com-error.log;

    location /sitestatic/ {
        try_files $uri $uri/ =404;
    }

    location /media/ {
        try_files $uri $uri/ =404;
    }

    location / {
        include uwsgi_params;
        uwsgi_param UWSGI_SCRIPT instance.wsgi:application;
        uwsgi_pass modoboa;
    }
}
tonioo commented 6 years ago

@danielsatanik HTTP code 413 means "Payload too large". I see you commented the client_max_body_size setting, why? Can you check the size of the document you tried to upload and the maximum allowed size?

danielsatanik commented 6 years ago

Hi,

ok its working when I enable the setting for client_max_body_size, but isn't there an option to show the user a hint, that his file is too big?