Hello, I have FreeBSD host with hostname mainserver.mydomain.com (this DNS record is managed by my own BIND dns server), and several jail on this hosts like:
nginx_proxy.mainserver.mydomain.com (127.0.1.2)
app1.mainserver.mydomain.com (127.0.1.3)
app2.mainserver.mydomain.com (127.0.1.4)
...
These jail subdomains are not managed by any DNS (it's only hostnames in jails rc.conf).
When I sending mail from these jails, this error occurs (returned mail):
So OK, my jail hostnames are only internal, not managed by any DNS and this is a problem. What is the best way to solve this?
1) add jail hostnames as DNS records to my own BIND DNS
2) do some sendmail masquerading and send mails through main host (mainserver.mydomain.com) sendmail?
Thanks!
nginx_proxy.mainserver.mydomain.com (127.0.1.2)
app1.mainserver.mydomain.com (127.0.1.3)
app2.mainserver.mydomain.com (127.0.1.4)
...
These jail subdomains are not managed by any DNS (it's only hostnames in jails rc.conf).
When I sending mail from these jails, this error occurs (returned mail):
Code:
The original message was received at Thu, 1 Mar 2018 14:30:45 +0100 (CET)
from [127.0.1.3]
----- The following addresses had permanent fatal errors -----
recipient@something.com
(reason: 550 5.7.25 invalid/host-not-in-DNS return address not allowed)
(expanded from: <root@app1.mainserver.mydomain.com>)
----- Transcript of session follows -----
... while talking to mx3.mail.icloud.com.:
>>> MAIL From:<root@app1.mainserver.mydomain.com> SIZE=764
<<< 550 5.7.25 invalid/host-not-in-DNS return address not allowed
554 5.0.0 Service unavailable
Reporting-MTA: dns; app1.mainserver.mydomain.com
Received-From-MTA: DNS; [127.0.1.3]
Arrival-Date: Thu, 1 Mar 2018 14:30:45 +0100 (CET)
...
So OK, my jail hostnames are only internal, not managed by any DNS and this is a problem. What is the best way to solve this?
1) add jail hostnames as DNS records to my own BIND DNS
2) do some sendmail masquerading and send mails through main host (mainserver.mydomain.com) sendmail?
Thanks!