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