From owner-freebsd-questions Mon May 4 10:00:16 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA05303 for freebsd-questions-outgoing; Mon, 4 May 1998 10:00:16 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from awfulhak.org (awfulhak.demon.co.uk [158.152.17.1]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA05137 for ; Mon, 4 May 1998 10:00:02 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from gate.lan.awfulhak.org (localhost [127.0.0.1]) by awfulhak.org (8.8.8/8.8.8) with ESMTP id RAA21014; Mon, 4 May 1998 17:53:42 +0100 (BST) (envelope-from brian@gate.lan.awfulhak.org) Message-Id: <199805041653.RAA21014@awfulhak.org> X-Mailer: exmh version 2.0.1 12/23/97 To: tarkhil@asteroid.svib.ru cc: Doug White , Sebastian Romo , freebsd-questions@FreeBSD.ORG Subject: Re: Spamming Problem In-reply-to: Your message of "Mon, 04 May 1998 09:48:18 +0400." <199805040548.JAA23010@minas-tirith.pol.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 04 May 1998 17:53:41 +0100 From: Brian Somers Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Doug White writes: > > >Check out the modifications in /etc/mail. > > Hmm... First, the following lines [.....] > seems to stip domain to last two levels, which is not enough (I've got some > spam from .chel.su, and didn't want to block the entire chel.su; Try this: # `database declarations' Kdenyip hash -a.REJECT /etc/mail/db/denyip.db Kspamsites hash -a.REJECT /etc/mail/db/spamsites.db Kspamnames hash -a.REJECT /etc/mail/db/spamnames.db # `called with host.tld and IP address of connecting host.' # `ip address must NOT be in the "denyip" database' Scheck_relay R$* $| $* $: $1 $| <$2> $(denyip $2 $) R$* $| < $* > $*.REJECT $#error $@ 5.1.8 $: $3 R$* $| < $* > $* $1 $| $2 # `host must *not* be in the "spamsites" database' R$* $| $* $: <$1> <$1 $| $2> R<$+.$+> $* <$+> <$2> $| $(spamsites $1 $2 $) $3 <$4> R<$*> $* $| $*.REJECT $* <$1> $3.REJECT $4 R<$*> $*.REJECT $* $#error $@ 5.1.8 $: $2 R<$*> $* <$+> $3 # `called with envelope sender, "Mail From: xxx", of SMTP conversation' Scheck_mail R$* $: $>3 $1 # `Make sure it resolves' R$* < @ $+ . > $1 @ $2 R$* < @ $+ > $#error $@ 4.1.8 $: "451 Domain doesn't resolve" # `Must not be in "spamnames" database' R$* @ $+ $: < $1 @ $2 > $(spamnames $1@$2 $) R< $* > $*.REJECT $#error $@ 5.1.8 $: $2 - Contact postmaster@$m R< $* > $* $1 # `host must *not* be in the "spamsites" database' R$* @ $* $: <$2> <$1 @ $2> R<$+.$+> $* <$+> <$2> $| $(spamsites $1 $2 $) $3 <$4> R<$*> $* $| $*.REJECT $* <$1> $3.REJECT $4 R<$*> $*.REJECT $* $#error $@ 5.1.8 $: $2 - Contact postmaster@$m R<$*> $* <$+> $3 # `test check_relay (required by -bt to get the $| in)' Sxlat R$* $$| $* $: $1 $| $2 R$* $| $* $@ $>check_relay $1 $| $2 I don't protect against relaying though... > Alex. -- Brian , , Don't _EVER_ lose your sense of humour.... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message