Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Configuring Sendmail to pass all mail for a domain to an Exchange server

Posted on 2004-04-15
4
Medium Priority
?
611 Views
Last Modified: 2010-03-18
Running Sendmail 8.12.10 on a Redhat Linux 9.0 Enterprise machine. This server sits in a DMZ. Its hostname is "ns1priv" in the local domain "priv.local". We have masqueraded the domain so that outgoing mail shows as "user@domain.com". Now we need to have this box accept all mail for "domain.com" and route it to an Exchange server that sits on the inside network.
At this point, testing mail sent from the Internet to "user@domain.com" returns a "user unknown" message as the user doesn't exist on the localhost.
How can we configure Sendmail to pass all the mail that is for our "domain.com" into the Exchange server? Without becoming an open relay, of course.
Thanks,
Jeff
0
Comment
Question by:Sysdeath
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 17

Expert Comment

by:owensleftfoot
ID: 10837585
You need to look at the Smarthost option in sendmail.cf
0
 
LVL 40

Accepted Solution

by:
jlevie earned 1500 total points
ID: 10839102
There are three ways to have the Sendmail box forward mail it receives for your domain to your exchange server, as follows:

1. You can use virtusertable or aliases to explictly forward mail for each user to their account on the  exchange server. This has the disadvantage of requiring you to maintain a user list on the Sendmail server but has the advantage of reducing the load caused by spammers since Sendmail will reject mail for accounts that don't exist.

2. Use mailertable

3) Include "define(`LUSER_RELAY', `smtp:xchange.domain.com') in your sendmail.mc.

(2) and (3) both will relay everything that is addressed to user@domain.com, whether the address is valid or not.
0
 

Author Comment

by:Sysdeath
ID: 10844311
Thank you.
Used # 2, but had to empty the local-host-names file so it receives no mail locally, but relays all the mail for domain.com.

Jeff
0
 
LVL 1

Expert Comment

by:JohnnyLingo
ID: 10998172
Yeah, mailertable is the best way to go.  The rule in /etc/mail/mailertable would be:

domain.com <tab> relay:exchange.domain.com

And domain.com would be in /etc/mail/relay-domains (not /etc/mail/local-host-names).  If you're running the relay_based_on_mx feature, both files can be empty.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question