Question

Setting up a mail server using a freenom domain

Posted January 13, 2021 884 views
EmailDjango

I’m trying to follow this tutorial on setting up a web server. I’m a complete newbie to this stuff, so bear with me. I created a domain with freenom, and added Digital Ocean’s nameservers to it. What has that accomplished? If I go to the website, nothing happens. I’ve experimented with django and deployment in the past, but the website would only display something when running manage.py’s runserver function? How does it run without doing so manually like this?

That tangent aside, I’m focusing on spinning up a mail server. Say my domain name is example.tk. I need to set up MX records, so I went to MX records in the DNS record of my droplet. I decided mail.example.tk would be a nice subdomain name, so I put that in the hostname box. What do I put for “MAIL PROVIDERS MAIL SERVER”, though?

1 comment
  • Oh, sorry – I wanted to also add. Do I have to set up a web server with apache or anything FIRST, before spinning up a mail server? The current droplet I’m using doesn’t have a web service on it set up or anything.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi @sangersteel,

First let’s start with the DNS. If you’ve created an MX record -mail.example.tk, you need to create another DNS record, this time a CNAME which CNAME will be mail.example.tk and will have your droplet’s IP Address.

The next step is your django application. By default django applications run on a different port than 80 and 443 ( the usual ports which your browser uses). In order to open your django application, you can do the following :

example.tk:PortHere
example.tk:8080

Having said that you’ll need to find out what your porfilet is. You can do this by going to your application’s configuration file. In there you should find it.

Another solution after you start your application would be to run the following command on your droplet :

netstat -tulpen

And see if you see django in the output.