Solved

Server 2003 Email server: set up DNS to send and receive external email using dyndns services

Posted on 2008-10-25
27
784 Views
Last Modified: 2012-06-27
Hi,
I am an ex embedded programmer caught in a web of Windows Server 2003 standard edition for non profitable purposes.  I have been following discussions for some time now but have not found an answer to my problem so far. I would truly appreciate your help. My server is DC, DNS, DHCP, RA and Email server. Users are able to VPN to the server (certificate PPTP). I am not using Exchange but standard e-mail services.
I do have a dynamic IP address and therefore I have registered at dyndns with xxx.dynalias.net. My local domain is myname.local.
The problem is I am able to send and receive emails locally, but I would like to be able to receive and send also external emails. Well what I basically would like to do is to send emails for user@xxx.dynalias.net and translate it at the server site to user@myname.local and vice versa.    
I have checked with the WireShark external email is arriving to my email server but the username user@xxx.dynalias.net cannot be resolved and the server is replying to external host to drop the request.
I suppose there are records I have to set in my DNS, but I do not have a clue how to do it.  
Thank you very much in advance.

ivanadu
0
Comment
Question by:ivanadu
  • 14
  • 13
27 Comments
 
LVL 42

Expert Comment

by:paulsolov
ID: 22804987
You will need to contact your DNS zone provider (normally the company that you've registered your external domain with) and add an MX record.  Not sure how it would work with dynamic DNS but you can probably point your dns to your dnsalias.net.  

On the internet when you send an email it does a resolution with a name server.  It goes to the root or cached dns server and finds out the mx record for the specific domain.  I then routes to the ip address that corresponds to the MX record.

Hope this helps
0
 

Author Comment

by:ivanadu
ID: 22805024
I've been reading about CNAME and MX records, A records have no meaning because IP is changing, is it possible to configure some on my own server? Create a new forward zone...?
0
 
LVL 42

Expert Comment

by:paulsolov
ID: 22805155
You can point your MX to a an a record, example

mx record:  mail.yourcompany.com (yourcompany.com is your external domain)

dynamic dns record:  company.dnsalias.net


Your MX record would be

mail.yourcompany.com   --->  company.dnsalias.net

You will need to add this with the company that your dns record is set with such as godaddy, network solutions, etc..

You will then need to do port forwarding on your firewall/soho device to take smtp traffic and forward it to your mail server.

Hope this helps
0
 

Author Comment

by:ivanadu
ID: 22805214
In fact I do not have any other external domain except xxx.dynalias.net. I have done configure my Email on dyndns and I have forwarded my email to my server via my router. SMTP traffic is already passing through the router (ports are forwarded) and my local email server receives external emails for user@xxx.dynalias.net but cannot localy resolve to user@myname.local.
From a simple point of view this should be an internal issue, to translate xxx.dynalias.net to myname.local.
I thought that just a simple aliasing might do the job :)
0
 
LVL 42

Expert Comment

by:paulsolov
ID: 22805250
The .local is not routable on the internet and thus you will not be able to route it externally.  

To make this work on the internet you will need to register a domain and use dynamic dns to forward it to your mail server, dynsalias.net just creates just provides resolution to your ip address, to actually route email the only way to set this up is by getting a domain.  You can get one from godaddy.com or other for under $10/year
0
 

Author Comment

by:ivanadu
ID: 22806876
Hi thanks paulsolov :). I have done it. I do have a domain www.mydomain.com at godaddy. Any idea what I should do next? Thanks again
0
 
LVL 42

Expert Comment

by:paulsolov
ID: 22806898
go to dns management and configure the MX record to look something like this.

IN MX 10 sample.dnsalias.net.
0
 

Author Comment

by:ivanadu
ID: 22806951
so i have an option to add an mx record in the mydoman.local forward lookup zone and now i have :
(same as parent) MX Exchanger (MX) [10]xxx.dynalias.net
0
 
LVL 42

Expert Comment

by:paulsolov
ID: 22807008
yes, that looks like it should do it.  Best way to test is from an external machine since it should resolve to your external ip and may not do it correctly if you're testing from the inside.

Go to this website to test

http://mxtoolbox.com/diagnostic.aspx

And go to

http://iptools.com to check mx record for your DNS
0
 

Author Comment

by:ivanadu
ID: 22807117
and how do i relate my godaddy domain to my xxx.dynalias.net? Do I have to set anything extra?
0
 
