matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.92k stars 2.66k forks source link

SMTP Email being Rejected <localhost.localdomain> #20832

Open 0FiRE0 opened 1 year ago

0FiRE0 commented 1 year ago

Software Info: Matomo v4.14.2 and also v4.13.x Platform: Docker

I have Matomo being deployed in a docker container, and I have another container for the email server. There is an issue after configuring the email settings in Matomo which is preventing it from sending any emails.

The issue is in the "EHLO" command to the email server, where it specifies a value of <localhost.localdomain> in the domain rather than the actual domain name (E.g. <mail.domain.com>). Noting that when inquiring about the email server using nslookup command it works fine and resolves the public IP Address of it.

I couldn't find a way to see and configure this value to fix it.

Below is a screenshot from the logs: image

sgiehl commented 1 year ago

Hi @0FiRE0 Thanks for the report. The library we are using (PHPMailer) actually allows to set/overwrite the hostname used for such requests. Nevertheless the default should be the current hostname. localhost.localdomain should only be used if PHP fails to detect a valid host name.