From owner-freebsd-questions@FreeBSD.ORG Thu Jan 24 01:51:32 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 0897E16A565 for ; Thu, 24 Jan 2008 01:51:32 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from mx-out-04.forthnet.gr (mx-out.forthnet.gr [193.92.150.104]) by mx1.freebsd.org (Postfix) with ESMTP id 8D13213C44B for ; Thu, 24 Jan 2008 01:51:31 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from mx-av-01.forthnet.gr (mx-av.forthnet.gr [193.92.150.27]) by mx-out-04.forthnet.gr (8.13.8/8.13.8) with ESMTP id m0O1pT7N023594; Thu, 24 Jan 2008 03:51:29 +0200 Received: from MX-IN-03.forthnet.gr (mx-in-05.forthnet.gr [193.92.150.32]) by mx-av-01.forthnet.gr (8.14.1/8.14.1) with ESMTP id m0O1pTAj031012; Thu, 24 Jan 2008 03:51:29 +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 m0O1pQct001348; Thu, 24 Jan 2008 03:51:27 +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 m0O1pP9w008913; Thu, 24 Jan 2008 03:51:25 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m0O1pOdY008912; Thu, 24 Jan 2008 03:51:24 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Thu, 24 Jan 2008 03:51:24 +0200 From: Giorgos Keramidas To: Steven Friedrich Message-ID: <20080124015124.GA7150@kobe.laptop> References: <200801231954.32048.FreeBSD@insightbb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200801231954.32048.FreeBSD@insightbb.com> Cc: freebsd-questions@freebsd.org Subject: Re: sendmail config 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: Thu, 24 Jan 2008 01:51:32 -0000 On 2008-01-23 19:54, Steven Friedrich wrote: > I configured KMail with SSL to send mail from a foreign network thru my > broadband ISP. This works fine. > > I want to be able to use send-pr, and thought I might me able to configure > sendmail as outgoing only. I have sendmail_enable="NO" in /etc/rc.conf. > > local mail works fine. I don't want incoming from the Internet. > > I copied /etc/mail/freebsd.mc to laptop.mc and set SMART_HOST to > mail.insightbb.com and moved sendmail.cf to sendmailcf.sav. I compiled > laptop.mc with m4 /usr/share/sendmail/cf/m4/cf.m4 laptop.mc > > I then copied laptop.cf to sendmail.cf and rebooted. There's a much easier way to generate `sendmail.cf' and `submit.cf' on FreeBSD. After reading the comments in `/etc/mail/Makefile', especially the part shown below: # ------------------------------------------------------------------------ # This Makefile uses `.mc' as the default MTA .mc file. This # can be changed by defining SENDMAIL_MC in /etc/make.conf, e.g.: # # SENDMAIL_MC=/etc/mail/myconfig.mc # # If '.mc' does not exist, it is created using 'freebsd.mc' # as a template. # # It also uses '.submit.mc' as the default mail submission .mc # file. This can be changed by defining SENDMAIL_SUBMIT_MC in # /etc/make.conf, e.g.: # # SENDMAIL_SUBMIT_MC=/etc/mail/mysubmit.mc # # If '.submit.mc' does not exist, it is created using # 'freebsd.submit.mc' as a template. # ------------------------------------------------------------------------ You can set up a `sendmail.cf' and `submit.cf' file by: 0. Set up the `rc.conf' options for local delivery only, and to forward all other messages to the SMART_HOST relay. sendmail_enable="NO" sendmail_outbound_enable="NO" sendmail_submit_enable="YES" sendmail_msp_queue_enable="YES" 1. Editing `/etc/make.conf' and setting SENDMAIL_MC and SENDMAIL_SUBMIT_MC to: SENDMAIL_MC?= /etc/mail/laptop.mc SENDMAIL_SUBMIT_MC?= /etc/mail/laptop.submit.mc 2. Backup your current `laptop.mc' and `laptop.submit.mc' if any. 3. Copy the original `freebsd.mc' to `laptop.mc' and the original `submit.mc' to `freebsd.submit.mc' in `/etc/mail': # cd /etc/mail # cp freebsd.mc laptop.mc # cp freebsd.submit.mc laptop.submit.mc 4. Edit the new `laptop.mc' file and set SMART_HOST. 5. Use the standard `Makefile' to build and install the new *.cf files: # cd /etc/mail # make all && make install Now you should be able to start Sendmail with: # /etc/rc.d/sendmail stop # /etc/rc.d/sendmail start > Now, the response is "Service not available", but I think it's because > I don't have sendmail configured to use SSL, like KMail. The standard `freebsd.mc' distributed with FreeBSD sources doesn't force the use of SSL or TLS. You should be able to use it without SSL. If you have made modifications to the original `freebsd.mc' file, you can restore it by copying a fresh version of the same file from their pristine copies included in the source tree of FreeBSD: /usr/src/etc/sendmail/freebsd.mc /usr/src/etc/sendmail/freebsd.submit.mc HTH, Giorgos