PostfixAdmin and System Messages

Greg Groth ggroth at gregs-garage.com
Mon Jun 26 12:25:53 UTC 2017


On 6/22/2017 11:59 AM, Janos Dohanics wrote:
> On Wed, 21 Jun 2017 11:21:18 -0500
> Greg Groth <ggroth at gregs-garage.com> wrote:
>
>> 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 at domainname.com to user at domainname.com
>>
>> A little more history: In the purplehat.org documentation was the
>> following note.
>>
>> <quote>
>>
>> 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)
>>
>> </quote>
>>
>> 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 at mail.domainname.com instead of root at 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
> Greg,
>
> what's the output of:
>
> postconf myhostname
>
> and
>
> postconf mydestination
>
> ?
Thanks for replying.

postconf myhostname responds with the FQDN of the server - myhostname = 
mail.mydomain.com

postconf mydestination responds with - mydestination = 
localhost.$mydomain, localhost, lists.mydomain.com

Best regards,
Greg Groth





More information about the freebsd-questions mailing list