I have one user on my system who receives a LOT of spam. This is intentional as that user is set to never discard email once it is received. I scan the spam and let it auto-expire out of the IMAP folder after 7 days. The trouble is, in those 7 days, the folder usually grows to between 1500 and 3000 messages, and my sa-learn on that folder simply grinds the machine down to a crawl. I've set the sa- learn to process this folder in the middle of the night, but it is still problematic and interferes with other late-night processes. It has even, on occasion, necessitated a reboot when i could not get the system to kill the process. I've taken to trying to scan it daily and manually delete the spam, but that's not always possible.

The trouble appears to me to be that sa-learn has no concept of whether or not it has learned a message or not. Since all IMAP messages are stored with unique names, is there some easy way to create a cache of the messages it has checked and have it ignore those messages?

I suppose I could do something like:

find $HOME/Maildir/.SPAM/{cur,new} -type f -ctime -1 -exec /usr/local/ bin/sa-learn --spam {} \;

??

--
These budget numbers are not just estimates, these are the actual
        results for the fiscal year that ended February the 30th.
        - GWB

Reply via email to