Hi there,

On Wed, 3 Nov 2021, Gary R. Schmidt wrote:

On 03/11/2021 22:59, G.W. Haywood via clamav-users wrote:
On Wed, 3 Nov 2021, Gary R. Schmidt wrote:

... doesn't answer the question of how to build on Solaris.

True enough.  Perhaps I should have made it more clear that I was
suggesting that there may be alternatives ...

The OP (and I (and other Solaris/HP-UX/AIX/non-BSD-UNIX users)) have a problem anyway, with ClamAV becoming non-portable in the future, what will we do about scanning email?

It seems obvious that we should just bung a supported VM of some recent vintage somewhere, or sneak a Pi into a rack, and then do it remotely, are there simple recipes out there for how to do it?

I know I could JFGI but a pointer to an accurate one always helps.  :-)

JFGI is a new one to me but I think I get the message. :)

Up until the changeover from Autotools to Cmake it was straightforward
to build on the Pi.

Building the release candidates of ClamAV 0.104 on the Pi did give me
some troubles but it seemed much easier for the most recent rc.  When
I get a minute I'll run through the process on another one of our Pis
which hasn't done it before, and make some notes.  With luck I'll be
able to use the new ClamAV release (due on Nov. 4th) for the exercise.
I've just run through the prerequisites as detailed in

https://docs.clamav.net/manual/Installing/Installing-from-source-Unix.html#ubuntu--debian

and

https://docs.clamav.net/manual/Installing/Installing-from-source-Unix.html#adding-new-system-user-and-group

which is basically just this script:

8<----------------------------------------------------------------------
#!/bin/bash
sudo groupadd clamav
sudo useradd -g clamav -s /bin/false -c "Clam Antivirus" clamav
sudo apt-get update && apt-get install -y \
  gcc make pkg-config python3 python3-pip python3-pytest valgrind \
  check libbz2-dev libcurl4-openssl-dev libjson-c-dev libmilter-dev \
  libncurses5-dev libpcre2-dev libssl-dev libxml2-dev zlib1g-dev
python3 -m pip install --user cmake
8<----------------------------------------------------------------------

That should have set up the build environment ready for 'tar xzvf...'.
No issues so far.  This was on an approximation to Raspian Bullseye, I
used 'script' to record the session in case later we find oddities...

Once you have it built it's just a matter of configuring a TCP port on
which clamd will listen and pointing the scanner processes to it.  If
you run a filesystem scan that is clamdscan of course, not clamscan.
If it's mail, and you'd normally be using a milter, then assuming the
milter can use TCP for connections to the scanner just configure the
milter to use the same TCP socket.  If it can't (or it isn't a milter)
you'll likely need to work through the docs.

To be able to use a milter written in C, Sendmail needs its libmilter
library to be built.  The upstream source by default doesn't build it
so you just have to tweak the configuration before building (and you
might need to mess about to get pthread support).  For the details on
Postfix, Exim etc. I'm afraid I'm not up to date.  There's a choice of
several milters.  Clamav-milter is supplied with the ClamAV tarball,
works with Sendmail, and can use TCP, but I'm not sure on the status
of its support.  At one time I thought it was part of what you might
call the ClamAV suite, but the current Website seems to be saying that
it's considered to be third-party software.  Our homebrew milters are
written in Perl, as I've mentioned here in the past; they'd be way OTT
for most people but if all else failed I'd be able to publish a simple
one.  The Perl milters don't need the libmilter library to communicate
with Sendmail, they use a Perl module for that.  It's the development
version of Sendmail::PMilter, which is available from CPAN:

https://metacpan.org/release/GWHAYWOOD/Sendmail-PMilter-1.20_03/view/lib/Sendmail/PMilter.pm

We've been using more or less that version for several years.  Older
versions suffer from several issues and shouldn't be used in new work.

HTH

--

73,
Ged.

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml

Reply via email to