ClamAV on Mac with Kerio MailServer
Lovingly developed and religiously updated by the group of open source developers responsible for the cross-platform ClamAV anti-malware application, ClamXav won’t actively scan incoming. Get ClamAV running on Mac OS X (using Homebrew). GitHub Gist: instantly share code, notes, and snippets. Windows Linux BSD Solaris Mac OS X. Windows Packages. ClamAV downloads for Win32. File Modified Size; ClamAV-0.103.0.exe: 2020-09-14 13:32:21 UTC: 33.6 MB: ClamAV-0.103.0.exe.sig. RPMs of new ClamAV versions for existing SuSE products are provided through the respective online update channels.As these packages have to go through QA. Clam AntiVirus (ClamAV) is a free software, cross-platform and open-source antivirus software toolkit able to detect many types of malicious software, including viruses. One of its main uses is on mail servers as a server-side email virus scanner. ClamXav 2.8 opens a new, premium-priced chapter for this storied free Mac antivirus app, but a counterintuitive experience and poor third-party test scores make it difficult to recommend.
© May 2019 Anthony Lawrence
I downloaded ClamAV source from https://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(link dead, sorry)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
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)
$ 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 <[email protected]> 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.
Got something to add? Send me email.
(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version
-> -> ClamAV on Mac
Inexpensive and informative Apple related e-books:
El Capitan: A Take Control Crash Course
Take Control of Numbers
iOS 10: A Take Control Crash Course
Take Control of IOS 11
Photos: A Take Control Crash Course
Clamav Mac Gui
My preferred anti-virus system is ClamAV and I had trouble getting itrunning on macOS recently. Here’s how I got it going so if you’rerunning to the same issue, this should solve your problem.
I will go through the steps I took and problems encountered. Thisarticle will take you less than three minutes to read.
To get ClamAV running on macOS, run:
brew install clamav
Thanks to
brew
, open source software like ClamAV can run on multipleplatforms.Normally, I would just run the application directly, in this case:
clamav
, but that does not exist. The main application is: clamscan
Hmm. What is going on here?
After looking up the man page,
man clamscan
, one related package isfreshclam
, that has a description:freshclam - update virus databases
Aah - let’s run
freshclam
to update the definition!Well, there’s no such file, or where do I get it? Is there a sample somewhere?
Well, it turns out I missed a critical line in the
brew
install, which was:To finish installation & run clamav you will need to editthe example conf files at /usr/local/etc/clamav/
?♂️ whoops! I didn’t even look (and only when writing up this article,I noticed it).
Let’s make the
freshclam.conf
file by running command:Change the following in the file from:
To:
Running the
freshclam
application again results in:![Best open source antivirus Best open source antivirus](/uploads/1/1/7/9/117943588/763607732.jpg)
Great! Now macOS can scan virus too!
I can’t take credit for everything, I found this githubcommentthat basically describes the solution I presented.
I have this article as a way for me to remember but also remind myselfof apps that are better on Linux than macOS.
Getting ClamAV running on macOS isn’t that hard, but I was close togiving up!.
I love using open source software and macOS. As macOS is UNIX based,almost all open source software works on macOS.
There are times where just using Linux to run open source software isa better experience than macOS. ClamAV is one of those times.
Clamav For Mac Review
Hopefully, this post has helped you from giving up on open sourcesoftware!