hosts file

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

hosts file

Curtis Vaughan-2
So, I have a postfix server in the DMZ. In order to hand off mail to an
internal server I have set the hosts file (/etc/hosts) to point to the
internal server. Pinging the domain name per the hosts file shows the
internal IP. However, when postfix send mail to that server, it uses that
servers public IP. Why? How do I get postfix to use the internal IP
address?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: hosts file

Victor Duchovni
On Tue, Apr 29, 2008 at 05:41:31PM +0000, Curtis Vaughan wrote:

> So, I have a postfix server in the DMZ. In order to hand off mail to an
> internal server I have set the hosts file (/etc/hosts) to point to the
> internal server. Pinging the domain name per the hosts file shows the
> internal IP. However, when postfix send mail to that server, it uses that
> servers public IP. Why? How do I get postfix to use the internal IP
> address?

        http://www.postfix.org/postconf.5.html#smtp_host_lookup

If you chose both "dns" and "native", DNS will happen first. You may
need to define an additional transport (or use the "relay" transport)
which only does "native" lookups.

--
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:[hidden email]?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: hosts file

Randy Ramsdell
In reply to this post by Curtis Vaughan-2
Curtis Vaughan wrote:
> So, I have a postfix server in the DMZ. In order to hand off mail to an
> internal server I have set the hosts file (/etc/hosts) to point to the
> internal server. Pinging the domain name per the hosts file shows the
> internal IP. However, when postfix send mail to that server, it uses that
> servers public IP. Why? How do I get postfix to use the internal IP
> address?
>  
My question would be how do you have a DMZ'd mail server  and also an
internal mail server that has a public facing service. Wouldn't you want
the internal network to not have public facing servers.  Obviously
forget this if the internal server isn't accepting connections to port
25 using the public IP.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: hosts file

Curtis Vaughan-2


Randy Ramsdell wrote:

> Curtis Vaughan wrote:
>> So, I have a postfix server in the DMZ. In order to hand off mail to
>> an internal server I have set the hosts file (/etc/hosts) to point to
>> the internal server. Pinging the domain name per the hosts file shows
>> the internal IP. However, when postfix send mail to that server, it
>> uses that servers public IP. Why? How do I get postfix to use the
>> internal IP address?
>>  
> My question would be how do you have a DMZ'd mail server  and also an
> internal mail server that has a public facing service. Wouldn't you
> want the internal network to not have public facing servers.  
> Obviously forget this if the internal server isn't accepting
> connections to port 25 using the public IP.
The DMZ is an SMTP server that filter incoming mail for the internal
server. The internal servers have their pop3 and imap ports open to the
outside world so everyone can get their mail from them. Port 25 or 465
for that matter are not open on the internal servers.
Just so you know, although you told me to ignore your post in such a case.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: hosts file

Dario "subbia" Cavallaro
In reply to this post by Victor Duchovni

Il giorno mar, 29/04/2008 alle 13.47 -0400, Victor Duchovni ha scritto:

> On Tue, Apr 29, 2008 at 05:41:31PM +0000, Curtis Vaughan wrote:
>
> > So, I have a postfix server in the DMZ. In order to hand off mail to an
> > internal server I have set the hosts file (/etc/hosts) to point to the
> > internal server. Pinging the domain name per the hosts file shows the
> > internal IP. However, when postfix send mail to that server, it uses that
> > servers public IP. Why? How do I get postfix to use the internal IP
> > address?
>
> http://www.postfix.org/postconf.5.html#smtp_host_lookup
>
> If you chose both "dns" and "native", DNS will happen first. You may
> need to define an additional transport (or use the "relay" transport)
> which only does "native" lookups.
>

Some other questions:
1) what option are you using in order to relay mail for?
2) why not using the IP address (instead of the hostname)?
3) what about setting correctly the internal DNS, that has to be
different from the public one?

Hope to be helpful.

--
Saluti
Dario "subbia" Cavallaro

Loading...