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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deliverying locally and relaying for same domain?

Status
Not open for further replies.

dougtran

IS-IT--Management
Aug 4, 2003
7
US
I've spent the last 24 hours Googling and can't seem to come up with a good
solution except to write a customized ruleset. Maybe there is an easier
solution.

Here's my situation:

In the past, all mail went through our MS Exchange 5.5 Server
(exchange1.domain1.com). However, Exchange has a poor anti-virus API and
spamming tools. Therefore, I built a Redhat 9.0 (sendmail1.domain1.com) as
a relaying email server with Spamassasin/MIMEDEfang/UVscan. I have the MX
for 'domain1.com' to point to 'sendmail1.domain1.com' and I have setup
'sendmail1' as the smart-relay host for 'exchange1'. 'sendmail1' is also
acting accepting local emails for the virtual domain 'domain2.com.'
Squirrelmail has been provided for users of 'domain2.com' to access their
mail that reside locally on the sendmail1 server. Everything is working
fine so far (4 weeks). Here's some more info:

sendmail.cf:
-Masquerading as domain1.com for localhost and domain2.com. ;translated
liberally:)

access:
localhost RELAY
domain1.com RELAY
domain2.com RELAY

local-host-names:
localhost
domain2.com ;to accept local email for virtual domain

mailertable:
.domain1.com esmtp:[exchange1.domain1.com] ;relay
all domain1 email to exchange server
exchange1.domain1.com esmtp:[exchange1.domain1.com] ;the first
didn't' always works so as a precaution

virtusertable:
user1@domain2.com user1
user2@domain2.com user2

genericstable:
user1 user1@domain2.com
user2 user2@domain2.com

Now, as we all know Microsoft loves to make money so they charge a
high-price for Exchange licenses. Therefore, I want to be able to create
accounts on the sendmail1 server for our new users. However, the form of the
emails needs to be in the syntax of: {someuser}@domain1.com. I found this
to be a big problem because the MAILERTABLE will always try to foward these
address to the 'exchange1' server, where it will get rejected since no users
exists on the machine. Now, I tried adding the users to the virtusertable
in the form:

{someuser1}@domain1.com someuser1

but sendmail seems to ignore it. After some research, I've discovered that
'domain1.com' has to be in the LOCAL-HOST-NAMES file in order for it to
work. However, if I do that, it breaks the MAILERTABLE assignment because
now it think is a virtual host. I have also tried using the class L by
using LOCAL_USER_FILE(localfile) in the sendmail.mc file and rebuilding
sendmail.cf w/o success.

I see two options, get rid of MAILERTABLE and exclusively use VIRTUSERTABLE
but that will seems to add some extra burden on the administration of the
usernames, or create a ruleset that would force local delivery for these
users that I would read in from a file. Unfortunately, I'm new to sendmail
and my Lhs/Rhs knowledge is limited. I'm thinking I just don't have the
right architecture design so any input would be great.

Thanks,
Doug



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top