Linux Mail system : I want to route a particular users mail to POP3 account in ISP

I have a linux mail server. Domain is  "mydomain.com" . We have purchased a pop3 account from ISP and the email address will be "user@mydomain.com" So locally we have same domain and also at ISP side we have same domain name. Now the problem is  - when the user goes out of station he will access his mails directly from ISP mailbox. So he will get all the external mails. But whatever mails sent from our office to that user "user@mydomain.com" that mails will be droped locally to our linux box. The case is that we have same domain names on both the sides. so whenever the local linux box get the mail from local users to  "mydomain.com" it assumes that the local linux box is "mydomain.com" so it will drop the mails locally. So anyone can help me out regarding this

Thanks
Kiran
krasquinhaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

psimationCommented:
The problem is that the local machine is set up to handle the e-mails for the domain as well. You should be able to fix this by doing either of the following:
Don't run DNS on the local machine, instead use the ISP DNS servers. Your domain has a zone file located somewhere, and in that zone file is the authorative MX record. Your local machine should use the same version as the rest of the world. You could also still ellect to run a DNS server on the local machine, but then make sure that the zone file is configured to point the MX to the ISP and not locally. You should also make sure that your /etc/mail/local-host-names file do not contain your domain name, but if you use your ISP DNS serices instead, you houldn't have this problem.
0
krasquinhaAuthor Commented:
i have not configured a DNS server on that machine i am using sendmail and fetchmail (Redhat 7.1) In local-host-names i have given "mydomain.com" I want all local mails to be routed locally ..only for one user i want to forward it to his roaming POP3 id . (Problem is on both the mail servers the local and ISP we have same user aliases)
0
radfojcCommented:

Since you run fetchmail on your linux box that downloads all the email from your ISP you need to either have him dial into your local network to collect his email, or have the ISP seperate out his account from being bundled together, yet still have fetchmail collect them all, that way he will be able to read email remotely and at work.

-Jason
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

tkalchevCommented:
Maybe a solution is "remote" users to open pop3 to your ISP AND your mail server, check mails on both places.
0
udosoftCommented:
I think the hole problem is to use the same name.
If you're have pernament connection, with fix ip you have different choises.
I think the best is to not have pop3 by isp, have a mail server on firewall or have nat to the server inside on pop3, and smtp port, only have mail relay enabled by isp. (mail mx with higher number for ISP relay and lower for your server). Check the current setting by using host -a mydomain.com
I suggest to install some webmail too (like Ilohamail more secure , Openwebmail less secure).
You can have only an realy mail server for more security reason to get mail on firewall, give mx record for firewall and the mydomain.com +ip in the host file on the firewall, and enable relay to mydomain.com. It will than forward all mail to the mailserver inside.
for example:
xxx.hu.                 86400   IN      MX      20 relay.datanet.hu.
xxx.hu.                 86400   IN      MX      5 mail.yyyy.hu.
xxx.hu.                 86400   IN      MX      10 xxxisdn.dialin.datanet.hu.

mail.xxx.hu is the mailrelay server wich have mail relay enabled to xxx.hu and than it has a host entry for xxx.hu in the hosts file (local ip). (so they can only check mail internaly and the internal server is secured and could be other like Lotus Domino:)


If you have not pernament access or fix ip you have to use always the ISP-s pop3 server as mail server.


Other solution is to play with hosts file, or use for example usertable usersdb (sendmail) or canonical (postfix) to redirect mail.

I have to know if pernament access, and what you're want.
Do you want, the people can get all mail from outside? None from outside etc...?
Witch mailserver? postfix, sendmail, etc...
0
CleanupPingCommented:
krasquinha:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
paullamhkgCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is to:

Be PAQ'd/Points No Refunded

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Paul
EE Cleanup Volunteer
0
AnnieModCommented:
Per recommendation.

AnnieMod
Community Support Moderator
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.