Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

gdarends's avatar

Default Forge server name affecting emails going to spambox?

Hi,

I have installed WordPress on Forge. I'm having some issues with email going into the spambox.

Looking at the email I see some issues where it's sending the emails from .localdomain. See some snippets of the email data below. (I have obfuscated some data)

spf=neutral (google.com: xxx.xxx.xxx.xxx is neither permitted nor denied by best guess record for domain of [email protected]) [email protected]
Return-Path: <[email protected]>
Received: from deep-truth ([xxx.xxx.xxx.xxx])
by mx.google.com with ESMTPS id e189si2893052qkc.64.2019.08.23.16.07.55
.
.
Received-SPF: neutral (google.com: xxx.xxx.xxx.xxx is neither permitted nor denied by best guess record for domain of [email protected]) client-ip=xxx.xxx.xxx.xxx;
Authentication-Results: mx.google.com;
spf=neutral (google.com: xxx.xxx.xxx.xxx is neither permitted nor denied by best guess record for domain of [email protected]) [email protected]
Received: from deep-truth.localdomain (deep-truth.localdomain [127.0.0.1]) by deep-truth (8.15.2/8.15.2/Debian-10) with ESMTP id x7NN5tdu018123 for <[email protected]>; Fri, 23 Aug 2019 23:05:55 GMT
Received: (from forge@localhost) by deep-truth.localdomain (8.15.2/8.15.2/Submit) id x7NN5ttr018122; Fri, 23 Aug 2019 23:05:55 GMT

Now something I noticed is that it's using the server name when creating a forge instance. So in this case it's deep-truth which is a random name that is created by forge. Running hostname on the CLI outputs deep-truth. Should this be the name of the domain?

Looking at the /etc/hosts file. I also see the following:

127.0.0.1 deep-truth.localdomain deep-truth
127.0.0.1 localhost

Does anyone have experience with this?

0 likes
2 replies
aurawindsurfing's avatar

Hey @gdarends

This looks clearly like misconfiguration of wordpress. Forge should have nothing to do with it. The question is how wordpress is sending those emails and where that is meant to be configured.

gdarends's avatar

Well, I can use the SMTP settings in WordPress config to send via mailgun. But that's just bypassing the issue IMO.

Please or to participate in this conversation.