Postfix internal allow relay for internal host

Alexandre Takacs
Alexandre Takacs used Ask the Experts™
on
Probably a basic one but can figure it out.
I am setting up a Postfix server to accept mail form our LAN and relay it to external WAN.

Mail sent from the LAN devices (MFC etc) get this error:

Remote Server returned '554 5.7.1 Client host rejected: cannot find your hostname, [172.16.255.89]'

172.16.255.89 is indeed the correct LAN IP. How do I authorize it ?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
David FavorFractional CTO
Distinguished Expert 2018

Commented:
https://en.wikipedia.org/wiki/Private_network provides all private/local/non-routable IP address ranges.

The address you're using will never receive packet flow from outside your LAN, as you're using a 172.16.X.X address.

If I understand your question, you'll require using a public IP.
Software Engineer
Distinguished Expert 2018
Commented:
This error is about missing reverse lookup. You can add your LAN IP's as reverse lookup.
Also you can accept mail using: http://www.postfix.org/SMTPD_ACCESS_README.html

/etc/postfix/main.cf:
    # Allow connections from trusted networks only.
    smtpd_client_restrictions = permit_mynetworks, reject

Open in new window


Where:
permit_mynetworks
Permit the request when the client IP address matches any network or network address listed in $mynetworks.

Maybe start here with reading:  http://www.postfix.org/STANDARD_CONFIGURATION_README.html

The serup you are looking for is a so called "smarthost" setup.

Author

Commented:
Thanks - I am indeed looking into setting up a "smarthost" and had to "white list" the relevant internal subnets in the mynetworks directive of the postfix server. Seems all ok now !

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial