An AppleScript to integrate clamscan and Apple Mail

Sep 29, '05 06:18:00AM

Contributed by: genericuser

I've been using clamscan (part of the Clam Anti Virus package; OS X version available via Fink) and Apple's Mail for quite a while now. However, I never really had an 'elegant' way of scanning my emails -- I'd scan my entire email folder as a crontab item:

/sw/bin/clamscan --recursive --move=/Users/*username*/.Trash/ \
 --log=/var/Log/Clamscan.log /Users/*username*/Library/Mail/
This meant that, although the job would be done, the same files would be rescanned, making for an inefficient process. All that changed after I found Joseph Sacco's AppleScript. Although the script was designed to be used with ClamAVScan, it works well with clamav. This modified code works with the Fink-installed version of clamscan.

[robg adds: I haven't tested this one. I also went looking for a page to link to that had Joseph Sacco's AppleScript on it, but the best I could find was this entry on a mailing list archive. If there's a better reference, please let me know.]

Comments (7)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20050927050215641