Currently Being ModeratedMay 5, 2012 9:56 PM (in response to Chen Zhongguo)
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.
Currently Being ModeratedMay 5, 2012 11:00 PM (in response to gracoat)
Thank Gracoat for reply.
We have our email host on a server hosted by ISP. Domain name is mail.example.com. We can access our webmail through mail.example.com.
We also build up local email server, the email server name is mail.example.net configured on local DNS server. And run Open Directory. User created in OD has email address like "firstname.lastname@example.org". Mail client connect to local email server.
If I send mail to email@example.com from firstname.lastname@example.org from mail client, there is no problem. But if I send mail from email@example.com to firstname.lastname@example.org it always is delivered to Richard's mailbox on mail.example.com. I want to it is delivered to Richard's local mailbox on mail.example.net.
Currently Being ModeratedMay 5, 2012 11:26 PM (in response to Chen Zhongguo)
When your mail client sends a message, it's addressed to email@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 firstname.lastname@example.org 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 email@example.com."
The other thing you could do is to set up a second email account in the Mail client. One could be firstname.lastname@example.org and the other could be email@example.com. 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 firstname.lastname@example.org 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.
Currently Being ModeratedMay 5, 2012 11:50 PM (in response to gracoat)
Currently Being ModeratedMay 6, 2012 8:48 AM (in response to Chen Zhongguo)
Okay... Well then it actually simplifies the answer.
In terminal, type:
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 220.127.116.11
gmail.com has address 18.104.22.168
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 email@example.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!