How to configure email server to work with Gmail

SYSTEM INFORMATION
OS type and version Debian 12
Virtualmin version 7.10.0 Pro

Hi,

one of my clients want the custom email which is on my server to use it through gmail.

How to configure ONLY one Virtual Server to forward emails to gmail?

Currently i have register that email on gmail and verify it through DNS TXT record,

but emails still goes to my server.

I already try to go on gmail to Settings -> Accounts -> Check mail from other accounts

but it says You cannot create a mail account for info@domain.name.

Registred Gmail email and server email is the same.

Maybe i need to change DNS records, and which one to use it?

Thanks.

Yes. You need the MX record to be setup with the names Google provides.

Answer

Delete old MX record.
Setup new MX

Host = @ (Or leave blank)
TTL = 3600 Default
Priority = 1
Server = smtp.google.com.

Login to server as root and execute:
rndc flush && rndc reload

After this setup, go to this link and follow instructions there.

https://admin.google.com/u/0/ac/signup/setup/v2/gettingstarted

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.