Link to home
Start Free TrialLog in
Avatar of ivanadu
ivanadu

asked on

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

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
Avatar of Paul Solovyovsky
Paul Solovyovsky
Flag of United States of America image

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
Avatar of ivanadu
ivanadu

ASKER

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...?
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
Avatar of ivanadu

ASKER

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 :)
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
Avatar of ivanadu

ASKER

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
go to dns management and configure the MX record to look something like this.

IN MX 10 sample.dnsalias.net.
Avatar of ivanadu

ASKER

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
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
Avatar of ivanadu

ASKER

and how do i relate my godaddy domain to my xxx.dynalias.net? Do I have to set anything extra?
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
Avatar of ivanadu

ASKER

I do not have an Exchange server I am using Windows server 2003 email services pop3 an smtp. Does this make a difference?
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
Avatar of ivanadu

ASKER

:) 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
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?
Avatar of ivanadu

ASKER

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.
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.
Avatar of ivanadu

ASKER

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 :)
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
Avatar of ivanadu

ASKER

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 :)
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
Avatar of ivanadu

ASKER

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
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
Avatar of ivanadu

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of Paul Solovyovsky
Paul Solovyovsky
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ivanadu

ASKER

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