[Avcheck] inclusion / exclusion of envelope recipients

Michael Tokarev mjt@tls.msk.ru
Wed, 09 Jan 2002 16:44:37 +0300


adi wrote:
> 
> On Wed, Jan 09, 2002 at 02:21:04PM +0300, Michael Tokarev wrote:
> > The above is a BIG KLUDGE.  But it should work.
> > Can someone *understand* this ? ;))  Comments?
> 
> I'm too dumb to understand, really :-) :-)

This IS complicated and ugly.

> BTW, there is $mailbox_command_maps variable in snapshot version (it
> is very likely be included at next official release ?)

It should be included.

> The it's a lot easier/cleaner (I think), if avcheck could call other
> LDA (procmail, maildrop, etc) to do final delivery, instead of
> reinjecting message into postfix (content_filter) nor use
> content_inspector.

I thought about this before too.  There are some other usages like
this as well -- e.g. call avcheck from within procmail.  But this
is tricky and risky -- avcheck doesn't prepared to run as non-dedicated
user.  Dealing with temp files (one big issue -- it need to save a
message to a temp file in order to pass it to virusscanner) isn't
*very* difficult.  But there are other issues -- how to call infected
handler from a user context, and how to protect virusscanner itself
from a local user -- this last one isn't trivial but *must* be done
properly with current virusscanners.  Best way is to make avcheck
setuid in this scenario, but for this to work properly, it should
read some trusted config file and not allow any command-line args.

Note also that this isn't a general approach: this way, only locally
destined mails will be scanned (not mails for virtual(8)-style
domains), and every recipient will be "scanned" separately even for
multi-recipient mails.

BTW, there is another application similar to avcheck -- it is virge,
www.vanja.com.  It was designed specially to work as local delivery
agent.

Regards,
 Michael.