/var/spool/postfix/maildrop occupies a lot of space in Linux

Source: Internet
Author: User

Summary

There is no special service running on the host, so no monitoring alarm is added. This sudden execution of a command cannot be realized because the disk is slow. The error was found because the directory was /var/spool/postfix/mailfdrop too large to cause.

By understanding the discovery because:

由于 Linux 在执行 cron 时,会将 cron 执行脚本中的 output 和 warning 信息,都会以邮件的形式发送 cron 所有者, 而由于客户环境中的 sendmail 和 postfix 没有正常运行,导致邮件发送不成功,全部小文件堆积在了 maildrop 目录下面,而且没有自动清理转换的机制,所以长达一年的时间,此目录已堆积了大量的文件。查看 man cron 的信息,可以知道会发送给 cron owner.
The way to solve

The temporary solution is, of course, emptying the folder

cd /var/spool/postfix/maildroprm -rf *

But it was temporarily deleted and will appear later. So we need to eliminate this problem from the source again.
We know through the above introduction that some of the script's output is sent to the script performer when Crontab performs a timed task. If we do not care about the type of notes such as output, we can completely let it output to /dev/null this will not because the sending failed to cause the /var/spool/postfix/maildrop output of what file below.

Suggestions:
*/10 * * * * /tmp/test.sh >/dev/null 2>&1

After the modification, observe that the directory found no new file generated.

/var/spool/postfix/maildrop occupies a lot of space in Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.