[Avcheck] inclusion / exclusion of envelope recipients
Michael Tokarev
mjt@tls.msk.ru
Fri, 18 Jan 2002 06:33:46 +0300
[Replying late night (oh, morning here), just a few notes]
Luke Dudney wrote:
[]
> I propose the following
> add a command line argument to avcheck that lets you specify some sort of
> map for inclusions (berkeley db is the obvious choice here, but flat text
> would work for a small number of addresses)
> if no map is specified, avcheck runs as it currently does (scans all
> addresses)
cdb will work here in a nice way (older, 0.62 interface w/o mmap, this is
implemented in last tinycdb also) -- very small startup/init time. Flat
text will be bad for large userbase.
> take argv[] after getopt() (which is now the list of recipients) and
> split it up into two lists, one to be scanned (call it "scan[]") and one not
> to be scanned ("noscan[]")
>
> o if scan[] is empty, run sendit() on noscan[] (which will be all
> recipients)
> o if noscan[] is empty, then do virus scanning / call infected on scan[]
> (which will be all recipients)
> o if both scan[] and noscan[] have at least one member, run sendit() on
> noscan[] (but do not call cleanup() - we still need the message for scan[]'s
> recipients ), then do virus scanning on the message.
> o call "infected" script if a virus is found, passing it scan[]
> as its list of recipients.
> o if no virus is found, run sendit() on scan[]
This should be in reverse: calling virusscanner etc and after doing
all sends. Or else we'll end up sending to noscan[] numerous times
if an antivirus is not running or the like. Also, if a mail is ok
(as it will be most of the time), only one send operation will be
needed. Oh well, so we can't just exec() "infected" script.
> Does this sound feasible?
Well, may be.
> Or have I just suggested exactly what you did?
No, I not thought about this since that last mails.
> I will start working on this myself in the mean time, anyway, to see how it
> works.
;) Ok.
Regards,
Michael.