New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Helo command rejected: need fully-qualified hostname #12007
Comments
|
No, it isn't. The "SMTP server address" in "General settings" is the address of the SMTP server while the issue is related to the client (during smtp connection the client connects to the server, the server introduces itself and waits for the client to send its hostname, this kind of handshake is called HELO / EHLO). You can get many details about the smtp connection steps and commands on http://www.samlogic.net/articles/smtp-commands-reference.htm |
@netdesign problem not in the core |
Dear @Globulopolis, add the "client hostname" support in the Piwik config.ini would be an option, but I'm sure that setting "localhost" as default value in "$this->_name" is a fault because "localhost" is meaningless in the SMTP protocol (every host is localhost). Even if you add the discussed variable in the Piwik config.ini, what would be the default value? What would happen if the user doesn't set the variable and leaves the software to choose it for him? It most likely will be "localhost" and the probem is here again (except that Piwik forces the user to set the value during the installation). What I'd suggest is to report the issue to the upstream Zend team and adding, as just you said, the variable to the Piwik config.ini. This will give the freedom to advanced users to set the "client hostname" to a custom value but will set automatically the variable with a meaningful value (the real hostname as known by the OS). I hope you share my personal opinion. Fabio (team Netdesign) |
Dear @Globulopolis, I dont want to change Zend files so I have changed /piwik/core/Mail.php, function initSmtpTransport
and added "heloname = example.org" in my config.ini.php. Now it works correctly. Greetings from Cologne - Bernd |
Dear @bglxx would you be so kind and post your /piwik/core/Mail.php and config.ini.php. |
Hello @bglxx I'm very unhappy but I don't have success for the mail sending feature even following both actions suggested by you (on the latest Matomo version 3.13.3). I fixed again the ISSUE this time chaning Zend library on: /libs/Zend/Mail/Transport/Smtp.php changing in the contructor:
|
May I make pull request related to 90d65ae ? |
@netdesign feel free to create one. However, it may not be needed because as part of Matomo 4 we're replacing the Mailer library see #14841 and the change would likely be undone again. We're hoping the new mailer library will fix things like these right away. |
Yes, we already started working on Matomo 4 and I reckon we will be working on that issue soon. For 3.X we're only fixing mostly regressions and security issues now while we focus on Matomo 4. |
Ok @tsteur thank you for your updates! |
Still affected by this, for some reason my matomo instance identifies with the server's IPv6 address, even though the host name is configured correctly. |
Actually it's not possible that you are affected by the exact same error. The problem was how Zend Mail was working. But we meanwhile replace Zend Mail with PHPMailer. PHPMailer actually allows to set the Hostname, but we currently don't do that. So PHPMailer might try to identify the hostname itself by checking $_SERVER['SERVER_NAME'], gethostname(), php_uname('n'), or the value 'localhost.localdomain'. We could add an additional configuration option though to allow overwriting the hostname... |
I see there's a Edit: This resolved my issue. |
Googling my issue doesn't give any useful result so I submit this issue with attached the solution (as a screenshot). I hope it is useful.
The ISSUE in the suject is reproducible if:
The SMTP transport class included in the Piwik sources hardcodes the hostname to "localhost" instead of the true local hostname as required by RFC2821, RFC1869. This way the SMTP server refuses to send the report email.
The "Zend_Mail_Transport_Smtp" constructor provides a way to set custom configuration (such as the hostname) but the Piwik interface isn't able to set this variable.
Here I attach my solution :)
The text was updated successfully, but these errors were encountered: