loading...

Gmail configuration with mail server

ssupdoc profile image Sriram Jayarman ・1 min read

I have an admin console for a website in Google. I wanted to configure new users to have access to Gmail under my domain. I added the user in admin console and found that I could send emails from the new account but could not receive mails, where I was getting a 550 virtual mailbox not found error on the sender's side.

Thinking it had to do something with my mail server, I logged into OpenHost, which rests the email service provision and added the same email. Now if I send an email, I don't get any error nor do I receive any email.

On further lookup, I found that we would need to configure the server to forward mails to the Gmail client. I was advised to add MX records of Gmail onto the mail server. I added them from the Open Host console. Now, I come to find that there exists MX records with a site called webhost, which doesn't ring a bell to me. I don't have any association with the guy who set me the server two years ago. I am advised that it may take 48 hours for the MX records to be properly configured and for the mail to be setup properly. I am not sure if I have done the steps correctly. Also, I am still worried about the fact that I would need to add the user in GSuite and Open Host each time I would like to add another user. Is there any way to directly just use GSuite to add users and receive mails with relatively lesser effort?

Posted on Jun 30 by:

ssupdoc profile

Sriram Jayarman

@ssupdoc

Wannabe Security Professional

Discussion

markdown guide
 

I am confused about all the setup steps described above. My 2¢ are these:

  • First, you need to configure your domain correctly. This can be done in one of 2 places, the website where you purchased your domain, OR the website where your domain is hosted. To figure this out you need to go to the website where you purchased your domain and find out where is the "Manage DNS" part, most times you will either see the list of records there or some text saying the domain is pointing somewhere else.
  • Once you figure out where your DNS records are configured, you go to that place and add the required configuration as described in GSuite (Since you mention Gmail, I am assuming you are using Google for Businesses or GSuite).
  • To correctly configure your email service, you will need more than just MX records, you will also require some TXT records for spam protection, without this most of the email your users send will end up flagged as SPAM.
  • After the DNS records are properly configured, then you will only need to add users on GSuite, because that will be the service receiving your email.

The setup varies a lot based on what services you have, but in the end it all ends up with 2 or 3 services, your Domain provider, your Hosting provider, and your Email provider. As an example, here is how I usually configure my domains:

  • I purchase a new domain on NameCheap.
  • Right after purchasing it I go to CloudFlare and setup a new free site for it and change the NS records in my NameCheap dashboard to point to the NS servers provided by CloudFlare.
  • Once the domain is ready, inside CloudFlare I add the required DNS records based on what I need to do, at the very least I usually have an A record and some CNAME records that points to my VPS in DreamHost; if I have to setup a third party email then I follow the instructions on what records I need to add, usually 2 MX records, and at least 2 TXT records (SPF and DKIM).

As you can see in my example, there are many moving pieces, but all ends up in the same way I told you above:

  • My Domain provider: NameCheap
  • My Hosting provider: DreamHost
  • My Email provider: Varies (usually Fastmail, sometimes Zoho mail, or Mailchimp)
  • And, as an extra bonus, my CDN and DNS records provider, CloudFlare, but you do not really need this one.
 

Thanks for your answer. Based on your answer and some additional troubleshooting this is what I ended up doing. Open Host handles my DNS settings. I added MX records from Gmail and removed already existing MX records of older email provider. Additional, I had to move name space to Open Host for these changes to take effect. Post this, I was able to get Emails to and from configured GSuite Emails. I did not add any new TXT records as Gmail did not suggest to add any.

 

I am glad you solved your problem!

Just as small advice, double check your GSuite documentation as most email providers require you to add some TXT records to avoid your emails being flagged as SPAM. It might not be in the initial setup but I am 99% sure they will be somewhere in your settings.

Took your word on it. I digged into GSuite to find correct entries for SPF and DKIM. Thanks a lot!