@davidtessier opened this Issue on January 28th 2019

I have an email address (noreply@whatever.com).
My Matomo installation is set to analytics.whatever.com

When I try to send automated reports, Matomo doesn't use the email address as defined in the settings, it is adding my sub domain and in turn it is failing and I get the error message:

An error occurred while sending 'HTML Email Report - 8.today.5.en - lpnxtyZpMNAIdViRHKaBRduonRwcQTDLfi_9X_YO.html' to email@hotmail.com. Error was 'Relaying disallowed as noreply@analytics.whatever.com'

As you can see, in the above error message, the email it is trying to use does is not the right email. It adds the sub domain. In Matomo General Settings -> Email I do not have it set like this.

How can I change this so that email reports will work from an address that doesn't include the subdomain?

@fdellwing commented on January 28th 2019 Contributor

What does you config says about noreply_email_address (and login_password_recovery_email_address/login_password_recovery_replyto_email_address)?

@davidtessier commented on January 28th 2019

What does you config says about noreply_email_address (and login_password_recovery_email_address/login_password_recovery_replyto_email_address)?

UPDATE:
The config/config.ini.php did not have noreply_email_address or the other two addresses.

The congif/global.ini.php file had noreply_email_address = "noreply@{DOMAIN}"

I've added noreply_email_address = "noreply<a class='mention' href='https://github.com/mydomain'>@mydomain</a>.com" as a static value to the config/config.ini.php

This is what my config/config.ini.php looks like now, and I still get the error originally mentioned and it quotes an email address of noreply@sub.mydomain.com , even after a webserver reboot and a browser cache clear.

[mail]
transport = "smtp"
port = 465
host = "smtp.mydomain.com"
type = "Login"
username = "noreply@mydomain.com"
password = "#################"
encryption = "ssl"
noreply_email_address = "noreply@mydomain.com"
noreply_email_name = "DJT Analytics"
emails_enabled = 1
feedback_email_address = "support@mydomain.com

If I update the congif/global.ini.php file (I know it says not to) and replace the {DOMAIN} part of the code with my hard coded domain, it works. But I'd rather the config.ini.php work like it is supposed to. Am I putting the noreply_email_address in the wrong place? Does it have to be in a specific sequence in the file?

@tsteur commented on January 28th 2019 Member

I recommend you configure a different email address for noreply_email_address. Or do you have it set already?

@fdellwing commented on January 28th 2019 Contributor

Does it have to be in a specific sequence in the file?

Pretty sure it has to be in the General section?

@davidtessier commented on January 28th 2019

Does it have to be in a specific sequence in the file?

Pretty sure it has to be in the General section?

Moving the code to the general section worked. I have reverted the global.ini.php file, and done a test, and emails are sending.

Thank you to all who helped me sort this out. I really appreciate it!

This Issue was closed on January 28th 2019
Powered by GitHub Issue Mirror