# How to configure email server to work with Gmail

**URL:** <https://forum.virtualmin.com/t/how-to-configure-email-server-to-work-with-gmail/125605>\
**Category:** Help! (Home for newbies)\
**Created:** [March 25, 2024, 4:49pm UTC](https://forum.virtualmin.com/t/how-to-configure-email-server-to-work-with-gmail/125605 "2024-03-25T16:49:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxyo.vip](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/m/6de8d8/32.png) [@maxyo.vip](https://forum.virtualmin.com/u/maxyo.vip)\
**Post date:** [March 25, 2024, 4:49pm UTC](https://forum.virtualmin.com/t/how-to-configure-email-server-to-work-with-gmail/125605/1 "2024-03-25T16:49:17Z")

</div>

| 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.

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [March 25, 2024, 6:33pm UTC](https://forum.virtualmin.com/t/how-to-configure-email-server-to-work-with-gmail/125605/2 "2024-03-25T18:33:48Z")

</div>

> [@maxyo.vip](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![maxyo.vip](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/m/6de8d8/32.png) [@maxyo.vip](https://forum.virtualmin.com/u/maxyo.vip)\
**Post date:** [March 25, 2024, 8:09pm UTC](https://forum.virtualmin.com/t/how-to-configure-email-server-to-work-with-gmail/125605/3 "2024-03-25T20:09:37Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [April 2, 2024, 8:10pm UTC](https://forum.virtualmin.com/t/how-to-configure-email-server-to-work-with-gmail/125605/4 "2024-04-02T20:10:00Z")

</div>

Closed on April 2, 2024, 8:10pm UTC

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