Solved

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

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

713 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