Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sendmail problems in DMZ

Status
Not open for further replies.

kakubei

MIS
Feb 6, 2003
1
US
Hello. I have a Solaris 9 server running sendmail. I have forms in php that send automated emails when filled out. The problem arises when I try to send email to both my inernal mail server and the outside world. I can do one or the other. If I use sendmail as the SMTP server I can deliver mail outside without a problem. But I cannot deliver mail to my internal mail server because the sendmail server is on a DMZ, when it gets the MX record for our email server it points to the outside address of course and the DMZ cannot communicate with the outside IP address.

I even tried a static mapping for our external mail server on the firewall so that the sendmail server has an ip in its own subnet:

i.e: sendmail server = 172.16.0.10
mail.mydomain.com = 172.16.0.7

then I put that into the hosts file of the sendmail server: 172.16.0.7 mai.mydomain.com

so that when sendmail is trying to resolve the MX record for our domain it uses the mapping instead of the external address which it cannot communicate with.

But it turns out that sendmail is not looking at the hosts file (apparently), it's going straight to DNS.

Can anyone shed some light on this or have any workarounds?

Thanks a lot.
 
I'm having trouble understanding what you have here. Are you running one sendmail server for external mail and another sendmail server for internal mail?
 
If I read that right you are trying to use the Sendmail server in the DMZ as a relay server to receive emails from the outside world and deliver them to the inside?

To start with, have you opened up port 25 on your firewall to allow SMTP mail through it?

To get sendmail to receive smtp then forward it on to another host you have to configure a mailertable file for your domain. The contents of the mailertable will roughly be

mydomain.com esmtp:[ip address of internal machine]

this means that any emails delivered to @mydomain.com will be sent to the internal machine.


Take a look in the FAQ section (faq14-3065) - I've written one that does I think what you want but on a LINUX box. It's not too difficult to modify it for solaris. Its just the locations and directories that are different.

Hope this helps and points you in the right direction
~ Remember - Nothing is Fool Proof to a Talented Fool ~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top