send email with gmail

5 posts / 0 new
Last post
#1 Tue, 02/28/2017 - 22:02

send email with gmail


I have a virtual server which I would like to use my g suite gmail account to send email (Google cal this: SMTP relay service - which is enabled in gsuite). I have seen this similar topic, although after doing what it says I cannot get it to work:

BIND is turned off, because I host my dns with my domain registrar. My MX records are configured for g suite and everything is working fine. I just need to configure this virtual server to send email using google's gmail service.

I have tried toggling the box in "Edit Virtual Server" which reads: Mail for domain enabled? - And I have then tried Administration Options > Re-Send Signup Email - And I always get the following message: "The signup email cannot be sent to this server owner, as it is disabled in the server's template."

This is the first time I have used virtualmin and I'm impressed so far! I am pretty good at configuring servers on the command line, but I am unsure about how to go about this kind of setup for email. I must be missing something, because I need to be able to enter google's hostname and then my username and password somewhere. I'm not sure where that somewhere is.

Any help would be greatly appreciated!

Many thanks for reading this! All the best, - Rik

Wed, 03/01/2017 - 11:22


Perhaps I should have been more clear.. I would like the virtual server to send email as my gmail address, through Google's servers, via SMTP. I also want to receive notifications etc at this email address. The nameservers are external (123-reg), the domain for the server is, the website is and the email address is hosted by g suite:

Actually I do not want to host any email for any domain or virtual server on this server. All websites / virtual servers / domains should use my external mail server or gmail and the nameservers are with 123-reg.

I'm not sure what is currently installed and how to test it. I'm not sure whether I can configure things outside of the web ui, without breaking virtualmin.

I have got a bit further but I still cannot send email:

  • I have unchecked the box in Edit Virtual Server > Enabled Features > Mail for domain enabled?
  • I have set the external email address in Edit Virtual Server > Configurable Settings > Contact Email to my g suite email.
  • I have enabled System Settings > Server Templates > Default > Mail for Domain > "Email message to send upon server creation".
  • I then re-tried Administration Options > Re-Send Signup Email and this time it said the email was sent. But I obviously haven't received anything, because I don't have an email account configured.

Please could someone let me know what to configure / test / check to send email through an external mail server?

This thread looks related, but I still don't know what I need to configure on my virtual server, the MX records are correct and as they need to be:

All the best, - Rik

Wed, 03/01/2017 - 12:59
Welshman's picture


Have your own email server and some frigging privacy.

Chaos Reigns Within, Reflect, Repent and Reboot, Order Shall Return.

Wed, 03/01/2017 - 13:26 (Reply to #3)

If only it were that simple. I have to weigh up privacy Vs security, for myself and my customers. I have nameservers and email hosted with 3rd parties because as a 1-man IT support business, if I disappear or anything goes wrong, I want to cause least impact as possible for my customers. That's why I recommend Google g suite, because it does a lot for the price, is all provided by one company, is secure, and if the worst were to happen to me or my company or infrastructure, my customers can just go to another support provider and carry on as if nothing happened ( I send them website backups, so they can move to another server if they wish). I've started with this kind of system because it's easy for other people to use and manage and gives me more options for my customers. In time, I will hopefully be able to employ others, at which point there is more of a backup plan and it is not all relying on me and so then I would be able to host email etc. For now, this is the best option.

Anyway, any ideas?

Wed, 03/01/2017 - 22:49
Diabolico's picture

If you want to use external email service with your virtualservers you should make some modifications. Start with SPF, DKIM and MX records as all of them must reflect the google mail servers and not only your. All this information you can find with Google help documents.

If you need just for backups then simple Gmail will do the job and your clients can fetch emails from your server using Gmail POP feature.

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Topic locked