amavisd 的 quarantine 目錄.

今天發現系統無法收信, 本來以為是鳥鳥的 dovecot 又鳥掉了, 沒有想到最後檢查的結果是系統的 HDD 爆了.
怎麼爆的呢?
直覺就是先查 /usr/portage/distfiles, 砍完了才多 50MB, 想必不是 package download 太多.

接下來就直接在 /var 下
[BASH]
$ du –maxdepth=1 -h
[/BASH]

果然查到 amavis 佔了所有其他的空間呀~~ ~~

其中有二個目錄 tmp 和 quarantine, 這二個似乎會存很多檔案下來.

目前似乎沒有什麼好的解決方案,
是有看到有一篇文章(Amavis quarantine cleanup)是用 crontab 硬幹, 不知道有沒有更好的解法? (寫在 /etc/cron.weekly/ ?)

[BASH]
#### delete qurantained Virus-eMails older than 30 days ####
10 2 * * * find /var/amavis/tmp/ -mtime +31 -exec rm -r {} \;
15 2 * * * find /var/amavis/quarantine/ -mtime +31 -exec rm {} \;
[/BASH]

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>