3

I have 4 emails for my domain created using google apps I can send emails from them but cannot receive, I have a centos vps, no cpanel, no mail server.

How to configure bind so I can receive mails?

user
  • 849
  • 3
  • 13
  • 18

1 Answers1

7

Something like this should do the trick:

#The cnames are not needed, but nice to have. It will allow you to access mail via mail.domain.com
mail IN CNAME ghs.google.com.
calendar IN CNAME ghs.google.com.
docs IN CNAME ghs.google.com.
sites IN CNAME ghs.google.com.
start IN CNAME ghs.google.com.

#This is important
@ IN MX 1 aspmx.l.google.com.
@ IN MX 3 alt1.aspmx.l.google.com.
@ IN MX 3 alt2.aspmx.l.google.com.
@ IN MX 5 aspmx2.googlemail.com.
@ IN MX 5 aspmx3.googlemail.com.
@ IN MX 5 aspmx4.googlemail.com.
@ IN MX 5 aspmx5.googlemail.com.
IN TXT v=spf1 include:_spf.google.com ~all
Bart De Vos
  • 17,911
  • 6
  • 63
  • 82
  • ok so i paste this in /var/named/domain.com, but don't i need somewhere to define my emails? I mean do i need somewhere to write support@domain.com and eli@domain.com...or not? – user Sep 12 '11 at 12:16
  • You do not need to define something per address. But given you have this little knowledge about DNS I don't think you are providing the nameserver for your domain right? Then you would need to set them in some sort of control panel where you got the domain from. – Bart De Vos Sep 12 '11 at 12:24
  • godaddy is my domain registrar, not my host, i got my vps from 2host.com, I'm not using nameservers, i use ip address to point my domain to my vps...so can i do it from godaddy? google said that you need to change it from my host, but goddady is not my hosting provider – user Sep 12 '11 at 12:49
  • GoDaddy is your domainHOST so you will need to do it on their control-panel. Take a look here: http://www.google.com/support/a/bin/answer.py?answer=33353 – Bart De Vos Sep 12 '11 at 13:07
  • ahhhhh domainhost!! ok i get it, i thought they meant my webhost coz usually you when you say host = webhost and we usually say registrar and not domainhost lol!!! – user Sep 12 '11 at 13:12
  • Ensure you include the @ at the begining of the MX record. This burnt me for days. – ond May 06 '17 at 21:27