From owner-freebsd-questions@freebsd.org Wed Jun 21 16:31:08 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 9EF29D9381A for ; Wed, 21 Jun 2017 16:31:08 +0000 (UTC) (envelope-from ggroth@gregs-garage.com) Received: from mail.gregs-garage.com (99-158-164-253.uvs.cicril.sbcglobal.net [99.158.164.253]) (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 778697329C for ; Wed, 21 Jun 2017 16:31:06 +0000 (UTC) (envelope-from ggroth@gregs-garage.com) Received: from localhost (localhost [127.0.0.1]) by mail.gregs-garage.com (Postfix) with ESMTP id BD04F66E01A for ; Wed, 21 Jun 2017 09:23:44 -0500 (CDT) Received: from mail.gregs-garage.com ([127.0.0.1]) by localhost (mail.gregs-garage.com [127.0.0.1]) (maiad, port 10024) with ESMTP id 40809-06 for ; Wed, 21 Jun 2017 09:23:44 -0500 (CDT) Received: from [10.10.2.61] (107-1-251-97-ip-static.hfc.comcastbusiness.net [107.1.251.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ggroth@gregs-garage.com) by mail.gregs-garage.com (Postfix) with ESMTPSA id 8844F66DFFA for ; Wed, 21 Jun 2017 09:23:44 -0500 (CDT) To: freebsd-questions@freebsd.org From: Greg Groth Subject: PostfixAdmin and System Messages Message-ID: <4e7f6eaf-3db0-8906-3dd3-9d3b98e7b374@gregs-garage.com> Date: Wed, 21 Jun 2017 11:21:18 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US 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: Wed, 21 Jun 2017 16:31:08 -0000 After 20 years of Sendmail, I've built a new mail server using the guidelines outlined at purplehat.org. So far, everything is working great except that my system messages that used to be delivered to my account are MIA. I do have an alias in /etc/aliases from root to my 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 A little more history: In the purplehat.org documentation was the following note. 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) 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. While I run my own DNS server on the same box as my mail server, it's 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 /etc/resolv.conf is pointed at 8.8.8.8 & 8.8.4.4. Because of this issue, I then decided to try adding an entry to my /etc/hosts file : 192.168.100.10 domainname.com mail.domainname.com Now when I check the maillog, although it is now finding the mail server, I see that my system emails are now being routed to root@mail.domainname.com instead of root@domainname.com. 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? Regards, Greg Groth