From owner-freebsd-questions@freebsd.org Thu Jun 22 17:14:55 2017 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 32053D90ED5 for ; Thu, 22 Jun 2017 17:14:55 +0000 (UTC) (envelope-from web@3dresearch.com) Received: from smtpd.telissant.net (smtpd.telissant.net [104.225.1.170]) (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 DCF2882DE4 for ; Thu, 22 Jun 2017 17:14:54 +0000 (UTC) (envelope-from web@3dresearch.com) Received: from cortina.3dresearch.com (localhost [127.0.0.1]) by smtpd.telissant.net (Postfix) with ESMTP id 70F8F1129B9 for ; Thu, 22 Jun 2017 13:00:48 -0400 (EDT) X-Virus-Scanned: amavisd-new at telissant.net Received: from smtpd.telissant.net ([127.0.0.1]) by cortina.3dresearch.com (cortina.3dresearch.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x020l2WOGwnL for ; Thu, 22 Jun 2017 13:00:16 -0400 (EDT) Received: from elettra.3dresearch.com (unknown [71.112.245.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: elettra) by smtpd.telissant.net (Postfix) with ESMTPSA id 23476112985 for ; Thu, 22 Jun 2017 13:00:16 -0400 (EDT) Received: from elettra.3dresearch.com (localhost [127.0.0.1]) by elettra.3dresearch.com (Postfix) with SMTP id 65276113187 for ; Thu, 22 Jun 2017 13:00:15 -0400 (EDT) Date: Thu, 22 Jun 2017 12:59:48 -0400 From: Janos Dohanics To: FreeBSD Questions Subject: Re: PostfixAdmin and System Messages Message-Id: <20170622125948.3f056124a74623c8c7400623@3dresearch.com> In-Reply-To: <4e7f6eaf-3db0-8906-3dd3-9d3b98e7b374@gregs-garage.com> References: <4e7f6eaf-3db0-8906-3dd3-9d3b98e7b374@gregs-garage.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; amd64-portbld-freebsd10.3) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 17:14:55 -0000 On Wed, 21 Jun 2017 11:21:18 -0500 Greg Groth wrote: > After 20 years of Sendmail, I've built a new mail server using the=20 > guidelines outlined at purplehat.org. So far, everything is working=20 > great except that my system messages that used to be delivered to my=20 > account are MIA. I do have an alias in /etc/aliases from root to my=20 > email address hosted on the same server, but I don't know if > Postfix / PostfixAdmin uses the /etc/aliases when configured to use > virtual aliases. I also added a virtual alias from > root@domainname.com to user@domainname.com >=20 > A little more history: In the purplehat.org documentation was the=20 > following note. >=20 > >=20 > If you are receiving errors in your logs about $mydestination, be > sure that _ANY_ ?virtual? domain you are hosting is _NOT_ listed in > your /etc/hosts file. Apparently this causes a problem being as > Postfix cannot determine if the domain is virtual or not. (Thanks > Valentin) >=20 > >=20 > I am only running a single doman on the server, but because of the > above message, I specifically avoided entering the mail server's > internal IP address and FQDN in /etc/hosts. However, when I looked > at my maillog I noted that Postfix was trying to send the system > emails to my mail server's outside IP address, which obviously didn't > reply. >=20 > While I run my own DNS server on the same box as my mail server, it's=20 > serving the external IP addresses to the outside world. It's > currently 1 of 2 machines on my DMZ, which has a non-routable IP > range of 192.168.100.X. Because of there only being two machines, I > use /etc/hosts for any needed name resolution on the network, and my=20 > /etc/resolv.conf is pointed at 8.8.8.8 & 8.8.4.4. >=20 > Because of this issue, I then decided to try adding an entry to my=20 > /etc/hosts file : >=20 > 192.168.100.10 domainname.com mail.domainname.com >=20 > Now when I check the maillog, although it is now finding the mail=20 > server, I see that my system emails are now being routed to=20 > root@mail.domainname.com instead of root@domainname.com. >=20 > Based on what I'm seeing, I'm assuming that this is more of a DNS > issue than Postfix, I'm just not sure if I can use the hosts file to > fix it or if I should try to install a local DNS server just for my > DMZ for the system emails? Other than the system emails, everything > else has been working great. Any thoughts? >=20 > Regards, >=20 > Greg Groth Greg, what's the output of: postconf myhostname and postconf mydestination ? --=20 Janos Dohanics