# Email - Wrong Server (internal mail server)

**URL:** <https://discourse.nodered.org/t/email-wrong-server-internal-mail-server/45147>\
**Category:** General\
**Created:** [3 May 2021 21:09 UTC](https://discourse.nodered.org/t/email-wrong-server-internal-mail-server/45147 "2021-05-03T21:09:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![spyder0552](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/spyder0552/32/14035_2.png) [@spyder0552](https://discourse.nodered.org/u/spyder0552)\
**Post date:** [3 May 2021 21:09 UTC](https://discourse.nodered.org/t/email-wrong-server-internal-mail-server/45147/1 "2021-05-03T21:09:57Z")

</div>

Bit of a challenge here.  
It appears that NodeRed is resolving my server address to the Public IP. However, I am trying to reach the internally hosted mail server. It is on the same network as my node-red. But, for some reason, it keeps trying to reach the public IP (my public MX record) rather then my internal.

Is there a way to tell Nodered to resolve DNS to the local machine rather then having it reach out to the public?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [3 May 2021 21:30 UTC](https://discourse.nodered.org/t/email-wrong-server-internal-mail-server/45147/2 "2021-05-03T21:30:36Z")

</div>

I don’t think Node-RED is doing anything other than using the operating system calls. Maybe try using the ip address ?

---

<div class="post-metadata">

**Author:** ![spyder0552](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/spyder0552/32/14035_2.png) [@spyder0552](https://discourse.nodered.org/u/spyder0552)\
**Post date:** [4 May 2021 11:46 UTC](https://discourse.nodered.org/t/email-wrong-server-internal-mail-server/45147/3 "2021-05-04T11:46:53Z")

</div>

Thanks Dceejay. However, I have confirmed it is not.  
Node-Red is running on a windows machine. I do a ping to my mail server from cmd/powershell and I get the correct IP.  
I have even added a static entry into the local host file. Node just wants to use the public MX record IP.

Any other ideas?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [4 May 2021 12:19 UTC](https://discourse.nodered.org/t/email-wrong-server-internal-mail-server/45147/4 "2021-05-04T12:19:26Z")

</div>

what happens if you try the same ping command using a Node-RED exec node ?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [4 May 2021 12:24 UTC](https://discourse.nodered.org/t/email-wrong-server-internal-mail-server/45147/5 "2021-05-04T12:24:52Z")

</div>

What server name have you used in the email node?

Are you running node-red in a container such as Docker, or using Home Assistant or something similar?

**[Edit]** Or running in WSL?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [3 July 2021 12:25 UTC](https://discourse.nodered.org/t/email-wrong-server-internal-mail-server/45147/6 "2021-07-03T12:25:22Z")

</div>

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