[solved]Postfix : Fix error "fatal: root(0): message file too big"


在Ubuntu 12.04上使用的是postfix作为邮件服务器,但是刚装好之后用mutt发邮件就报错:Postfix : Fix error “fatal: root(0): message file too big”

在网上找到了解决方法,在此记录一下:

[root@unixh4cks ~]# tail /var/log/maillog
Mar 21 06:30:04 unixh4cks postfix/sendmail[1775]: fatal: root(0): message file too big
Mar 21 06:30:04 unixh4cks postfix/pickup[1579]: EEE7723514: uid=0 from=<root>
Mar 21 06:30:04 unixh4cks postfix/cleanup[1779]: EEE7723514: message-id=<[email protected]>
Mar 21 06:30:04 unixh4cks postfix/qmgr[1062]: EEE7723514: from=<[email protected]>, size=891, nrcpt=1 (queue active)
Mar 21 06:30:05 unixh4cks postfix/local[1781]: EEE7723514: to=<[email protected]>, orig_to=<root>, relay=local, delay=0.06, delays=0.04/0.01/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox)
Mar 21 06:30:05 unixh4cks postfix/qmgr[1062]: EEE7723514: removed
Mar 21 18:45:50 unixh4cks postfix/postdrop[3791]: warning: uid=0: File too large
Mar 21 18:45:50 unixh4cks postfix/sendmail[3790]: fatal: root(0): message file too big
Mar 21 18:51:39 unixh4cks postfix/postdrop[3844]: warning: uid=0: File too large
Mar 21 18:51:39 unixh4cks postfix/sendmail[3843]: fatal: root(0): message file too big
[root@unixh4cks ~]#
一种解决办法是在命令行中设定postfix的message_size_limit值(但在系统重启后会失效)
[root@unixh4cks ~]# postconf -e “message_size_limit = 20480000” #需要注意的一点是配置文件中的mailbox_size_limit 需要比message_size_limit大
[root@unixh4cks ~]#
————-

另一种解决方法(修改配置文件)
# find / -name main.cf
/usr/lib/postfix/main.cf
/etc/postfix/main.cf
然后编辑“/etc/postfix/main.cf”,修改or添加message_size_limit项(注意它和mailbox_size_limit的区别!)
两种方法,在修改了之后都要记得重启postfix服务,否则不会立即生效!
# service postfix restart
Postfix Configuration Parameters http://www.postfix.org/postconf.5.html
mailbox_size_limit (default: 51200000)
The maximal size of any local(8) individual mailbox or maildir file, or zero (no limit). In fact, this limits the size of any file that is written to upon local delivery, including files written by external commands that are executed by the local(8) delivery agent.This limit must not be smaller than the message size limit.

message_size_limit (default: 10240000)

The maximal size in bytes of a message, including envelope information.

Note: be careful when making changes. Excessively small values will result in the loss of non-delivery notifications, when a bounce message size exceeds the local or remote MTA’s message size limit.

它们都是以“字节-Byte”为单位的!

Mutt一次发送多个附件的方法:
可以多次使用-a参数。
比如 -a 1.zip -a 2.zip
注意不是 -a 1.zip 2.zip
, , ,

《 “[solved]Postfix : Fix error "fatal: root(0): message file too big"” 》 有 4 条评论

  1. 修改Linux用户的邮件地址

    参考解答:
    #方法一【测试成功】
    $ vim ~/.forward
    [email protected]
    $ sudo service postfix restart

    #方法二【未测试】
    $ sudo vim /etc/aliases
    root: [email protected], [email protected] #在末尾添加这一行,可以指定多个收件地址
    $ sudo newaliases
    $ sudo service postfix restart

    https://github.com/chassing/linux-sysadmin-interview-questions#-simple-linux-questions
    http://unix.stackexchange.com/questions/26666/can-i-change-roots-email-address-or-forward-it-to-an-external-address
    https://anandarajpandey.com/2014/09/10/how-to-change-default-root-email-address-linux-postfix-centos/

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注