Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

An AppleScript to integrate clamscan and Apple Mail Apps
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.]
  • Currently 2.00 / 5
  You rated: 5 / 5 (4 votes cast)

An AppleScript to integrate clamscan and Apple Mail | 7 comments | Create New Account
Click here to return to the 'An AppleScript to integrate clamscan and Apple Mail' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An AppleScript to integrate clamscan and Apple Mail
Authored by: Mucho Grande on Sep 29, '05 07:01:23AM

I've been using this:
which seems to be working well. When I was using it, it wasn't using the latest version of clamscan, but the documentation on the website gives you enough information to get that working.

[ Reply to This | # ]
An AppleScript to integrate clamscan and Apple Mail
Authored by: cmpanas on Sep 29, '05 07:04:28AM

Is there something different you have to do rather than just set the prefs to check for the latest ClamAV engine and ClamXav?

[ Reply to This | # ]
An AppleScript to integrate clamscan and Apple Mail
Authored by: Mucho Grande on Oct 03, '05 03:13:14AM

Sorry, I should have wrote a little more on that.

I use calmXav, and use it's sentry to monitor my email directory.

Also, to get the latest version of clamav to work with clamXav, I downloaded the version from the clamav website, and compiled it according to the instructions on the clamXav application. When you first install clamXav, it asks if you want to install the version of clamav that comes packaged with clamXav. If you choose not to, it will give you the commands to install clamav for clamXav. From memory, you just have to change the installation path.

And that should be it.

I found that clamXav's sentry, doesn't like the clamav executables anywhere other than where clamXav itself would install them.

Hope this helps.

[ Reply to This | # ]
An AppleScript to integrate clamscan and Apple Mail
Authored by: mark hunte on Sep 29, '05 07:41:16AM
Found this link the download is the ' clamAVscan 1.0' at the top of the page. but here it is also


[ Reply to This | # ]

An AppleScript to integrate clamscan and Apple Mail
Authored by: dave1212 on Sep 29, '05 04:34:09PM

ok.. I can see this being useful if it were for SpamAssassin or another junk mail program, but antivirus?

You're just slowing down your machine for no good reason. Unless it's passing your internet connection to a Windows box, you're wasting cycles and time with this.

It's nice to have the instructions on hand, however, for when the first Mac OS X virus does hit. After all, it's inevitable, but until that day (and it will be broadcast far and wide) I refuse to waste my time downloading updates, scanning files, and possibly making my machines more unstable than they need to be.

[ Reply to This | # ]
questioning the value of anti-virus software on Macs
Authored by: sjk on Sep 29, '05 05:29:46PM

I agree. The only Windows viruses on my Macs have come through spam and are always effectively quarantined by SpamAssassin alone.

Unless a Mac is somehow a redistribution point for Windows viruses, or until an OS X virus exists in the wild, it seems unnecessary to run anti-virus software on it. And I expect news about the first OS X virus will propagate faster than an anti-virus update for it.

[ Reply to This | # ]
Alternative "elegant" solution?
Authored by: TicToc on Oct 01, '05 04:29:54PM
You could try using pop3proxy, available from Darwinports (not sure if it's also available via FInk).

I chain together Entourage, POPFile pop3proxy and clamd to give me complete spam & virus checking email combination. Entourage requests its email from POPFile, which passes on the request to pop3proxy. pop3proxy collects the email from my ISP, and passes it to clamd for checking before passing it back to POPFile for classification. I then have a couple of simple rules in Entourage to file messages appropriately.

Although I don't use Apple Mail, I see no reason why this solution shouldn't work for you, as pop3proxy appears to your mail app (or spam filter, in my case) as a pop3 server.

Hope this is useful to somebody. If there's any need, I could write it up as a separate hint - I've been leeching here for long enough!

[ Reply to This | # ]