iredmail修改附件大小

iredmail修改附件大小

OWLSAMA
1年前发布

iredmail安装完成后默认的附件大小为10Mb,

需要修改的地方主要是以下几处:
1、php-fpm(webmail);
2、postfix(邮件服务器);
3、nginx(web)
4、roundcube配置

1、修改php上传限制
vi /etc/php/7.4/fpm/php.ini
修改以下2处,upload_max_filesize和post_max_size,需要注意的是post_max_size大于等于upload_max_filesize。

upload_max_filesize = 1024M;
post_max_size = 1200M;

2、修改postfix附件大小限制

postconf -e message_size_limit='1073741824'
postconf -e mailbox_size_limit='1073741824'

3、修改roundcube配置
修改roundcube目录下.htaccess文件

vi /opt/www/roundcubemail/.htaccess 

添加配置

php_value    memory_limit   1500M
php_value    upload_max_filesize    1024M
php_value    post_max_size  1200M

4、修改nginx配置
通过查看nginx的配置文件可知,iredmail安装后已经把body size配置单独拎出来了,直接修改即可

vi /etc/nginx/conf-enabled/client_max_body_size.conf 

修改client_max_body_size大小
client_max_body_size 1024m;

5、查看roundcube配置

vi /opt/www/roundcubemail/config/config.inc.php

$config['max_message_size'] = '1366M';
roundcube是取max_message_size的75%作为附件大小限制,那么我们想限定附件大小1024M,设为1366M即可。

6、重启服务
重启php

service php7.4-fpm restart

重启postfix

/etc/init.d/postfix restart

nginx重载配置

/usr/sbin/nginx -s reload
© 版权声明
THE END
喜欢就支持一下吧
点赞 0 分享 收藏
评论 抢沙发
OωO
取消