December 26th, 2011, 01:40 PM
Introduction to mail servers
I recently got an Amazon EC2 server running linux and I have some questions because I'm so confused about things. I'm not a pc noob or anything or even a linux noob, within half an hour of having the server I had my domain pointing to it's IP Address, an Apache server, MySQL server and PHP installed and my website running
However the confusion comes when I tried to install a mail server. I'm using qmail because postfix was too confusing. And I've managed to set it up so it can now send mail but it won't receive mail. My firewall is setup to allow traffic through ports 143 and 25. But what's a hostname?? I wanna set my mail program to connect to imap.mydomain.com and smtp.mydomain.com but what r those?? they're not subdomains are they?? and they're not hostnames??
Also my domain name has an A type DNS record pointing it to an IP address. But what should the MX address be? Because at the moment it's pointing to mail.domain.com but that resolves to the IP Address 0.0.0.0 which obviously is wrong and I'm assuming that's why I can't receive mail...
I guess none of that is explained well, but ask questions and I'll answer them. Thanks for any help
December 26th, 2011, 02:42 PM
A hostname is *.domain.com. So, for example, mail.domain.com would be a hostname.
Anything in front of domain.com is a subdomain. Even www.domain.com would consider www as a subdomain.
If mail.mydomain.com is resolving to 0.0.0.0 then you have something improperly configured.
You need to have an A record for each of the domains (and subdomains). You can, instead, use a wildcard to encompass all subdomains.
You then need an MX record (or multiple ones) that point imap.mydomain.com and smtp.mydomain.com to domain.com.
On your server, you should edit the hosts file and list your domain as well. I use sendmail, but qmail probably has something similar to where you need to edit a particular file to allow mail. You would need to add the domain name so that your server will receive mail for that domain.
"I don't need to get a life. I'm a gamer. I have lots of lives!"