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 forwarding to Exchange 1

Status
Not open for further replies.

marlonj

Programmer
Apr 3, 2001
4
US
I'm running the sendmail version that came with my Redhat 7 dist. There is an existing Exchange server that is the mail hub for the company. I really only need sendmail to forward email to the Exchange server.

I edited the DA and DM lines in the default sendmail.cf and have sendmail successfully getting mail to users outside the firewall. However, mail to users inside the firewall gets bounced with a "unknown host/domain" by what looks like our ISP's mail hub.

I've tried editing and makemap'ing mail/access, mail/mailertable, and even mail/virtuserstable to point user@mydomain.com to the Exchange server. I'm either doing something wrong, or this is just the wrong way to go about it.

Any help much appreciated!
 
It sounds like you're re-directing mail internally to a domain name that's only recognized inside the company but the mail is getting routed to the ISP where the domain name can't be resolved. If this is the case, I would try sending mail to user@ExchangeServer'sIP if the exchange server's IP is a publicly accesible IP. This would be a patch while I think the long term solution is getting sendmail to not direct mail destined internally through the ISP's system.

The first question I would ask is what domain name are you using for the exchange server? Unless you have an uncommon config, Sendmail will lookup the mail exchanger for this domain name and attempt to send it to that server. You'll need to make sure the DNS has the Exchange server's IP listed as the mail exchanger for the domain name you're directing internal mail to.

Let me know if I'm not clear.
GJ
 
I don't think I made my problem clear the first time. I think the "unknown host/domain" is my Linux box (bacchus) where the mail orginates. We have a slightly uncommon situation where we use microtalk.net internally because that was the original company name, but we are now telespree.com. I think that mail to user@microtalk.net and user@telespree.com make it to the same person.

----- The following addresses had permanent fatal errors -----
marlon@telespree.com
(reason: 553 <root@bacchus.microtalk.net>... Unknown host/domain bacchus.microtalk.net)

I also tried mailing user@internalExchangeIPAddress and user@externalExchangeIPAddress and got a different error message.

550 5.1.2 marlon@192.168.1.9... Host unknown (Name server: 192.168.1.9: host not found)
 
I assume then that people on the outside mail to your new domain name and there aren't any problems with incoming mail. You're just dealing with mail problems for mail originating inside and destined for an internal recipient, correct?

If so, I would verify that bacchus.microtalk.net is a valid domain name (ping &quot;bacchus.microtalk.net&quot; from bacchus) and that the machine bacchus is configured so that it recognizes bacchus.microtalk.net as it's name. I would also check your sendmail.cf and make sure you're not overriding the machine's host name. There's a config line option that allows you to set the machine's hostname if Sendmail can't detect it automaticaly.

So I understand your situation a little better, does everyone in the company have their mail clients set to use bacchus as their outgoing/smtp server? I don't deal with mail serve problems that much so I'm kinda fumbling around at the moment but this sounds to me like a simple config issue.

GJ
 
Mail from the outside makes it fine to the exchange server using the new domain (e.g. user@telespree.com).
I checked what I think is the override domain line (Dj$w) and it's still commented out.

This situation here is that everyone is using a single exchange server for email. I'm setting up a Bugzilla bug tracking db (linux, apache, mysql, etc.). Bugzilla has a really cool feature that it emails bug owners/authors when a bug changes. It's on the only linux box in the house (bacchus). I don't need incoming mail really, just for sendmail on the linux box to forward in-house mail to the exchange server.
 
Is the problem then just with e-mail that Bacchus creates/receives from Bugzilla and tries to deliver in-house?

GJ
 
No. Even just using mail (executable) from the root account gets bounced if I use either user@telespree.com or user@microtalk.net. But mail works find going to user@somewhereelse.com.
 
Hey Marlon,

I think I see the problem. I just checked and bacchus.microtalk.net doesn't exist as a valid hostname. I looked at your earlier post and I believe the message may be getting rejected because the sender's address (root@bacchus.microtalk.net) is invalid and not because of the recipient. If bacchus is rejecting the mail, I would add a local host file entry for bacchus.microtalk.net and see if the same error occurs. If it's actually getting bounced by your ISP's mail hub, I would add an entry in the microtalk.net zone file (located on NS1.CNCHost.com) for bacchus and see if that helps.

If not, I think we need to backup and systematicly go through a few tests to isolate the problem.

GJ
 
Make sure of the following:
1. you have added ur domain name in local info Cw line.
2. mailertable should also have an entry to forward mail to ur internal exchange server.
3. Firewall allows smtp traffic from sendmail box to ur internal exchange server.
4. Ruleset 98 should also have any entry to forward mail like
---------
R$+ < @ telespree.com.> $# relay $@ exchange.microtalk.net. $: $1 < @telespree.com.>
-------
where exchange.micrtalk.net is ur internal exchange server, make sure this host is having an entry in /etc/hosts file.
5. try telnet exchange.microtalk.net 25 and see if gets connected

I hope it would help you
Sadiq

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top