Update Postfix 'mailbox_size_limit' also while changing mail attachment size.

This commit is contained in:
Zhang Huangbin 2015-08-14 09:07:26 +08:00
parent 3e4c11bfad
commit 764d1f5ec7
4 changed files with 24 additions and 6 deletions

View File

@ -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.

View File

@ -29,9 +29,10 @@
<h2 id="change-message-size-limit-in-postfix">Change message size limit in postfix</h2>
<p>Postfix is MTA, so we have to change its setting to transfer mail with large
attachment.</p>
<p>For example, to allow mail with 100Mb attachment, please change <code>message_size_limit</code> setting
like below:</p>
<p>For example, to allow mail with 100Mb attachment, please change both
<code>message_size_limit</code> and <code>mailbox_size_limit</code> settings like below:</p>
<pre><code># postconf -e message_size_limit='104857600'
# postconf -e mailbox_size_limit='104857600'
</code></pre>
<p>Restart postfix to make it work:</p>
@ -44,6 +45,9 @@ like below:</p>
<li>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.</li>
<li>If <code>mailbox_size_limit</code> is smaller than <code>message_size_limit</code>, you will get
error message in Postfix log file like this: <code>fatal: main.cf configuration
error: mailbox_size_limit is smaller than message_size_limit</code>.</li>
</ul>
<p>If you use mail clients such as Outlook, thunderbird to send mails, it's now
ok to sent large attachment with above setting.</p>

View File

@ -28,8 +28,10 @@
<p>要修改邮件附件大小,需要修改三个地方。</p>
<h2 id="postfix">修改 postfix 中邮件大小的设置</h2>
<p>Postfix 是一个邮件传送代理MTA因此要修改配置以使它能传送大附件的邮件。</p>
<p>假设要修改附件大小为 100MB需对 <code>message_size_limit</code> 做如下修改:</p>
<p>假设要修改附件大小为 100MB需对 <code>message_size_limit</code><code>mailbox_size_limit</code>
做如下修改:</p>
<pre><code># postconf -e message_size_limit='104857600'
# postconf -e mailbox_size_limit='104857600'
</code></pre>
<p>之后重启 Postfix 服务,使上述修改生效:</p>
@ -41,6 +43,9 @@
<li><code>104857600</code> 是由 100 (MB) x 1024 (KB) x 1024 (Bit) 计算得到的结果。</li>
<li>邮件在发送前会被客户端OutlookThunderbird等重新编码导致邮件大小会超过
100MB所以建议将上述设置中的邮件大小改为 110MB 或 120MB 即可。</li>
<li>如果 <code>mailbox_size_limit</code> 的值比 <code>message_size_limit</code> 小,你会在 Postfix 日志
文件里看到这样的错误信息:<code>fatal: main.cf configuration error:
mailbox_size_limit is smaller than message_size_limit</code>.</li>
</ul>
<p>这样你就可以通过客户端正常发送邮件了。</p>
<h2 id="roundcube">修改 Roundcube 网页邮箱的附件上传大小</h2>

View File

@ -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) 计算得到的结果。
* 邮件在发送前会被客户端OutlookThunderbird等重新编码导致邮件大小会超过
100MB所以建议将上述设置中的邮件大小改为 110MB 或 120MB 即可。
* 如果 `mailbox_size_limit` 的值比 `message_size_limit` 小,你会在 Postfix 日志
文件里看到这样的错误信息:`fatal: main.cf configuration error:
mailbox_size_limit is smaller than message_size_limit`.
这样你就可以通过客户端正常发送邮件了。