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:
1) You use an external SMTP server to send Email reports
2) Your external SMTP server requires fully-qualified-hostname EHLO/HELO from client to grant sending
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 :)
SMTP server address in
General settings is not it?
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
Zend_Mail_Transport_Smtp. I see that the
Mail->initSmtpTransport() do not use
host value at all.
Piwik config.ini file contain host for mail transport but this is not a client hostname.
Maybe I can do PR for this.
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.
Have a nice day ;)
Fabio (team Netdesign)