From owner-freebsd-questions@freebsd.org Mon Jun 27 13:33:24 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B731B73628 for ; Mon, 27 Jun 2016 13:33:24 +0000 (UTC) (envelope-from bah@bananmonarki.se) Received: from feeder.usenet4all.se (1-1-1-38a.far.sth.bostream.se [82.182.32.53]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A45A2927 for ; Mon, 27 Jun 2016 13:33:22 +0000 (UTC) (envelope-from bah@bananmonarki.se) Received: from testbox.news4all.se (testbox.usenet4all.se [10.0.0.3]) by feeder.usenet4all.se (8.13.1/8.13.1) with ESMTP id u5RDXB28049145; Mon, 27 Jun 2016 15:33:11 +0200 (CEST) (envelope-from bah@bananmonarki.se) Subject: Re: sendmail: using sendmail as submitting MTA To: "O. Hartmann" , freebsd-questions References: <20160627120315.36072692@freyja.zeit4.iv.bundesimmobilien.de> From: Bernt Hansson Message-ID: Date: Mon, 27 Jun 2016 15:33:12 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20160627120315.36072692@freyja.zeit4.iv.bundesimmobilien.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jun 2016 13:33:24 -0000 On 2016-06-27 12:03, O. Hartmann wrote: > We use a monitoring server (icinga2) based on FreeBSD embedded in a closed > network (no external access) with a M$ mailexchange server. > > I try to configure local sendmail in a way so that all email going to the > localhost are delivered to the local machine itself, but email for an external > email account is passed to the mail hub server. This mail hub server is > accessible by any host in the closed network without authentication (this is > given by a higher instance as a fact I can not change). > > I tried to figure out with the recent handbook but the explanation of how to > configure sendmail is really poor. Since I'm not that familiar with sendmail > itself anymore, I appreciate some startups here. > We have that setup here. You need to edit hostname.mc and find the line dnl define(`SMART_HOST', `your.isp.mail.server') Our's look like this define(`SMART_HOST', `[10.0.0.1]') The IP must be like that verbatim. Then in /etc/mail make all install restart Just tested on a few machines and they work like you wanted. Local mail delivered locally and external goes externally.