Your /opt/inisight/var/virusmails directory can grow quite large over time. The maintenance (purging) of this directory is designed to be managed by the systems administrators. There are potential company policies on email retention that may include items in these directories and in some cases, local law regulates what can be purged from the server. There are ways you can "automate" purging the virusmails folder using cron.
Open a command line terminal and log in as root
Edit your crontab by typing: # crontab -e <enter>
Move your cursor to the bottom line of the crontab and hit "o" to start a new "insert" line.
Type in the following: 3 0 * * * find /opt/insight/var/virusmails/ -mtime +30 -type f -exec rm -f {} \;
Press "ESC" followed by "Shift :wq" <enter> to "write" and "quit" the crontab edit.
The contents of this entry into the crontab are as follows:
The first entry - the number "3" represents minutes within the hour - i.e. 3 minutes after the hour.
The second entry is the hour. This figure is in 24 hour format with 0 being midnight, 1 being 1AM on through to 23 being 11PM.
The third entry (represented by an *) is the day of the month with values ranging from * (wild card meaning every day), to 1 through 31.
The fourth entry is the month. As in the previous entry an * is a wild card meaning every month. The acceptable values are *, 1 - 12.
The fifth entry is the day of the week. Acceptable values are *, 0 - 6 (0 = Sunday, 1 = Monday, etc.).
The "find" command searches for files within a directory.
The next entry is the literal path where the quarantined items are - it is important to use literal paths instead of relative paths when using cron.
The "-mtime +30" flag is used in conjunction with the "find" command to identify the items that have not been modified in 30 days or more.
The "-type f" flag is also used in conjunction with the "find" command to determine that the item is a regular file type.
The "exec rm -f" string tells cron to "execute" the "rm -f" command, or the "remove" command with the "force (-f)" flag.
The last items in the string, "{} \;" ends the command string properly.