为何linux系统/var/spool/postfix/maildrop目录有大量文件,占据大量系统磁盘空间分析以及处理

为何linux系统/var/spool/postfix/maildrop目录有大量文件,占据大量系统磁盘空间分析以及处理

Most of the mails in /var/spool/postfix/maildrop directory are system generated. Hence even though postfix is disabled or stopped you may have thousands of mails in it. Most of the mails (99%) are generated due to crontab. When any job is executed and the jobs cannot run normally it will send an email to root. You can set MAILTO=”” variable at the start of your crontab file. This will also disable email alert. Edit/Open your cron jobs: $ crontab -e At the top of the file, enter: MAILTO=""

下面是删除/var/spool/postfix/maildrop/空间实测代码:

[root@iZ25ja2kaemZ ~]# df -h

Filesystem      Size  Used Avail Use% Mounted on

/dev/vda1        20G   19G  570M  98% /

tmpfs           499M     0  499M   0% /dev/shm

/dev/vdb1        20G  8.9G  9.9G  48% /newdata

[root@iZ25ja2kaemZ ~]#  rm -f /var/spool/postfix/maildrop/  #有时候文件太多一次性删除会报错,可以分批 rm -f /var/spool/postfix/maildrop/1*,rm -f /var/spool/postfix/maildrop/2*,以及../A*,...../B*等

[root@iZ25ja2kaemZ maildrop]# df -h

Filesystem      Size  Used Avail Use% Mounted on

/dev/vda1        20G  5.7G   14G  31% /

tmpfs           499M     0  499M   0% /dev/shm

/dev/vdb1        20G  8.9G  9.9G  48% /newdata

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容