From owner-freebsd-questions@FreeBSD.ORG Wed Jan 23 01:25:13 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C67D416A41B for ; Wed, 23 Jan 2008 01:25:13 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from mx-out.forthnet.gr (mx-out.forthnet.gr [193.92.150.104]) by mx1.freebsd.org (Postfix) with ESMTP id 426D613C448 for ; Wed, 23 Jan 2008 01:25:13 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from mx-av-04.forthnet.gr (mx-av.forthnet.gr [193.92.150.27]) by mx-out-02.forthnet.gr (8.14.0/8.14.0) with ESMTP id m0N1PBgr007789; Wed, 23 Jan 2008 03:25:11 +0200 Received: from MX-IN-03.forthnet.gr (mx-in-05.forthnet.gr [193.92.150.32]) by mx-av-04.forthnet.gr (8.14.1/8.14.1) with ESMTP id m0N1PB6n005134; Wed, 23 Jan 2008 03:25:11 +0200 Received: from kobe.laptop (ppp133-151.adsl.forthnet.gr [62.1.124.151]) by MX-IN-03.forthnet.gr (8.14.2/8.14.2) with ESMTP id m0N1PA9A013396; Wed, 23 Jan 2008 03:25:11 +0200 Authentication-Results: MX-IN-03.forthnet.gr smtp.mail=keramida@ceid.upatras.gr; spf=neutral Authentication-Results: MX-IN-03.forthnet.gr header.from=keramida@ceid.upatras.gr; sender-id=neutral Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m0N1P9Hc004109; Wed, 23 Jan 2008 03:25:09 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m0N1P85r004108; Wed, 23 Jan 2008 03:25:08 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Wed, 23 Jan 2008 03:25:08 +0200 From: Giorgos Keramidas To: Schiz0 Message-ID: <20080123012508.GA4036@kobe.laptop> References: <8d23ec860801221328s601bade5qab86280cd0441ffb@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8d23ec860801221328s601bade5qab86280cd0441ffb@mail.gmail.com> Cc: Agus , freebsd-questions@freebsd.org Subject: Re: Sendmail local only..... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jan 2008 01:25:13 -0000 On 2008-01-22 16:28, Schiz0 wrote: >On Jan 22, 2008 4:25 PM, Agus wrote: >> Hi guys, >> Just trying to make sendmail work locally only.....And by that i >> mean, i dont want sendmail to be able to relay or send mail to any >> other machine except for localhost.... >> >> How can i do this? I mean is there a way on rc.conf or i need to >> touch the cf?? > > Search the file /etc/defaults/rc.conf for "sendmail" > It has a bunch of options and explains what they do. > NOTE: do not edit /etc/defaults/rc.conf - that's just the "Default > settings" file. > Make any changes in the /etc/rc.conf file instead. > > Basically, you want > > sendmail_enable="NO" > > And the rest of the sendmail options enabled. Not all of them, mind you. I use the following on my laptop: sendmail_enable="NO" sendmail_outbound_enable="NO" sendmail_submit_enable="YES" sendmail_msp_queue_enable="YES" A fairly good explanation of why this setup works only as a 'local MTA', and doesn't accept incoming SMTP connections from the world can be found in the manpage of rc.sendmail: % man rc.sendmail To the original poster: Feel free to use the above sendmail_xxx settings in your `/etc/rc.conf' file, but please make sure that you also: ... understand why these settings make Sendmail only forward locally generated email messages, by reading the rc.sendmail manpage. ... have configured properly your local `/etc/mail/sendmail.cf' and `/etc/mail/submit.cf' files. ... read the Handbook section about Sendmail, and let us know if you find it difficult to understand, or you would like to see more stuff documented. Cheers, Giorgos