Solved

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

Posted on 2004-04-15
4
556 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
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 500 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

Suggested Solutions

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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

762 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now