From owner-freebsd-questions Wed Feb 26 14:22: 0 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B3BA37B401 for ; Wed, 26 Feb 2003 14:21:58 -0800 (PST) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id B38F943FCB for ; Wed, 26 Feb 2003 14:21:56 -0800 (PST) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-b176.otenet.gr [212.205.244.184]) by mailsrv.otenet.gr (8.12.6/8.12.6) with ESMTP id h1QMLoAC006993; Thu, 27 Feb 2003 00:21:51 +0200 (EET) Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.7/8.12.7) with ESMTP id h1QMLkON090038; Thu, 27 Feb 2003 00:21:46 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.12.7/8.12.7/Submit) id h1QMBOmW089956; Thu, 27 Feb 2003 00:11:24 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Thu, 27 Feb 2003 00:11:24 +0200 From: Giorgos Keramidas To: Andreas Wider?e Andersen Cc: freebsd-questions@FreeBSD.ORG Subject: Re: proto.m4 file (Sendmail on FreeBSD) Message-ID: <20030226221124.GA78804@gothmog.gr> References: <5.2.0.9.0.20030226082140.00b4bdb0@mail.pragma.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5.2.0.9.0.20030226082140.00b4bdb0@mail.pragma.no> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2003-02-26 09:34, Andreas Wider?e Andersen wrote: > I got Sendmail 8.12.6/8.12.7 on my FreeBSD 4.7 STABLE system and > I've recently been working with it to stop spam coming through to my > email users. I've added several "FEATURES" in the freebsd.mc file > and compiled a new sendmail.cf file which works pretty > good. However, I'm seeing more and more of lines in my maillog like > the line below: > > Feb 26 09:13:00 myserver sendmail[52405]: h1Q8CxZw052405: > ... User unknown > Feb 26 09:13:00 myserver sendmail[52405]: h1Q8CxZw052405: > from=<>, size=3411, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, > relay=mxo1.vol.cz [195.250.128.76] What you're seeing is okay. Spammers try to harvest addresses by connecting to your mail server and testing if delivery to certain usernames is allowed, or even if the can relay mail through you. I'd block them with FEATURE(access_db) if I were you. You should read the file /usr/share/sendmail/cf/README. Especially the part that describes "access_db" and "confPRIVACY_FLAGS". > My question is, where should I put this in in my proto.m4 file? The > file is rather large and I really don't know where. Nowhere. Don't blindly make changes to .m4 files, without understanding what's going on. You'll break your mail server, very very soon. > Also, there are 2 proto.m4 files: > > /usr/share/sendmail/cf/m4/proto.m4 > /usr/src/contrib/sendmail/cf/m4/proto.m4 > > Which one should I edit & use? None of these. Leave them be. > When I'm compiling up a new sendmail.cf file I do this: > > cp /etc/mail/sendmail.cf /etc/mail/sendmail.cf.orig > cd /usr/src/etc/sendmail > cp freebsd.mc freebsd.mc.orig > [edit freebsd.mc] > make freebsd.cf > make freebsd.cf install > cd /usr/obj/usr/src/etc/sendmail/ > cp freebsd.cf /etc/mail/sendmail.cf > killall -1 sendmail You should use the rules of the /etc/mail/Makefile. Just copy /etc/mail/freebsd.org to /etc/mail/myhostname.mc and make your local changes ONLY to myhostname.mc. Then generate myhostname.cf and submit.cf: # make Then savee a backup copy of your existing sendmail.cf file and install the new files as sendmail.cf and submit.cf in /etc/mail: # cp sendmail.cf sendmail.cf.bak # make install and restart Sendmail. # make restart . To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message