[Mimedefang] Notifying virus recipients
Adrian Chadd
adrian at creative.net.au
Sat May 17 04:57:01 EDT 2003
On Fri, May 16, 2003, Steffen Kaiser wrote:
> > The configuration is in an SQL database - I've got some stuff to
> > periodically dump the relevant configuration into a DB file which
> > I can then deal with in Perl. If I use mimedefang I don't need
>
> Huh? Is this a MS SQL Server that you cannot find a working Perl module?
Because I don't like having my mail delivery relying upon my SQL server
being up?
> > to hack up any "modify config files in homedirs every few minutes"
> > scripts.
>
> Anyway, what do you want to achieve?
> The main problem of user-specific filtering is, what are you doing, if the
> recipients of a mail fall into more than one class of filtering, e.g.
> one with, the other one without SPAM test.
.. which is fine. The way I've done it at the moment which seems to
work is:
* in filter_recipients() see whether we've been handed a local recipient -
if so, set a global variable or two with the relevant information
* in the other filter lists only do the SA, RBL and/or virus scanning
based on whether the user has been granted it.
> You'll need to implement a stream_by_class function (like
> stream_by_domain, but you specify the way you want to break up the
> recipients yourself), so you have a clean state (hence, all recpipients
> fall into the same filtering class).
> Or you use stream_by_recipient, with all the performance implications
> already stated on this list.
Well, here's the funny thing. Sendmail _seems_ to be running twice
anyway - once for receiving it, once for each local delivery.
Its only for local users - if its not local the only check I'm
doing is an RBL check.
> And if you do filtering at all, why don't you check the @Recipients in
> filter_begin?
because I'd like to know whether its a local recipient and have the
'local' user name after sendmail handles virtual user stuff, et al?
> Or you can keep your persistent information in your SQL database using
> $MsgID as the primary key, cmp. the quote from man mimedefang-filter:
>
> $MsgID Set to $QueueID if the queue ID could be determined;
> otherwise, set to $MessageID. This identi?
> fier should be used in logging, because it matches the
> identifier used by Sendmail to log mes?
> sages. Note that this variable is set correctly in
> filter_relay, filter_sender and fil?
> ter_recipient.
Well, if I were to do this I'd use a hash with this id as the key.
I'll do this if I can't find a way to guarantee filter_recipient() and
filter_begin, filter(), etc are atomic.
Adrian
--
Adrian Chadd "It shouldn't take an hour and a half for
<adrian at creative.net.au> "any woman to take a bath."
- Captain Jerk, Women and ..
More information about the MIMEDefang
mailing list