From owner-freebsd-questions@freebsd.org Mon Jun 27 10:03:18 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 89AFCB81B5E for ; Mon, 27 Jun 2016 10:03:18 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CDDF21BD for ; Mon, 27 Jun 2016 10:03:18 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.85) for freebsd-questions@freebsd.org with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (envelope-from ) id <1bHTNs-002FRA-5d>; Mon, 27 Jun 2016 12:03:16 +0200 Received: from p578a69f9.dip0.t-ipconnect.de ([87.138.105.249] helo=freyja.zeit4.iv.bundesimmobilien.de) by inpost2.zedat.fu-berlin.de (Exim 4.85) for freebsd-questions@freebsd.org with esmtpsa (TLSv1.2:AES256-GCM-SHA384:256) (envelope-from ) id <1bHTNr-000QbS-Sv>; Mon, 27 Jun 2016 12:03:16 +0200 Date: Mon, 27 Jun 2016 12:03:15 +0200 From: "O. Hartmann" To: freebsd-questions Subject: sendmail: using sendmail as submitting MTA Message-ID: <20160627120315.36072692@freyja.zeit4.iv.bundesimmobilien.de> Organization: FU Berlin X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Originating-IP: 87.138.105.249 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 10:03:18 -0000 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. As I understand the docs, the files hostname.localdomain.mc and hostname.localdomain.submit.mc are the only ones I need to touch, along with mailertable for the resolution of the target domain and the mail-hub server to contact. The target email domain would be foobar.bla, so I use an entry in mailertable like foobar.bla esmtp:[IP4] (no MX record usage) .foobar.bla esmtp:[IP4] There is no suitable access to a DNS for MX resolution (all Microsoft crap), so I have an /etc/host entry for the mailhub server - or mail relaying server. But nothing works so far. Checking the mail queue with mailq gives me always on all outbound emails host map: lookup (foobar.bka): deferred What is wrong? Please CC me, I' do not subscribe this specific list. Thank you in advance, Oliver P.S. I ggoled for that specific error and got lots of how-tos but it seems that none of them worked so far. I guess I miss something. I already did a make all install in /etc/mail after every change.