From 764d1f5ec7422c647ad441843f64811e9bd92ba6 Mon Sep 17 00:00:00 2001 From: Zhang Huangbin Date: Fri, 14 Aug 2015 09:07:26 +0800 Subject: [PATCH] Update Postfix 'mailbox_size_limit' also while changing mail attachment size. --- en_US/howto/1-change.mail.attachment.size.md | 8 ++++++-- html/change.mail.attachment.size.html | 8 ++++++-- html/zh_CN/change.mail.attachment.size.html | 7 ++++++- zh_CN/howto/1-change.mail.attachment.size.md | 7 ++++++- 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/en_US/howto/1-change.mail.attachment.size.md b/en_US/howto/1-change.mail.attachment.size.md index 8acbcfd0..0b33b76e 100644 --- a/en_US/howto/1-change.mail.attachment.size.md +++ b/en_US/howto/1-change.mail.attachment.size.md @@ -9,11 +9,12 @@ To change mail attachment size, we have to change 3 settings. Postfix is MTA, so we have to change its setting to transfer mail with large attachment. -For example, to allow mail with 100Mb attachment, please change `message_size_limit` setting -like below: +For example, to allow mail with 100Mb attachment, please change both +`message_size_limit` and `mailbox_size_limit` settings like below: ``` # postconf -e message_size_limit='104857600' +# postconf -e mailbox_size_limit='104857600' ``` Restart postfix to make it work: @@ -28,6 +29,9 @@ __NOTES__: * Mail will be encoded by mail user agent (Outlook, Thunderbird, etc) before transferred, the actual message size will be larger than 100MB, you can simplily increase above setting to 110Mb or 120Mb to make it work as expected. +* If `mailbox_size_limit` is smaller than `message_size_limit`, you will get + error message in Postfix log file like this: `fatal: main.cf configuration + error: mailbox_size_limit is smaller than message_size_limit`. If you use mail clients such as Outlook, thunderbird to send mails, it's now ok to sent large attachment with above setting. diff --git a/html/change.mail.attachment.size.html b/html/change.mail.attachment.size.html index 971fea11..67039133 100644 --- a/html/change.mail.attachment.size.html +++ b/html/change.mail.attachment.size.html @@ -29,9 +29,10 @@

Change message size limit in postfix

Postfix is MTA, so we have to change its setting to transfer mail with large attachment.

-

For example, to allow mail with 100Mb attachment, please change message_size_limit setting -like below:

+

For example, to allow mail with 100Mb attachment, please change both +message_size_limit and mailbox_size_limit settings like below:

# postconf -e message_size_limit='104857600'
+# postconf -e mailbox_size_limit='104857600'
 

Restart postfix to make it work:

@@ -44,6 +45,9 @@ like below:

  • Mail will be encoded by mail user agent (Outlook, Thunderbird, etc) before transferred, the actual message size will be larger than 100MB, you can simplily increase above setting to 110Mb or 120Mb to make it work as expected.
  • +
  • If mailbox_size_limit is smaller than message_size_limit, you will get + error message in Postfix log file like this: fatal: main.cf configuration + error: mailbox_size_limit is smaller than message_size_limit.
  • If you use mail clients such as Outlook, thunderbird to send mails, it's now ok to sent large attachment with above setting.

    diff --git a/html/zh_CN/change.mail.attachment.size.html b/html/zh_CN/change.mail.attachment.size.html index b5bcf170..f60ade6a 100644 --- a/html/zh_CN/change.mail.attachment.size.html +++ b/html/zh_CN/change.mail.attachment.size.html @@ -28,8 +28,10 @@

    要修改邮件附件大小,需要修改三个地方。

    修改 postfix 中邮件大小的设置

    Postfix 是一个邮件传送代理(MTA),因此,要修改配置以使它能传送大附件的邮件。

    -

    假设要修改附件大小为 100MB,需对 message_size_limit 做如下修改:

    +

    假设要修改附件大小为 100MB,需对 message_size_limitmailbox_size_limit +做如下修改:

    # postconf -e message_size_limit='104857600'
    +# postconf -e mailbox_size_limit='104857600'
     

    之后重启 Postfix 服务,使上述修改生效:

    @@ -41,6 +43,9 @@
  • 104857600 是由 100 (MB) x 1024 (KB) x 1024 (Bit) 计算得到的结果。
  • 邮件在发送前会被客户端(Outlook,Thunderbird等)重新编码,导致邮件大小会超过 100MB,所以建议将上述设置中的邮件大小改为 110MB 或 120MB 即可。
  • +
  • 如果 mailbox_size_limit 的值比 message_size_limit 小,你会在 Postfix 日志 + 文件里看到这样的错误信息:fatal: main.cf configuration error: + mailbox_size_limit is smaller than message_size_limit.
  • 这样你就可以通过客户端正常发送邮件了。

    修改 Roundcube 网页邮箱的附件上传大小

    diff --git a/zh_CN/howto/1-change.mail.attachment.size.md b/zh_CN/howto/1-change.mail.attachment.size.md index d17e6149..01ed5ebc 100644 --- a/zh_CN/howto/1-change.mail.attachment.size.md +++ b/zh_CN/howto/1-change.mail.attachment.size.md @@ -8,10 +8,12 @@ Postfix 是一个邮件传送代理(MTA),因此,要修改配置以使它能传送大附件的邮件。 -假设要修改附件大小为 100MB,需对 `message_size_limit` 做如下修改: +假设要修改附件大小为 100MB,需对 `message_size_limit` 和 `mailbox_size_limit` +做如下修改: ``` # postconf -e message_size_limit='104857600' +# postconf -e mailbox_size_limit='104857600' ``` 之后重启 Postfix 服务,使上述修改生效: @@ -25,6 +27,9 @@ __注意__: * `104857600` 是由 100 (MB) x 1024 (KB) x 1024 (Bit) 计算得到的结果。 * 邮件在发送前会被客户端(Outlook,Thunderbird等)重新编码,导致邮件大小会超过 100MB,所以建议将上述设置中的邮件大小改为 110MB 或 120MB 即可。 +* 如果 `mailbox_size_limit` 的值比 `message_size_limit` 小,你会在 Postfix 日志 + 文件里看到这样的错误信息:`fatal: main.cf configuration error: + mailbox_size_limit is smaller than message_size_limit`. 这样你就可以通过客户端正常发送邮件了。