在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 ~]#
————-
/usr/lib/postfix/main.cf
/etc/postfix/main.cf
然后编辑“/etc/postfix/main.cf”,修改or添加message_size_limit项(注意它和mailbox_size_limit的区别!)
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.
Mutt一次发送多个附件的方法:
注意不是 -a 1.zip 2.zip
《 “[solved]Postfix : Fix error "fatal: root(0): message file too big"” 》 有 4 条评论
利用grok解析postfix日志的Logstash配置文件
https://github.com/whyscream/postfix-grok-patterns
Postfix安全加固和隐私配置指南
http://www.4hou.com/technology/4443.html
https://linux-audit.com/postfix-hardening-guide-for-security-and-privacy/
修改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/
自有域名Email转发利器
https://www.coder4.com/archives/6020
https://improvmx.com/
`
自己改一下dns,就可以把邮件转发到你的已有邮箱,都不需要自己搭建邮件服务器了。
`