LVL 42

Expert Comment

by:paulsolov
ID: 22807242
you will need to add your new domain to the recipient policy on your Exchange Server to reflect your new domain.  If the MX record routing works than it will send the emails to dnsalias that will resolve to your IP. Your internal routing should send the mail to the mail server which will see that it has the domain and will forward it to the appropriate mailbox
0
 

Author Comment

by:ivanadu
ID: 22807289
I do not have an Exchange server I am using Windows server 2003 email services pop3 an smtp. Does this make a difference?
0
 
LVL 42

Expert Comment

by:paulsolov
ID: 22807347
yes, and I appologize if I read the initial statement incorrectly, you stated that you have a mail server not just pop/smtp services running.  The pop/smtp services just pass the email inbound/outbound, you will need to setup a mail server if you don't have one already to store the emails before you can access them.  Once they arrive in a mail store you can then use pop/imap to get them into outlook/mapi client and use it to send outbound emails via smtp

There are plenty of free options such as Zimbra @  www.zimbra.org

Hope this helps
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:ivanadu
ID: 22807423
:) sorry that is what is confusing. If I install services and check the server roles I see that the email server is added as a role. I also have three users and their email store localy. Well I am not really sure what is happening with that email. It is for sure kept on the server.
All active directory users have to login via VPN to be able to receive and send emails to each other (well I did want to change and allow them to receive also external emails and send external emails).
Now I have a domain (well I was postponing this step because of the name but I got a good one) www.mydomain.com, I have dyndns that was working fine for VPN, Remote terminal xxx.dynalias.net, and I have my local "server" that I do not know what to do with to make it a real one or if I need it at all.  
I have attached a jpg for info.
roles.JPG
0
 
LVL 42

Expert Comment

by:paulsolov
ID: 22807449
You know you are correct, I have never set it up this way, I have done many Exchange and other mail server installations.  If it acts as the mail server than you may be all set.  I appologize for the confusion.

From MS website

http://technet.microsoft.com/en-us/library/cc780996.aspx

Mail server role: Configuring a mail server
Configure this computer as a mail server to install E-mail Services, which provides e-mail transfer and retrieval services. E-mail Services includes the POP3 service, which provides e-mail retrieval, and the SMTP service, which provides e-mail transfer. Administrators can use the POP3 service to store and manage e-mail accounts on the mail server. After configuring this computer as a mail server, users can connect to the mail server and retrieve e-mail to their local computer using an e-mail client that supports the POP3 protocol, such as Microsoft Outlook.

This topic explains how to use the Configure Your Server Wizard to install and configure E-mail Services. After you have completed the Configure Your Server Wizard, you must perform additional required steps to create mailboxes. After you have completed the Configure Your Server Wizard and created the appropriate mailboxes, you will have a fully-functioning mail server.

You can configure both member servers and stand-alone servers to be a mail server. However, the default authentication method and the available authentication methods will vary. For more information about the default authentication methods and the available authentication methods, see Before you begin and Configure POP3 Service.


Have you tested from the outside website to see if you can send email to your mail server from outside?
0
 

Author Comment

by:ivanadu
ID: 22807679
No problem, I was really confused. There is an option to create an MX record on dyndns service so if I send an email to user@xxx.dynalias.net from my gmail account, i can monitor traffic on the server using WireShark and I can see that the email for user@xxx.dynalias.net is arriving to my email server (or what ever :) ). The email server checks and says that is not able to resolve the user@xxx.dynalias.net and replies to gmail with QUIT.

I thought that it was possible to force my email server to say somehow well pass email user@xxx.dynalias.net to my user@mydomain.local. Or to say when you send an email replace user@mydomain.local with user@xxx.dynalias.net.
0
 
LVL 42

Expert Comment

by:paulsolov
ID: 22807732
There should be a way but it may be a function of dnsalias.net.  If not you can go with another service that does provide dynamic dns forwarding. I've seen a few for $20/year.
0
 

Author Comment

by:ivanadu
ID: 22807787
I recon it is a private issue of the server. I tried to create another forward lookup zone  dynalias.net and tried to create a record :). A record is the best description because I was not sure which record (MX, CNAME, combined).

In fact i am trying to find if it is possible or not, it looks so simple and straight forward but ....
Thanks anyway :)
0
 
LVL 42

Expert Comment

