[Mimedefang] Question regarding stream_by_recipient()

Kevin A. McGrail kmcgrail at pccc.com
Mon Aug 9 13:33:08 EDT 2004


I believe just calling the stream_by_recipient is going to reinject the
emails as seperate emails per user so your second parameter will never get
checked.  The only possibility is you would have to do something RIGHT at
the begining of filter_begin() but even with that, David would be best to
say if the logic has a hope of working.

Here's my best first pass at a solution:

my (%users_to_stream, $i, $stream, $sanitized_user);
$users_to_stream{'bob at bob.com'} = 1;
$users_to_stream{'dave at bob.com'} = 1;

for ($i = 0; $i<($#Recipients +1); $i++) {
  #Strip Angle Brackets -- Untested
  $sanitized_user = $Receipients[$i];
  $sanitized_user =~ s/(^<|>$)//;

  if ($users_to_stream{$sanitized_user}) {
    $stream++;
  }
}

if ($stream) {
  if (stream_by_recipient()) {
    return;
  }
}

Regards,
KAM
----- Original Message ----- 
From: "Larry Starr" <larrys at fullcompass.com>
To: <mimedefang at lists.roaringpenguin.com>
Sent: Monday, August 09, 2004 12:54 PM
Subject: [Mimedefang] Question regarding stream_by_recipient()


> I am running mimedefang 2.37/spamassassin 2.60 on a redhat mail gateway
(no
> local users).
>
> I have recently been asked, by my CEO, to "Lower" the spam scores for him
and
> our President.   He tends to subscribe to some "questionable" mailing
lists,
> etc.  and has seen some tagged as spam.  He's now afraid he's missing
> something.
>
> My problem is that by lowering the addresses (adding a negative score)
when
> either of these individuals show up in the recipients list, I have
> effectively done the same for most of the company, based on the number of
> SPAM's that are addressed to many recipients, and include one or both of
> these individuals.
>
> I am familiar with the docs for "stream_by_redipient" and am reluctant to
use
> this for all messages, due to the additional load on my Mail server.
>
> Has anyone tried, or does anyone see a problem with, code like:
>        sub filter_begin {
>            if (stream_by_recipient()  && <list contains specific users> )
>            {
>                return;
>            }
>            # Rest of filter_begin
>        }
>
> So that the "stream_by_recipients" only fires if a specific set of user(s)
are
> in the recipient list?
>
> Thank you,
> -- 
> Larry G. Starr - larrys at fullcompass.com or starrl at globaldialog.com
> Software Engineer: Full Compass Systems LTD.
> Phone: 608-831-7330 x 1347  FAX: 608-831-6330
> ===================================================================
> There are only three sports: bullfighting, mountaineering and motor
> racing, all the rest are merely games! - Ernest Hemmingway
>
> _______________________________________________
> Visit http://www.mimedefang.org and http://www.canit.ca
> MIMEDefang mailing list
> MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
>



More information about the MIMEDefang mailing list