By oxxido
Ok recently i moved my nic.ar domain (rosciano.com.ar) into digitalocean. Old server had email server, cpanel, etc so when i moved to my lemp server i got http working perfectly but no email. I read about setting up email server but it looked like resource-consuming and way too many problems (security issues, spam, etc, etc) So I thought forwarding everything to gmail. I found 2 pretty neat tutorials http://www.andreagrandi.it/2014/08/31/getting-started-with-digital-ocean-vps-configuring-dns-and-postfix-for-email-forwarding/ and http://www.cyberciti.biz/faq/linux-unix-bsd-postfix-forward-email-to-another-account/ in this post: https://www.digitalocean.com/community/questions/how-do-i-set-up-email-forwarding-to-gmail-account
That helped me configuring postfix to forward emails, but i needed help with cloudflare and nic.ar, as nic doesn’t allow you to configure anything but ip-dns pair.
So here we go
Step 1) configure nic.ar domain go to nic.ar, login and choose the domain you want to use with cloudflare (for example domain.com.ar), then hit “delegar” on dns delegation delete anything you had and enter this 2
edna.ns.cloudflare.com
tim.ns.cloudflare.com
hit save, the update will happen in less than a day (yes, sucks, sorry)
Step 2) go to cloduflare, login (or register) and start step by step tutorial to add a new site (remember to wait for the delegation to happens. if no, you can still do this step and after the delegation you can go to cloduflare and hit the “re-check dns” button) After configuring a new site you’ll have several options to configure, in this example digitalocean IP of the required server is 55.55.55.55. the config we need for mail are:
Type Name Value TTL Status
A domain.com.ar 55.55.55.55 auto cloud-on or off
CNAME mail example.com.ar auto coud-off*
MX domain.com.ar mail.domain.com.ar auto
*cloud-off is important, otherwise mails will be redirected to cloudflare servers
Step 3) go to your 55.55.55.55 digital ocean server and follow this tutorial from “configuring postfix” step: http://www.andreagrandi.it/2014/08/31/getting-started-with-digital-ocean-vps-configuring-dns-and-postfix-for-email-forwarding/
and that’s it. after that I send an email to somethig@domain.com.ar an it arrived perfect to my gmail account
Troubleshooting:
https://www.digitalocean.com/community/questions/postfix-mail-forwarding-socket-error-how-to-fix-mx-records
I did
dig +short MX domain.com.ar
found everything was ok
then i did
dig +short A mail.domain.com.ar
and found out cloudflare ip were appearing, that was because i had “cloud-on” on CNAME email, i disabled that and it workedI hope it helps. Didn’t think this worth an article so i writting here for my fellow argentinian dudes that might need help
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This comment has been deleted
This question is an answer to “how can I configure email forwarding to gmail with cloudflare and nic.ar?”
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.