by:paulsolov
ID: 22807844
you shoud check if there is a way to relay emails for your dns.  The dynamic DNS is usually just a service that provides ip/dns name resolution and nothing else so that others can find your ip address on the internet as a static ip.  Setting up an MX record to point to the dynamic dns hostname is all that is normally required.  The only piece that dynamic dns service should do is provide the hostname xxx.dnsalias.net  the rest is on you.  If your server is getting a responce than you may just need to add the domain you've registered with the registrar to the mail server so that it knows to recieve emails forwarded to mydomain.com

Since you're running wireshark and you see the emails coming in the rest is on your side

Hope this helps
0
 

Author Comment

by:ivanadu
ID: 22808779
paulsolov indeed I have set an MX record on dyndns pointing to xxx.dynalias.net and emails are arriving. My problem is the second part you have stated correctly:
"If your server is getting a responce than you may just need to add the domain you've registered with the registrar to the mail server so that it knows to recieve emails forwarded to mydomain.com".
Do you know by any chance how to do this?

thanks again :)
0
 
LVL 42

Expert Comment

by:paulsolov
ID: 22808799
The only way I know how to do this is with a separate mail server, I am not sure how to do this with the mail role in Windows 2003
0
 

Author Comment

by:ivanadu
ID: 22808923
Maybe it is similar. You may explain it for Exchange and I am going to try to find a way to do it for the role. Well, what is really needed is the concept behind it. Who has to point at who which records should be created... I may recognize something :) and find an alternative
0
 
LVL 42

Expert Comment

by:paulsolov
ID: 22809135
In exchange you would configure recipient policy to include your mydomain.com.  When users are created the user@mydomain.com is now created as part of the recipient policy and additional emails for a user are assigned manually if desired.  When the server receives and email and sees that it is for user@mydomain.com it goes to the appropriate mailbox
0
 

Author Comment

by:ivanadu
ID: 22826742
paulsolov, after playing a while I have managed to receive emails arriving at my local server. First I made an MX record with a high priority at godaddy pointing to my dyndns address while an MX record at dyndns is set to forward email to my server (mydomain.local). At the server side I have created a forward lookup zone named godaddyacc.com, and an alias (CNAME) poiting to my email (Windows E services) server named computername.mydomain.local. I have added a domain godaddyacc.com under pop3 service mmc and created a mailbox with an AD user.
And now I do locally receive emails sent to user@godaddyacc.com as u suggested :), but if what I have done has some explanation I am not quite sure, It is a result of experimenting.
I still cannot send emails working on it.
Do you think this might be ok or am I missing something?
0
 
LVL 42

Accepted Solution

by:
paulsolov earned 500 total points
ID: 22827139
I still think there needs to be an actual server with actual mailboxes for this to work.  Normally you would go into Exchange setup recipient policy to include mydomain.com addresses.  Add additional email addresses in the Exchange Server Manager and once it is setup the external email is sent it knows to which mailbox to forward it to.  It also know when sending out email to use DNS for any external email and forward internal email directly to the mailbox internally.    

If you're using godaddy for pop that means that you are using them as your mail provider and you don't need to have a mail server.  You can create all the mailboxes at godaddy, point the MX record to godaddy and use their pop/smpt servers to send/recieve email.
0
 

Author Closing Comment

by:ivanadu
ID: 31510006
paulsolov, indeed. i could use godaddy to manage my email. I have chosen to use it to capture all @mygodaddy.com not forwarded emails (to my server), because of the limit on the email box size at godaddy (users are also active domain users). Forwarding to my server I have done with a 0 priority MX record pointing to the server.  For the rest I have added accounts as you said.

By enabling anon. access and integrated windows authentication IIS (virtual SMTP), i was able to receive and send emails @mygodaddydomain.com. What is a bit confusing is that I never really addressed any of the godaddy servers (smtpout.secureserver.net and similar) for receiving and sending. The only link between my server and godaddy is that one MX record at godaddy side.
I would really like to have an option to try to get the failed emails from godaddy.
0
 
LVL 42

Expert Comment

by:paulsolov
ID: 22827828
Give their support a call and see if they have solution, they may have an options but it's best to check with their support
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
In this video we show how to create a User Mailbox 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 Recipients >> Mailb…
In this video we show how to create a Shared Mailbox 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 Recipients >> Sha…

707 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

14 Experts available now in Live!

Get 1:1 Help Now