From owner-freebsd-questions Fri Jan 16 03:17:20 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA07187 for questions-outgoing; Fri, 16 Jan 1998 03:17:20 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from beta.mep.ruhr-uni-bochum.de (beta.mep.ruhr-uni-bochum.de [134.147.6.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA07181 for ; Fri, 16 Jan 1998 03:17:10 -0800 (PST) (envelope-from roberte@beta.mep.ruhr-uni-bochum.de) Received: (from roberte@localhost) by beta.mep.ruhr-uni-bochum.de (8.8.5/8.8.5) id MAA04054; Fri, 16 Jan 1998 12:16:50 +0100 (MEZ) From: Robert Eckardt Message-Id: <199801161116.MAA04054@beta.mep.ruhr-uni-bochum.de> Subject: Re: sendmail - anti-spam, relay hosts In-Reply-To: <3.0.5.32.19980115222057.02ed7e50@ccsales.com> from "Randy A. Katz" at "Jan 15, 98 10:20:57 pm" To: randyk@ccsales.com (Randy A. Katz) Date: Fri, 16 Jan 1998 12:16:49 +0100 (MEZ) Cc: freebsd-questions@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL31H (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk > Hello, > > I know this is not for sendmail but I always get the best answers here and > I'm using FreeBSD. > > I put in the rules to sendmail.cf for not allowing others to relay mail > through our server. I have a number of virtual web sites on the server and > each has a POP account and sends/receives email to/from the POP and to the > world (the users are allowed to use us as their SMTP host). > > As soon as I put the no relay rules in they can no longer use us as an SMTP > host. Is there a way to allow them if they are a valid POP account? I have a similar problem: I configured G as a relay for A. I permit relaying for incoming mails only when the receiver is in the local network(s) (check_rcpt). As long as A runs everything works fine (no relaying needed). But when A went down I suddenly saw rejected mail due to check_rcpt. Changeing check_rcpt to display some debugging output (always in danger that I get removed from "some" mailing lists for bouncing :-) I found that the sender's address caused check_rcpt to complain. I.e.: X.Y.Z --> A.M.R.de ==> No relaying on G.M.R.de The domain is listed as M.R.de in /etc/sendmail.cR (in this example). Why is check_rcpt called for the sender's address ? The rule works fine for the recipient's address. Robert Besides: My check_rcpt at the very end of /etc/sendmail.cf looks like: FR-o /etc/sendmail.cR Scheck_rcpt # anything terminating locally is ok # R<$+ @ $* $=R > $#error $: "451 Relaying test " $1 " @ " $2 " " $3 R<$+ @ $=w > $@ OK R<$+ @ $* $=R > $@ OK # anything originating locally is ok R$* $: $(dequote "" $&{client_name} $) R$=w $@ OK R$*$=R $@ OK R$@ $@ OK # anything else is bogus R$* $#error $: "550 We do Not permit Relaying " $1 Kspammers hash /etc/sendmail.spammers Scheck_mail # check for valid domain name R$* $: $>3 $1 R $* < @ $+ . > $: R $* < @ $+ > $#error $: "451 Domain/Host name must Resolve" # check relay against spammers database R$* $: $(spammers $&{client_name} $: OK $) ROK $@ OK R$+ $#error $: 551 $1 -- Dr. Robert Eckardt ( Ruhr-Universitaet Bochum, Inst.f.Theor.Physik, NB6/169 ) Universitaetsstrasse 150, D-44780 Bochum, Germany ----X---8---- Telefon: +49 234 700-3709, Telefax: +49 234 7094-574 8 E-Mail: RobertE@MEP.Ruhr-Uni-Bochum.de --------8---- URL: http://WWW.MEP.Ruhr-Uni-Bochum.de/~roberte >>> A magician never reveals his secret: the unbelievable trick becomes <<< >>> simple and obvious once it is explained. <<<