Results 1 to 6 of 6
I have a centos server that I have been using for a few months and would like to set it up to receive mail. The domain for the server is ...
- 10-14-2011 #1Just Joined!
- Join Date
- Oct 2011
- Posts
- 3
Centos Mail server
I have a centos server that I have been using for a few months and would like to set it up to receive mail. The domain for the server is registered through godaddy which points to the ip of my actual server. I tried a few of the tutorials and uninstalled both postfix and sendmail and retried following the steps but I cant seem to get it to work correctly. Im not sure if its a problem with settings on godaddy with the mx record or if there is an issue with the main.cf file. I was using mail.mydomain.com as the hostname in the config, i assumed that this was right, I also used this in the mx record on godaddy. Thanks for all your help.
- 10-14-2011 #2Just Joined!
- Join Date
- Nov 2005
- Location
- iran-esfahan
- Posts
- 2
step1. set mx record to mail and mail to ip . like below
MX 1 mail
mail A <ip>
and test with dig:
dig mydomain.com mx
dig mail.mydomain.com
if you recive correct answer first step finished.
step 2. config exim to listen on your valid ip
step 3. config your domain
step 4. monitor mail log file in /var/log/
- 10-14-2011 #3Just Joined!
- Join Date
- Aug 2007
- Posts
- 6
And in addition, you don't have to have mail.domain.com set as the hostname.
Can you give a bit more details? What was wrong with your setup? I'm thinking about things like this, progressively:
- Is the mail service running?
as root, run service postfix status (or whatever your email server is)
- Is the firewall port 25 (and maybe others, like 110 if you also want to read mail from the outside world)
Check this by telneting to the machine from anywhere else on the internet (open Cmd: prompt in windows and type: telnet mail.mydomain.com 25 and let us know what it says)
- Did you add users? Did you setup aliases/virtual aliases or something?
I mean, can you send email from that centos machine to, say, root or some local user? type in the terminal:
echo "test email " | mail -s "subject" root
then as root try to read mail (typing mail on its own)
- What other hints do you have that the mail server isn't set up correctly?
- 10-14-2011 #4Just Joined!
- Join Date
- Oct 2011
- Posts
- 3
telnet to mydomain.com 25 - returns 220 mydomain.com ESMTP Postfix.
telnet to mail.mydomain.com 25 - returns port 25 not open.
SMTP port is open on my iptables for mydomain.com Do i need to open it explicitly for mail.mydomain.com somewhere. I was just trying to send mail from my personal gmail to my ssh username on the server. I assumed an email account is auto created with each username for ssh?
I can successfully send emails to other users on the system but when I send an email from gmail to the server, gmail returns undeliverable.
I also opened port 110 in iptables because I never saw to do that in the tutorials.
Im gonna take a look at my mx records on godaddy and post whats in them. Thanks for all your help.
- 10-14-2011 #5Just Joined!
- Join Date
- Oct 2011
- Posts
- 3
Here is the dns manager info from godaddy
A Records
@ 3600 IN A (my server ip)
CNAME Records
www 3600 IN CNAME @
mobilemail 3600 IN CNAME mobilemail.secureserver.net
pda 3600 IN CNAME mobilemail.secureserver.net
email 3600 IN CNAME email.secureserver.net
imap 3600 IN CNAME imap.secureserver.net
mail 3600 IN CNAME pop.secureserver.net
pop 3600 IN CNAME pop.secureserver.net
smtp 3600 IN CNAME smtp.secureserver.net
ftp 3600 IN CNAME @
webmail 3600 IN CNAME webmail.secureserver.net
e 3600 IN CNAME email.secureserver.net
; MX Records
@ 3600 IN MX 10 mail.mydomain.com
@ 3600 IN MX 0 smtp.mydomain.com
All of the cname contents were in their by default. I have just changed the A record to point to my server address and added the mx records.
- 10-14-2011 #6Just Joined!
- Join Date
- Aug 2007
- Posts
- 6
Ok, there are few things now.
First, all those CNAMEs - they point to Godaddy's default servers. Either delete and recreate them all or edit them to point to your domain. I delete mine, since there are some not really useful to me, like the pda one.
So just delete them and add a mail A record to point to the same IP or a CNAME that points to @ (which is base name and your server IP)(I'm not 100% sure how MX handles CNAMEs though, that's why I suggest to add a separate A record for mail, just point it to the same IP).
Second - you don't need both mail and smtp in MX. Delete the SMTP one. (You can put one A or CNAME if you want your email clients to be able to access via that subdomain).


Reply With Quote