/ var / pool / postfix / maildropは、Linuxで多くのスペースを占有します



Var Spool Postfix Maildrop Takes Up Lot Space Linux



概要

運用保守ホストは特別なサービスを実行しなかったため、監視アラームは追加されませんでした。ディスクが遅いため、このコマンドの突然の実行は見つかりません。トラブルシューティングは、ディレクトリ/var/spool/postfix/mailfdropが原因です。リードするには大きすぎます。

調査結果を理解することにより:



Since Linux executes cron, it will output the message and warning information in the cron script. The form of the cron owner, and the mail is not working properly due to the normal operation of sendmail and postfix in the client environment The sending was unsuccessful, all the small files piled up under the maildrop directory, and there is no mechanism to automatically clean up the conversion, so up to one In the year, this directory has accumulated a large number of files. View the information of man cron, you can know that it will be sent to the cron owner.

解決

もちろん、一時的な解決策はフォルダを空にすることです。

cd /var/spool/postfix/maildrop rm -rf *

ただし、一時的に削除されており、今後表示される予定です。したがって、この問題をソースから再度停止する必要があります。
上記の紹介により、crontabはスケジュールされたタスクを実行するため、スクリプトの出力をスクリプトエグゼキュータに送信することがわかります。気にしないリマークタイプの出力であれば、完全に/dev/nullに出力させることができます。これは、送信の失敗が原因ではありません。/var/spool/postfix/maildrop以下で作成されるドキュメント。



提案:

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

変更後、ディレクトリを観察し、新しいファイルが生成されていないことを確認します。