[Mimedefang] Small Assistance
John
john at jjgb.com
Tue May 13 18:06:01 EDT 2003
Exactly what I was looking for. Not worried about if we just happen to be
one in the list. I didn't think I'd need the stream by recipient thingy
for what I was up to.
I have been watching my mail logs closely as I just have a small
system. So I know what gets through with what scoring and just a couple a
month get through without a Spam score. Those I can manually send to
SpamCop. I have been using a bash script along with procmail (with the
X-Spam Header) to automatically forward the emails to SpamCop, but lately
I've been forwarding 5 and 6 a day which is too much for a non paid account
at SpamCop. I feel guilty. And over the last few months, I have only had
to hit the cancel button on SpamCop's page once. I whitelisted that email
address and haven't had a problem since.
Thanks again for your assistance. Much appreciated.
At 02:09 PM 5/13/2003, you wrote:
>On Tue, 13 May 2003, John wrote:
>
> > My wish is to: After SpamAssassin processes the mail and returns a score,
> > if any of the recipients is mine (john at jjgb.com) or my wifes
> > (gloria at jjgb.com), I want to reject (bounce) that message. The way I read
>
> Something like this should do. Right after:
>
>my($hits, $req, $names, $report) = spam_assassin_check();
> if ($hits >= $req) {
> md_log('spam', $hits, $RelayAddr);
>
>add this:
>
> my $recip;
> foreach $recip (@Recipients) {
> if($recip =~ /john\@jjgb\.com/i || $recip =~ /gloria\@jjgb\.com/i) {
> return action_bounce("Invalid content")
> }
> }
>
>
>and if it's not you or your wife, it should just fall through to the part
>that tags it as spam. Note that with this approach, if a message comes in
>with multiple recipients and you happen to be one of them, if SA tags it
>as spam, it's gone. If that is a concern, you may need to look in to
>stream_by_recipient. Another approach (and this is, as David calls it,
>Untested Perl Code While Replying To Email(TM)) might be something like
>this:
>
># msg has been tagged as spam....decide on disposition
> my $recipcount = @Recipients; # how many recipients for this msg
> if ($recipcount == 1) { # just one?
> if (@Recipients =~ /john\@jjgb\.com/i || # is it me...
> @Recipients =~ /gloria\@jjgb\.com) { # or the missus?
> return action_bounce("Invalid Content"); # yes, reject
> }
> }
># not mine, just tag it
>
> I think that should work. I think :-)
>
> HTH...
>
>Jim
>
>
>_______________________________________________
>MIMEDefang mailing list
>MIMEDefang at lists.roaringpenguin.com
>http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
John Jaeger - Billings, Montana
EMail To : <mailto:john at jjgb.com>
Home Page : <http://www.jjgb.com>
PGP:
RSA Key ID: 0xAAEC7751 <http://www.jjgb.com/public_files/RSA_Key.zip>
"Our liberty is protected by four boxes...
The ballot box, the jury box, the soap box, and the cartridge box."
- Anonymous
More information about the MIMEDefang
mailing list