Handling exchange routing with an existing IMAP/LDAP mail server

Posted on 2006-04-10
Last Modified: 2013-11-29
We are considering a migration to Microsoft Exchange 2003 server.  During the exploration of feasibility etc., we would like to prestage the migration of all 500+ mail accounts using the exchange IMAP migration wizard.  The current mail store is approximately 200GB so doing a bulk migration all at once isn't feasible from a training and migration perspective.  We would prestage the environment and then as the training group is occuring (20-40 users at a time) rerun the IMAP migration wizard using a date range for emails to merge.

The biggest question that we have at this point is can we have exchange route the messages back to the existing IMAP mail server for the existing accounts that have been prestaged?  When a newly migrated user on exchange sends an email to a migrated email group but a user in that email group is still working in the legacy environment (haven't been migrated yet) will exchange attempt to deliver that email locally by default?  Is there a way to configure exchange so that it will NOT look to it's own mail stores and by default forward everything out to the existing mailserver where it could then get routed back to exchange through a mailforwarder attribute in their LDAP record?

Thanks in advance for the feedback!
Question by:jasgbair
    LVL 35

    Expert Comment

    Sound a little bit strange, but I assume, what you intend to do.

    Note the following:

    You will have temporary two responsible mail servers. One of them gets mails and has to forward mails, which are not hosted on itself, to the other server.

    Exchange understands a domain as organisation, where several servers can exist. As long as all mailboxes are in the same organisation and all servers are within the same routing group, it doesn't matter, where a mailbox exists. If you have a non exchange server, you may use a few of the features , exchange can use to handle other mail servers than exchange.

    Within your virtual SMTP server, you are able to forward all mails with unresolved addresses to a different server. Means, if exchange hosts the mailbox, the mail is delivered, if not, exchange forwards them to a different server. In that way, it doesn't matter, where the mailbox resides. If you move mailboxes one after each other to exchange, exchange recognozes the new mailboxes and will deliver these mails locally.

    What you can do with mail groups (I assume distibution lists?), I assume, that the current list are hostet outside active directory? This depends a little bit from your current system and from the number of lists you have. You can setup a new list with the moved users and keeping the old list address as contact within the list, until the old list is empty. A mail to the new list is sent to the moved users and additionally to the old list (as echange do not have a mailbox for them and will forward it).

    I never worked with the IMAP migration wizard, so I'm not quite sure, what this wizard is able to do.


    Author Comment


    This part is what I'm hoping to avoid:

    "if exchange hosts the mailbox, the mail is delivered, if not, exchange forwards them to a different server"

    I want everything to be forwarded first to the legacy email server and then potentially routed back to exchange based on a mailforward entry.  Not all users will be migrated to the exchange server at the same time (but we want to prestage the environment) and if one of the newly migrated exchange users emails a user (either directly or through a distribution list) that is still on the legacy email server can exchange be configured to send everything to the other mail server and NOT look to its own mailboxes?

    LVL 104

    Accepted Solution

    What you want to do is share the SMTP namespace.
    There are a couple of ways of doing this that Microsoft recommend.
    Take a look at these articles to get started:

    LVL 35

    Expert Comment

    Let me try to explain, what I understood.

    New User = migrated user on exchange
    Old user = existing user on old machine

    New User sends a mail to Old User
    The mail should go to exchange - >
    -> exchange forward it to the old system
    -> the old system do not have a mailbox, therefore send back to exchange
    -> exchange puts it into the users mailbox

    I would call this as somthing like a loop. If your client uses the exchange server for transport, the exchange server will put the mail directly into the mailbox.

    If you read esp. the second article from Sembee, you may have an idea how to work around this. By creating a temporary second namespace for exchange, exchange is not responsible for the original domain, therefore you are be able to route these mails to a different server. But in that case, your old server have to solve the problem to reroute the mail to the mail domain, exchange is listening to.

    Old server listens to
    Exchange listens to @olddomain.local

    New User send mail to
    -> Exchange is not responsible, therefore you can route it to your old server
    -> old server has a rule to forward mails to this user to NewUser@olddomain.local
    -> old server is not responsible, therefore routes to exchange
    -> exchange identifies, that it is responsible and delivers the mail.

    If all users are move, you can add to exchange an make it the main address

    Ups, sounds strange, but just an idea, nevertheless read the article from Sembee
    Also you should test this szenario

    QUESTION: You havn't said something out your old system...


    Author Comment

    From what I understand, by creating a secondary namespace I can route between the mailservers while avoiding looping and still be able to maintain an environment where I can prestage all accounts and data?  Sounds like it is very easy to make the default change of domain name once everyone is migrated over then right?

    Thanks again.
    LVL 35

    Expert Comment

    namespace = email domain = @olddomain.local

    This is the general idea, but test the szenario first with a few test accounts....
    LVL 104

    Expert Comment

    Remember that the default domain on Exchange is the domain that the email goes out with.
    When I use the method of the secondary namespace it is to route email internally, forwarders etc.

    For example, with all email going to the Exchange server (although it would work equally as well the other way), you create all the accounts on Exchange with the default address of
    Each account has a forwarder placed on it to send to
    On the imap server you configure it so that it will accept email for, and puts it in to the correct mailbox - probably via an alias.
    An SMTP Connector is put in place on the Exchange server for and pointed at a smart host - the smart host being the imap email server.
    Email comes in to the server. If the account has been migrated, it stays put, if the account has not, then it gets sent over to the other server.

    You could also use the Forward Unknown Recipients to feature in Exchange. That would require creation of the accounts as you go along. I am not a great lover of the method as it means the Exchange server sends everything to the other server, including garbage emails.

    LVL 35

    Expert Comment

    Jepp, Sembee is right, the outgoing mails would be sent as @olddomain.local, what is not a good idea.

    Following Sembees hint, I would now say, try the opposite direction
    IMAP :

    This ensures, your exchange will not touch mail sent to the old domain.
    What you have to solve in this szenario is, what happended if somebody hits reply (in both szenarios)
    For this you would have temproray register with an MX record, otherwise it may bounce back

    Author Comment

    Thanks for the responses.  Can exchange be set to default to something other than the AD domain?  Our AD domain is currently and our legacy email server (Sun One JES) and SMTP namespace is exactly the same,  

    LVL 104

    Expert Comment

    Exchange can default to anything that you like.
    You need to leave the AD domain in the recipient policy, otherwise you will have problems with the operation of Exchange.
    However the default domain in Exchange is also what is stamped on the email addresses as they go out - so bare that in mind when planning the migration.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Learn more about how the humble email signature can be used as more than just an electronic business card. When used correctly, a signature can easily be tailored for different purposes by different departments within an organization.
    Create high volume marketing opportunities using email signatures with these top 10 DOs and DON'Ts of email signature marketing.
    In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…
    This video discusses moving either the default database or any database to a new volume.

    759 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

    10 Experts available now in Live!

    Get 1:1 Help Now