WordPress installations are not sending emails - need fully-qualified hostname


#1

Hello,

since i transfered my site to EE i did not receive any mails from my contact form. I want to send the mails via php mail. I am aware that there was a WP bug in version 4.6 , so i updated to 4.6.1 yesterday.

I tried everything php-test ,plugins test, no result, mail never arrive.

Here is my log:

`X-Postfix-Sender: rfc822; root@easyengine-wordPress Arrival-Date: Thu, 8 Sep 2016 10:20:44 +0000 (UTC)

Final-Recipient: rfc822; marc@let.de Original-Recipient: rfc822;marc@let.de Action: failed Status: 5.5.2 Remote-MTA: dns; spool.mail.gandi.net Diagnostic-Code: smtp; 504 5.5.2 : Helo command rejected: need fully-qualified hostname

–8D25240A15.1473330044/easyengine-wordPress Content-Description: Undelivered Message Content-Type: message/rfc822

Return-Path: root@easyengine-wordPress Received: by easyengine-wordPress (Postfix, from userid 0) id 8D25240A15; Thu, 8 Sep 2016 10:20:44 +0000 (UTC) Subject: This is the subject line To: marc@let.de X-Mailer: mail (GNU Mailutils 2.99.99) Message-Id: 20160908102044.8D25240A15@easyengine-wordPress Date: Thu, 8 Sep 2016 10:20:44 +0000 (UTC) From: root@easyengine-wordPress (root)

This is the body of the email

–8D25240A15.1473330044/easyengine-wordPress– `

I did a dpkg-reconfigure postfix allready and put a FQDN inside of the main.cf, still no results.

Any idea what cause the problem, wrong path in php.ini missing “.” ?

Thanks


#2

What Linux Distro are you using?

I have run into this with Debian before where the FQDN had to be set at the system level, not just within Postfix. In addition, it has to be set in certain areas in specific ways, otherwise a restart resets back to a non-FQDN.


#3

yes, I on Ubuntu 16.04 LTS :slight_smile:


#4

What is the result of the following command:

hostname --fqdn


#5

Just follow the first steps of this tutorial to fix that : http://www.iredmail.org/docs/install.iredmail.on.debian.ubuntu.html


#6

To be more specific, follow the FQDN portion of those steps :wink:


#7

:grin: don’t want to explain it again


#8

~# hostname --fqdn easyengine-wordPress

Ok, thanks a lot will follow the steps

:smile:


#9

Yes @macbroadcast

easyengine-wordPress

…is not a FQDN, so my guess is the steps to set the FQDN, in the link @virtubox provided, will fix your issue. I’ve been wrong before and I’ll be wrong again, but I’ve had this issue with Debian a number of times, so it’s all to familiar to me.


#10

Well , i know that it´s not an FQDN :yum: but i was´nt aware that the EE installation process does not implement the simple requirements for sending mails in wordpress via Php.

Greetings


#11

The configuration of a FQDN is likely considered to be the responsibility of the host and/or VM provider. For instance, every time I spin up a new VM, it already has a FQDN, due to the way my VM provider has configured the VM images to work. I have found this to be true on two different VM providers, but not true when I spin up a VM on my own hardware :confounded:


#12

Thanks for the explanation @bamajr :relaxed:

When i setup a droplet at digital ocean there is no FQDN involved i guess , just a hostname.

I never set up a FQDN, i can use DO DNS to point to a droplet or like in my case i use cloudflare as DNS. The hostname is allways the name of the droplet.

Its a bit confusing when i use mutiple domains on one droplet, no ?

Thanks


#13

It’s confusing because in /etc/hosts you will have


192.168.0.1 vps.yourdomain.com vps


but the vps hostname is only vps when the FQDN is vps.yourdomain.com


#14

Just to confirm: did you contacted your host/vps provider to confirm that they allowed your account to send e-mails?

Once I wasted all my day trying to fix this issue and the problem was a block from DigitalOcean.


#15

Oh you raised an interesting point @hmaesta ! i am using my registrar to send and receive mails.

MX Lookup for let.de:

Target	IP	Preference value	TTL
spool.mail.gandi.net	217.xx.xxx.x	10	4 min 59 sec
fb.mail.gandi.net	217.xx.xxx.xxx	50	4 min 59 sec

Would this change anything regarding my config ?

Thanks :slight_smile:


#16