How to configure email server to work with Gmail

OS type and version Debian 12
Virtualmin version 7.10.0 Pro


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

Registred Gmail email and server email is the same.

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


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


Delete old MX record.
Setup new MX

Host = @ (Or leave blank)
TTL = 3600 Default
Priority = 1
Server =

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

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

1 Like

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