Skip navigation

Email server how to send local email without sending to internet

438 Views 5 Replies Latest reply: May 6, 2012 8:48 AM by gracoat RSS
Chen Zhongguo Calculating status...
Currently Being Moderated
May 5, 2012 8:11 AM

I have setup a local(intranet) email server, with a email address domain name same as our webmail host on ISP. I found every mail send from local server it is always sent to our webmail. I just only want it to send locally users mailbox.

Mac Pro, Mac OS X (10.7.3), email server
  • gracoat Level 3 Level 3 (645 points)

    You need to me more clear about your problem.

    What do you consider to be the definition of "webmail" and what web address are you typing to see the webmail?


    Be more specific about the issue that you're having.

  • gracoat Level 3 Level 3 (645 points)

    When your mail client sends a message, it's addressed to

    The SMTP part of your server looks up the MX records for and decides which IP address to send the message to.'s mail server recieves the message and sticks it in the mailbox with Richards name on it.


    The reason that Richard isn't getting is that the message didn't go to's mail server.  It went to's mail server.


    The only way you'll be able to get richards emails from is to set up a forward rule in the's mail server that says, "any time a message lands in Richard's mailbox, forward it to"


    The other thing you could do is to set up a second email account in the Mail client.  One could be and the other could be  Each one checks for emails from it's own server, and both send messages through your local server.


    DNS Rules can be tricky to understand.  Think of it like this. and might live in the same house, but they each have their own Cellular phone.  Neither one will ever recieve a phone call from someone that dialed the other's number.




  • gracoat Level 3 Level 3 (645 points)

    Okay... Well then it actually simplifies the answer.

    In terminal, type:




    Where is the fully qualified domain name of your server.

    Here's an example of what you'll see.


    >> host has address has address mail is handled by 40 mail is handled by 5 mail is handled by 10 mail is handled by 20 mail is handled by 30


    The first two lines (after my command) are IP addresses of the gmail servers.

    The next lines are all mail servers that respond to


    What you need to understand is that you can't have messages go to more than one server when someone addresses a message to you.  The top server in this case is  It has a rating of 5.

    If and ONLY IF this server can't be reached or is too busy, the internet will AUTOMATICALLY and uncontrollably send the message to since it has the next highest rating.  10 in this case.


    So even if you changed your MX records to add your internal server to your list, you'd only get messages to '' when your outside server was busy.

    And vice versa, if you placed your internal server at the top of the list, then your external server would only get messages if your internal server was unreachable.


    Another sucky thing is this...  If you decided that you wanted to change these mx records for your convenience, unfortunately it takes the internet a number of hours to fully propegate the change to all the other DNS servers around the world.  When you changed it, there would be no reliability for proper delivery for a few hours after the change.


    The only way you can make this work is to set up your mail clients with two separate email accounts.  Both with the same email address, but with two different POP/IMAP servers.

    TBH, I'm not sure that will even let you do that.  Worth a shot though!



More Like This

  • Retrieving data ...

Bookmarked By (0)


  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.