Sendmail And Micro$oft Exchange

tonyb_1
tonyb_1 used Ask the Experts™
on
HI people. I am trying to set up sendmail to retrieve email and forward it to our exchnage box.

The linux box is redhat 6.0 running sendmail ver 8.9.3. The Micro$oft box it running NT 4sp5 and exchange sp2.

How do i configure sendmail to forward all incomming email to the exchange server.

I want to do this for two reasons. First I wan to take the modem of the NT box and secondly we need to keep exchange even though it cannot retrieve from pop mailboxes.

I have managed to set up
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Are you using DNS? If you are you just need to create a MX record for the domain that point to the exchange server.

If not, then add a smart relay host to your sendmail.cf file.

Ex:

DSexchange.server.name

Where "exchange.server.name" is the name of your exchange server.

Put it in the local info section.


Author

Commented:
is it possible to have more than one smart host ??

We are not running DNS at all so sendmail is configured with the isp mail servers as its smart host.

I can send from exchange through sendmail and out to the world but when emails come back i cannot pass them back to the exchange server. they just bounce back user unkown


thanks

Commented:
Can you telnet to the exchange server on port 25? Make sure that exchange is listening for SMTP traffic on port 25.

If you get a response, try sending yourself a message.

type: helo <your name>
type: mail from: <your email address>
type: rcpt to: <your email address>
type: data
type: any old message
type: .

Each line is to be followed with a carriage return. SMTP is very picky about what you type. Even a backspace will cause SMTP to misinterprate the command. Perform this operation from the Linux server. I am assuming that your Linux box is in your DMZ and that mail needs to pass through the firewall to the exchange server. This procedure will help eliminate a firewall problem with inbound SMTP traffic.

Also, have you checked that mail is arriving to your Linux sever from the internet. Is the Linux server dialing an ISP for mail or are you directly connected to the internet?

If you can send mail in this fassion, then sendmail will need to have a rule set added to include a smart relay to your exchange server. Or more preferable is to setup DNS and add an MX record for your domain. If you can't send email in this fassion, then you need to fix this problem first.
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

Commented:
Use "smart host" to forward all OUTBOUND mail to your ISP.

Use mailertable to forward all INBOUND mail to your Exchange server.

To use mailertable, support for it must be configured in your sendmail.cf, and if I remember correctly, on Linux systems it is, by default.  You can find information about how to use mailertables at http://www.sendmail.org/m4/mailertables.html.  

Basically, the mailertable consists of a file with two colums; in the first column put your domain name, in the second put the name of your exchange server.  You mailertable should look something like this:

mydomain.com          smtp:[exchange.mydomain.com]

in this case, all mail addressed to @mydomain.com will be relayed via the SMTP mailer to exchange.mydomain.com.  The square brackets indicate that the mail is to be relayed "directly", that is no MX record lookup will be done.  

If you have mail addressed to subdomains, then include an entry for each subdomain, like so:

east.mydomain.com      smtp:[exchange.mydomain.com]
west.mydomain.com      smtp:[exchange.mydomain.com]

Store your mailertable in /etc/mailertable.  And compile it using makemap, like so:

  #  cd /etc
  #  cat mailertable | makemap hash mailertable

That's it, you don't even need to stop and re-start sendmail when you compile a new database.  

Hope this is it...

--frankf

Author

Commented:
Thanks gouys will try out your idears.

Will let u know

Author

Commented:
Thanks guts sorry about the dalay in answering :-))

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