APLawrence - Information and Resources for Unix and Linux Systems, Bloggers and the self-employed
RSS Feeds Get APLawrence.com by RSS











(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Home > Mac OS X Articles > ClamAV on Mac
Printer Friendly Version




Apple ® section

ClamAV on Mac with Kerio MailServer


I downloaded ClamAV source from http://www.clamav.net. A simple ./configure; make; make install in the source directory was all that was required (thogh you do have to install the Xcode Tools from your install cd if you haven't already).

Well, gosh, that was easy. Now what?

Well, that depends on what you plan to do with it. If you only plan to scan files on your drives, there's nothing else you need. If you are planning to use the supplied "clamav-milter" (see Sendmail Milters),you need to add the milter to your mail configuration (and you would have needed to run "./configure --enable-milter" before compiling). See clamav-milter for very basic instructions on adding this milter to sendmail.

In my case, I wanted to use it with Kerio Mailserver.

Kerio MailServer is able to work with several virus scanning engines. The preferred primary is McAfee, but (depending on your OS platform) other plugins can be used. As of version 6.1, they introduced the ability to do dual scanning, which allows each message to be scanned by two different AV products (one must be their McAfee option). Dual scanning can increase the chances of detecting viri.

Now with the 6.2 release (available in beta as I write this), ClamAV support has been added and can be used either as the stand-alone scanner or as the secondary to McAfee.




To use ClamAV with Kerio MailServer you need to get /usr/local/sbin/clamd running on the Mac (basically the same procedure applys to Linux) . That's going to requre editing (with sudo) two configuration files: /usr/local/etc/clamd.conf and /usr/local/etc/freshclam.conf

ClamAV forces you to at least comment out the "Example" line from these files:

# Comment or remove the line below.
Example

For freshclam.conf that may be all you want or need to do, but at least this made you aware that the file exists and that you do have options to control freshclam. Freshclam is the program that updates Clamav's virus database, so you probably want to set it to run periodically with cron.

You'll need to do a little more with /usr/local/etc/clamd.conf. In addition to commenting out the "Example", you need to set "TCPSocket 3310" and you probably want to set "TCPAddr 127.0.0.1" unless Kerio is running on a different machine than ClamAV.

With these set, you can start /usr/local/etc/clamd. After starting it, you should see it listening on port 3310:

$ sudo /usr/local/sbin/clamd
$ sudo lsof -i:3310
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
clamd 18975 root 0u IPv4 0x2f92e88 0t0 TCP localhost:dyna-access (LISTEN)

Of course you'll want clamd starting up on reboot. It would be best to handle that through Launchd but you could also just add it to /etc/rc if you want. Launchd gives you more control to restart if necessary.

Kerio automatically tests Clam with an EICAR file but you can send the same pattern to a local user if you aren't the trusting sort. I tested, and found the expected entry in the Kerio Security Log:

[31/May/2006 16:53:44] Found virus in mail from <tony@aplawrence.com> to <admin@localhost>: Eicar-Test-Signature

I'm glad to see this support added to Kerio. I think it would have been better if they had implemented milter support because that would allow even more options for Kerio users, but this is a welcome addition.


If this page was useful to you, please click to help others find it:  

Your +1's can help friends, contacts, and others on the web find the best stuff when they search.

Comments?




More Articles by Anthony Lawrence - Find me on Google+



Click here to add your comments



Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



Auto FTP Manager

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.


My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!


book graphic unix and linux troubleshooting guide




 I sell and support
 Kerio Mail server
pavatar.jpg

This post tagged:

       - Kerio
       - Kerio Info
       - Kerio Pricing
       - MacOSX
       - Mail




Unix/Linux Consultants

Skills Tests

Guest Post Here