cannot update mailbox /var/mail/root for user root. error writing messa ge: File too large

简介:

cannot update mailbox /var/mail/root for user root. error writing messa

ge: File too large


1 postfix 作为邮件服务器时,当然这里应用的不是虚拟用户,出现用户只能发送Email 而不能接受


Email 的问题,在其日志中出现如下


cannot update mailbox /var/mail/root for user root. error writing message: File too large


2  该问题主要原因是因为在postfix配置文件main.cf.default


mailbox_size_limit = 51200000(50M)


也就是说当用户的对应的/var/mail/USERNAME 文件的大小不能超过50M 如果超出该值时可能会出现只能


发送不能接受的情况,


3 解决办法


第一种方法, 是清空用户对应的文件,当然也可以创建一个脚本,让其自动                      清


空对应的文件


echo “”>/var/mail/USERNAME


第二种方法,是重新设置 postfix main.cf.default 配置文件中对应


mailbox_size_limit=51200000


修改为


mailbox_size_limit=0


把值改为零的情况下,就是不限制


4  在修改完postfix maincf.deafault 配置文件时,需要重新加载postfix


#service  postfix  reload





查看postfix設定:

[root@mail ~]# postconf -n|grep limit

default_process_limit = 100

mailbox_size_limit = 0

message_size_limit = 20480000

smtpd_hard_error_limit = 999

smtpd_soft_error_limit = 999

mailbox_size也沒有限制大小。但怎麼會超過2G就禁止讀取了呢?


百度得知一個方法,修改postfix主配置文件main.cf

mailbox_command = /usr/bin/procmail -Y -a $DOMAIN

重新載入配置文件。再次收取郵件,成功了。。。。

-Y Berkeley format mailbox, disregard Content-Length:

-a argument     will set $1, $2, etc




 以前一直能收能发,只是过一段时间需要手工删除/var/amavis/tmp下面的文件(不知怎么不能自动删


除),现在突然出问题了 以前一直能收能发,只是过一段时间需要手工删除/var/amavis/tmp下面的文


件(不知怎么不能自动删除),现在突然出问题了


本文转自 32氪 51CTO博客,原文链接:http://blog.51cto.com/10672221/1951297


相关文章
|
3月前
|
安全 网络安全 数据安全/隐私保护
auth required pam_tally2.so file=/var/log/tallylog onerr=fail deny=3 unlock_time=300 even_deny_root root_unlock_time=300 什么作用?
【8月更文挑战第2天】auth required pam_tally2.so file=/var/log/tallylog onerr=fail deny=3 unlock_time=300 even_deny_root root_unlock_time=300 什么作用?
48 1
|
3月前
|
安全 网络安全 数据安全/隐私保护
auth required pam_tally2.so file=/var/log/tallylog onerr=fail deny=3 unlock_time=300 even_deny_root root_unlock_time=300 什么作用
【8月更文挑战第14天】auth required pam_tally2.so file=/var/log/tallylog onerr=fail deny=3 unlock_time=300 even_deny_root root_unlock_time=300 什么作用
79 0
|
5月前
|
Shell 应用服务中间件 Linux
已解决:Cannot find ./catalina.sh The file is absent or does not have execute permission This file is ne
已解决:Cannot find ./catalina.sh The file is absent or does not have execute permission This file is ne
62 0
|
Ubuntu 数据安全/隐私保护
All data created during this guest session will be deleted when you log out 问题的解决
All data created during this guest session will be deleted when you log out 问题的解决
157 0
|
存储 关系型数据库 MySQL
The user specified as a definer (‘root‘@‘%‘) does not exist
The user specified as a definer (‘root‘@‘%‘) does not exist
125 0
|
Unix 应用服务中间件 nginx
安装nginx:src/os/unix/ngx_user.c:26:7: error: ‘struct crypt_data’ has no member named ‘curren
安装nginx:src/os/unix/ngx_user.c:26:7: error: ‘struct crypt_data’ has no member named ‘curren
989 0
安装nginx:src/os/unix/ngx_user.c:26:7: error: ‘struct crypt_data’ has no member named ‘curren
|
关系型数据库 MySQL
The user specified as a definer (‘root‘@‘%‘) does not exist(已解决)
The user specified as a definer (‘root‘@‘%‘) does not exist(已解决)
785 0
The user specified as a definer (‘root‘@‘%‘) does not exist(已解决)
|
应用服务中间件 nginx
[error] OpenEvent(“Global\ngx_reload_11812“) failed (2: The system cannot find the file specified
[error] OpenEvent(“Global\ngx_reload_11812“) failed (2: The system cannot find the file specified
|
分布式计算 关系型数据库 Hadoop
         User root is not allowed to impersonate anonymous                     
错误: bymain is not allowed to impersonate hadoop(或者          User root is not allowed to impersonate anonymou...
1751 0
|
JavaScript
解决ecshop出现Warning: file_put_contents
解决ecshop出现Warning: file_put_contents
271 0