Sendmail configuration

I'm running sendmail 8.8.6 on a Slackware Linux box which is serving as a mail server (i.e. several DNS MX records) for multiple domains.  All has been fine in the setup for some time.

I've now run into a situation that needs some help.  Currently, the usernames are common between the different domains served.  For example, john@domaina.com is equivalent to john@domainb.com and so on. They both end up in the mail inbox for john on the server.

The need now is to be able to map each of the above to DIFFERENT mail boxes on the server.  So:

john@domaina.com --> Maps to john_a
john@domainb.com --> Maps to john_b

of similar.

(BTW, please don't supply answers using the M4 configuration for sendmail.cf.  It's too cryptic and we don't use it.)
LVL 32
jhanceAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ahoffmannCommented:
how about using /etc/aliases
Do I understand right that the MX record for both domains point to the same server (sendmail)?
0
jhanceAuthor Commented:
ahoffman,

I guess I don't see how /etc/aliases can help here.  Since the domain name is already stripped off by the time the address gets to /etc/aliases, there is no useful effect there.

You are correct that there are MX records for multiple domain names that point to the same mail server.
0
ahoffmannCommented:
I'm not shure about sendmail 8.8.6, but sendmail 8.9.x can use mailertables for this purpose.
The trick is FEATURE(mailertable), see the docs for details, sounds simple (didn't test it).
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

mohammedgCommented:
just add the line

john: john_a@domaina.com, john_b@domainb.com

to /etc/alias
0
jhanceAuthor Commented:
mohammedg,

Please read my question more closely.

Your suggestion just does what I currently have a different way.  I want these two addresses to be directed to separate email addresses.

The aliases line:

john: john_a@domaina.com, john_b@domainb.com

will cause incoming mail for john to be directed at both john_a and john_b.  This is not what I want.
0
jhanceAuthor Commented:
Adjusted points to 150
0
ahoffmannCommented:
you also may use procmail to what you want, it can setup filters to deliver mail into different mailboxfiles
procmail is under the user's (john) control, and does not need any changes in sendmail (or any other MTA)
0
roaldCommented:
You will have to use the virtusertable-feature. Read about it at http://www.sendmail.org/virtual-hosting.html

I know you said you don't use the m4 configuration tools, but there is really no way around it in this case. And it's only about 25 lines of code?? I have a similar server with 15 doamins getting mail by ETRN and 15 domains getting it by POP, and several of the users have the same usernames.

It's hard setting it up the first time, but then it just works.

You're welcome to mail me at ee@nont.cx, if you want to test it further or get more help.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jhanceAuthor Commented:
Too bad you got the points for this wrong answer.  I must have missed your posting this answer and the autograder got to this question.

Virtual Hosting is _NOT_ the solution to this problem, it's the solution to the inverse of this problem.  I already have the mail server operating as a virtual host but what I want is the ability to have sendmail differentiate between identical user names sent to different hosts that the mail server.

Virtual hosting does this:

user1@domainA.com --->  user1
user2@domainB.com --->  user2

What I want it:

user1@domainA.com ---> user1
user1@domainB.com ---> user2

See the difference?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Networking

From novice to tech pro — start learning today.