From 6585384daa6e761126c3aa856a4119fd816687a8 Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Thu, 16 Oct 2014 21:49:28 +0000 Subject: [PATCH] bring the max outgoing mail size via webmail and z-push in line with the limit set in postfix: 128 MB The limit was previously the nginx default (2MB?). fixes #236 --- conf/nginx.conf | 9 ++++++++- setup/mail-postfix.sh | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 92b5de72..b8751bd5 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -52,7 +52,10 @@ server { fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /usr/local/lib/roundcubemail/$fastcgi_script_name; fastcgi_pass php-fpm; - client_max_body_size 20M; + + # Outgoing mail also goes through this endpoint, so increase the maximum + # file upload limit to match the corresponding Postfix limit. + client_max_body_size 128M; } # Z-Push (Microsoft Exchange ActiveSync) @@ -62,6 +65,10 @@ server { fastcgi_param PHP_VALUE "include_path=.:/usr/share/php:/usr/share/pear:/usr/share/awl/inc"; fastcgi_read_timeout 630; fastcgi_pass php-fpm; + + # Outgoing mail also goes through this endpoint, so increase the maximum + # file upload limit to match the corresponding Postfix limit. + client_max_body_size 128M; } location /autodiscover/autodiscover.xml { include fastcgi_params; diff --git a/setup/mail-postfix.sh b/setup/mail-postfix.sh index 4c86b64a..9046952c 100755 --- a/setup/mail-postfix.sh +++ b/setup/mail-postfix.sh @@ -161,6 +161,7 @@ tools/editconf.py /etc/postfix/main.cf \ smtpd_recipient_restrictions=permit_sasl_authenticated,permit_mynetworks,"reject_rbl_client zen.spamhaus.org",reject_unlisted_recipient,"check_policy_service inet:127.0.0.1:10023" # Increase the message size limit from 10MB to 128MB. +# The same limit is specified in nginx.conf for mail submitted via webmail and Z-Push. tools/editconf.py /etc/postfix/main.cf \ message_size_limit=134217728