I noticed the /var/spool/qscan/quarantine folders on our servers were growing pretty fast and then learned that quarantined files are not cleaned up automatically. Would it be a good idea to add a cronjob like /etc/cron.daily/qmail-scanner-quarantine-cleanup with the following to the qmail-scanner package?
#!/bin/sh
#
# Remove all files quarantined by qmail-scanner that were created more than 7 days ago
/usr/bin/find /var/spool/qscan/quarantine -type f -ctime +7 -exec rm -f {} \;
Or maybe even make the cleanup time configurable in /etc/qmail-scanner.ini?
Yeah thats what I was thinking of adding it to. It already has a contrib dir for things like that. I'd add it in now, I'm not sure how soon we'll be able to get an update out. I've still got to clean up the mysql back end for ASL to get it out by the 23rd.
I have Art's qmail-scanner, spamassassin and clamav installed. In my /etc/logrotate.d folder there is a file named "qmail-scanner". It contains the following:
/var/spool/qscan/qmail-queue.log {
#Shove this in as /etc/logrotate.d/qmail-scanner
missingok
create 0600 qscand qscand
daily
rotate 1
postrotate
/var/qmail/bin/qmail-scanner-queue.pl -z
/usr/bin/find /var/spool/qscan/quarantine -type f -mtime +7 -exec /bin/rm -rf {} \;
endscript
}
This keeps my qmail-queue log rotated daily and removes the quarantined files over 7 days old whick keeps the folders relatively small.
I would guess this file was installed when qmail-scanner was installed because I know that I did not install myself. Could this be what you are asking for breun?
That is correct. The default was 30 when I first found this script. When I read your original post ( just like when I read all revelant posts ), I checked on my servers for what you were talking about. The folders were large but not overwhelmed so I knew "something" was cleaning them. Then I found this script, I wasn't for sure it the script keeping the folders clean, so I changed the clean up time to make sure it was working BEFORE I posted my comment. Just my way of making sure I do not post misleading or inaccurate comments.