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 user@example.com

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

     

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

     

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

     

    The other thing you could do is to set up a second email account in the Mail client.  One could be richard@example.com and the other could be richard@example.net.  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.  Richard@example.net and richard@example.com 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.

     

    HTH

    -Graham

  • gracoat Level 3 Level 3 (645 points)

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

    In terminal, type:

     

    host server.example.com

     

    Where server.example.com is the fully qualified domain name of your server.

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

     

    >> host gmail.com

    gmail.com has address 173.194.33.22

    gmail.com has address 173.194.33.21

    gmail.com mail is handled by 40 alt4.gmail-smtp-in.l.google.com.

    gmail.com mail is handled by 5 gmail-smtp-in.l.google.com.

    gmail.com mail is handled by 10 alt1.gmail-smtp-in.l.google.com.

    gmail.com mail is handled by 20 alt2.gmail-smtp-in.l.google.com.

    gmail.com mail is handled by 30 alt3.gmail-smtp-in.l.google.com.

     

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

    The next lines are all mail servers that respond to anyaddress@gmail.com

     

    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 gmail-smtp-in.l.google.com.  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 alt1.gmail-smtp-in.l.google.com 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 'example.com' 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 mail.app will even let you do that.  Worth a shot though!

    -Graham

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • 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.