Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Postfix, spamassassin, and clamav...WITHOUT amavis...

164 views
Skip to first unread message

James Lay

unread,
Nov 30, 2005, 8:43:36 AM11/30/05
to
Hey all!

So I googled around....searched the postfix mailing list
archives...didn't find what I'm looking for, so I thought I'd ask here.

Currently I run postfix with spamassassin with a postfixfilter in my
master file and the below as the postfixfilter script file:

#!/bin/bash
/usr/bin/spamc -U /var/spool/spamfilter/spamd | /usr/sbin/sendmail -i
"$@" exit $?

I'd like to integrate clamav into this script as well, but so far I've
found nothing besides everything pointing to amavis. I'd rather not
install another app and just insert clamav stuff into this script.
Anyone have any pointers as to where I can look to do this? Thanks
people!

James

Keith Dunnett

unread,
Nov 30, 2005, 9:12:57 AM11/30/05
to
James Lay wrote:

>I'd like to integrate clamav into this script as well, but so far I've
>found nothing besides everything pointing to amavis. I'd rather not
>install another app and just insert clamav stuff into this script.
>Anyone have any pointers as to where I can look to do this? Thanks
>people!
>
>James
>
>

We achieve something similar using maildrop, which can filter mail
through anything you care to
name. That still means installing another app though, and one that can
be far more complex than
amavis to configure.

Personally, I use maildrop for spam filtering and still do employ amavis
for virus scanning (only).
Why? Because it can use more than just clamav, and BitDefender has a
free Linux client (well, free for
personal use, not free in the GPL sense)

If your objection to amavis is because you don't want to scan everything
passing through SMTP,
then maildrop may be a solution. If it's because you don't fancy
installing another app, you're
probably out of luck.

Of course, there's no reason you can't save the message to a file, run
clamscan / clamdscan against
the file, parse the output, and then invoke sendmail depending upon the
results. To the best of my
knowledge (and a quick check of the man pages), there is no way to pipe
mail through clamscan itself
without using an additional package (such as clamsmtp), or using bash
script to do so via a file.

You might also integrate clamav with spamassassin, of course, and not
change what Postfix does at all.
See http://wiki.apache.org/spamassassin/ClamAVPlugin for that; not
tested by me.

HTH,

Keith



Udo Rader

unread,
Nov 30, 2005, 9:36:21 AM11/30/05
to

I dunno if this makes sense for you, but maybe ...

http://memberwebs.com/nielsen/software/clamsmtp/

Udo Rader

--
bestsolution.at EDV Systemhaus GmbH
http://www.bestsolution.at

signature.asc

James Lay

unread,
Nov 30, 2005, 10:36:23 AM11/30/05
to
On Wed, 30 Nov 2005 15:12:57 +0100
Keith Dunnett <ke...@dunnett.org> wrote:

> James Lay wrote:
>
> >I'd like to integrate clamav into this script as well, but so far
> >I've found nothing besides everything pointing to amavis. I'd
> >rather not install another app and just insert clamav stuff into
> >this script. Anyone have any pointers as to where I can look to do
> >this? Thanks people!
> >
> >James
> >
> >

Perfect! Just what the doctor ordered...thank you!

James


>
>
>
>
>
>
>

James Lay

unread,
Nov 30, 2005, 10:36:38 AM11/30/05
to
On Wed, 30 Nov 2005 15:36:21 +0100
Udo Rader <udo....@bestsolution.at> wrote:

> On Wed, 2005-11-30 at 06:43 -0700, James Lay wrote:

> I dunno if this makes sense for you, but maybe ...
>
> http://memberwebs.com/nielsen/software/clamsmtp/
>
> Udo Rader

Will take a look at this as well..thanks!

James

Magnus Bäck

unread,
Dec 1, 2005, 4:01:14 PM12/1/05
to
On Wednesday, November 30, 2005 at 14:43 CET,
James Lay <jl...@slave-tothe-box.net> wrote:

> So I googled around....searched the postfix mailing list
> archives...didn't find what I'm looking for, so I thought I'd ask here.
>
> Currently I run postfix with spamassassin with a postfixfilter in my
> master file and the below as the postfixfilter script file:
>
> #!/bin/bash
> /usr/bin/spamc -U /var/spool/spamfilter/spamd | /usr/sbin/sendmail -i
> "$@" exit $?

That's not robust. What do you think happens if spamc or sendmail
cannot be invoked? FILTER_README contains a more robust example.

[...]

--
Magnus Bäck
mag...@dsek.lth.se

0 new messages