Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 237
  • Last Modified:

User list from active directory for mail routing

Hi,

I have a situation where I need two exchange servers from separate organisations to be able to recieve mail on the one domain name. I have figured that I would use a linux box of some flavour to run a script everytime mail was coming in to look up the username in the seperate domains, once it found the user in one of the domains it would forward that email to the appropriate exchange server, via SMTP.

So basically I just need a linux box sitting in front of the two exchange servers to seperate the mail. I would prefer to have two scripts, one to create a user list txt file by running a LDAP query on the AD's once a day and another to forward the mail by looking at that txt file. Im guessing I would need a mail server of some sort, exim maybe ? then configure its router to do the forwarding job.

Any suggestions would be greatly appreciated.

Michael.
0
Sinzzzz
Asked:
Sinzzzz
1 Solution
 
rugdogCommented:
you could use sendmail and assign a catch-all entry in virtusertable, then in the catch-all account use procmail to do the LDAP search and forward to the appropriate mail server.
0
 
jlevieCommented:
You could use a perl script to build an aliases or virtusertable map that forwards mail to the appropriate exchange server.
0
 
de2ZotjesCommented:
You can use postfix to do this. It can receive the mail and using virtusertables forward the mail to the appropriate boxes. The big advantage of postfix over sendmail in this case is that you can have postfix read LDAP information as the virtual user tables. So you can use information directly from the AD. no need for daily updates or cronjobs.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
rugdogCommented:
sendmail can perform ldap searches for mail routing, too. however, usign a MTA that directly searches the LDAP server for figuring out who themail is directed too, means that all addreses in the current LDAP servers must be updated with another address for the new domain, besides how do you handle searching both LDAP servers with postfix and/or sendmail?

0
 
de2ZotjesCommented:
I don't have the manuals at hand, but I think that you can define some additional properties for a LDAP connection, you might even be able to abuse that into delivering the proper mail address, the data has to be in there already (at least in the dn). Also in postfix you can use multiple lookup-tables (as in sendmail- you can easily use more than 1 alias file).

This is not helping to answer the question though...
0
 
SinzzzzAuthor Commented:
Thanks for the suggestions guys. All was helpfull. I will start playing around with postfix and let you know how i Go.

Cheers,

Michael.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now