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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Routing sendmail to an exchange 5.5 server

Status
Not open for further replies.

tekquest

Vendor
Feb 1, 2003
224
0
0
AU
all,

I have been trying to find information on setting this up, but nothing is relivant.

I have configured a php page which i can send short emails to users of our exchange 5.5 server, but the mail is routed outside via our adsl connection then comes in through the anti-virus software at our gateway and is passed onto the exchange server for delivery into a users mailbox.

would it be possible to configure sendmail to send messages directly to the exchange server? instead of leaving the premises, then being routed by an external mail server to our domain?

its a rh9 box running sendmail, any input would be appreciated.

Luke
 
Hi,

User smart host option in sendmail. eg

DSexchange.domain.com

Make sure you restart your sendmail.

dbase77
 
Hi dbase77,

what sendmail config file is smart host defined? is it sendmail.mc?

would the correct layout be:

DSmail.mycompany.com???

Thanks for your reply,

Luke
 
Hi,

2 ways to add smarthost option. Either you edit your *.mc file and compile sendmail config file again or edit your sendmail.cf file. Within sendmail.cf file contains a line starting with DS. Just add you exchange server hostname and restart sendmail daemon. Make sure exchange hostanme can be resolve or it will fail. Put exchange hostanme in /etc/hosts file.

dbase77
 
Hey,

Ok, I have modified my sendmail.cf file to include DSmail.myexchangeserver.com and also modified the hosts file to include the ip address of the server + computername (mail) and its fully qualified domain name (mail.myexchangeserver.com).

Upon restarting sendmail, it doesn't send the messages but notes "connection timed out with mail.myexchangeserver.com"

have I done something wrong in the config?

Thanks for your reply. :)
 
Hi,

Looks like you having problem to connect to exchange server from your box. Can you "telnet mail.myexchangeserver.com 25" from your box?

dbase77
 
Hello,

Yes, I can no worries, I can also send a message to a user (i.e. person@myexchangeserver.com) without any problems.
 
Sendmail's log's say "connection with mail.myexchangeserver.com" timed out. but I can send a message manually, (i.e. via telnet.)
 
Hi,

On exchange box, can you check your mail log file please. See if you have anything come from your sendmail box. Check exchange as well to relay sendmail box.

dbase77
 
Hello,

I think I might have found out why its not getting messages through and erroring with the "connection timed out".

It appears that when trying to send messages, its looking at the internet address of the mail server I am trying to route messages through, not the internal address.

I have checked my hosts file and when I ping mail.myexchangeserver.com it returns the internal address, but sendmail still looks upon the public IP address.

I have tried pinging just "mail" and it returns the internal I.P. address of the mail server, but when recompiling the sendmail.mc > sendmail.cf with the smart host as "mail", it makes no difference.

Is there anywhere else in sendmail.mc where this is modified? at the bottom of my sendmail.mc file, I have masquerading of my domain as the exchange server (mail.myexchangeserver.com) - (it also has DNL infront of each line) is this incorrect?

Thanks so much once again,

Luke
 
DNL = delete thru new line.
Antything after dnl is omitted when sendmail is recompiled with the m4 preprocessor. It is generally accepted that you should never edit the sendmail.cf directly but rather modify the sendmail.mc to recompile sendmail.

Cogito Ergo Sum - Non Compos Mentis
 
removing the dnl entries for masquerading of my exchange server, is that correct?
 
Removing DNL will enable masquerading for your sendmail server.

Cogito Ergo Sum - Non Compos Mentis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top