Hi there,

On Sat, 20 Feb 2021, Joe Acquisto-j4 wrote:
On Fri, 19 Feb 2021, G.W. Haywood wrote:

 Postfix can use milters, so clamav-milter which comes with ClamAV
might make sense.  . . . .

This is the approach I would like to attempt.
...
... clamav and clamav-milter seem to be runing but are not tied in
to mail flow yet, due to my own lack of knowledge.

For whatever reasons, I am finding it difficult to tease out how to correctly
insert clamav-milter into postfix.  ...
turn up stuff that is suggestive, yet, not confidence inspiring.

Does this help?  Last modified around 2008 so it seems to have stood
the test of time:

https://wiki.linuxquestions.org/wiki/Postfix_with_clamav-milter

I am not certain, for example, where to place the "call" to
clamav-milter.  ...

I don't use OpenSUSE nor Postfix, but I use Sendmail and the Postfix
milter facility is based on that used by Sendmail.  To use milters
like clamav-milter which are written in C and assume the availability
of the Sendmail milter library, you need to have Sendmail's libmilter
library installed.  (This is not built by default if you get Sendmail
from the original source.)  If you use Postfix on OpenSUSE I believe
that you can install the Sendmail libmilter library from a package.
Apart from making sure that you have the libmilter library installed,
I believe that all you need to do for Postfix is to tell it to use the
milter in main.cf or whichever appropriate configuration file.  The
fancy startup script on the page shouldn't be necessary if you already
have Postfix, clamd and clamav-milter all started.  The bit that tells
Postfix to use the milter is basically this one single line in main.cf

smtpd_milters = unix:/var/run/clamav/clamav-milter

but you see on that page that there's an option to e.g. accept mail if
the milter fails for some reason, which is just good self-defence and
not essential to normal operation.  You need to restart Postfix after
putting the milter line in main.cf or wherever.  Obviously the path to
your milter socket might not be quite what is given in the line above,
you may need to tweak it for whatever clamd has in its configuration.

There's a link on that page to the original Postfix documentation but
it seems to me that it's not written for a newcomer to the sport.  It
might make things clearer if I tell you that from what I've learned
from you about your setup you're looking at an SMTP-only milter, which
means you're filtering mail which comes from the Postfix mail server.
The Postfix documentation covers other (non-SMTP) uses.  In case it's
not obvious, SMTP means "Simple Mail Transfer Protocol" and is what is
used to exchange mail between various installations.  The RFCs are the
ultimate source of definitive detail about SMTP (and about most other
protocols), RFC821 kicked off SMTP but it's long since been superseded
by (many) more modern RFCs like RFC5321, which is one of the many RFC
tabs permanently open in my browser:

https://tools.ietf.org/html/rfc5321#section-3.1

At this stage I would rather ask than hack away.

Fair enough, but you will need to do quite a bit of reading.

It took me ten seconds to find the page I linked to.  The search was

postfix clamav-milter

and it was the first hit.

--

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