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.93k stars 2.66k forks source link

[Bug] “Sent from” URL in scheduled email reports contains IP address instead of hostname #22537

Open davidezordan25 opened 3 months ago

davidezordan25 commented 3 months ago

What happened?

I have the same exact problem descripted here: https://forum.matomo.org/t/sent-from-url-in-email-reports-contains-ip-address-instead-of-host-name/24074

When I manually trigger a report mail to be sent, it contains correct references to the Sent From URL and shows correct logo and flag images. When reports come from weekly schedule, they contain Ip local address of the Host in which Matomo docker container runs and logo and images are not shown.

What should happen?

Correct Host and logos/images are shown also in case of scheduled reports, not only in manual triggered reports.

How can this be reproduced?

Schedule a Mail Report , when it comes it has "Sent From" with local Ip address of Host Machine that runs docker Container, not the correct hostname and it does not show logos and flags. When manually triggered, everything is correct.

Matomo version

5.1.1

PHP version

No response

Server operating system

No response

What browsers are you seeing the problem on?

No response

Computer operating system

No response

Relevant log output

<details>
<summary>Click to view System Check</summary>

### Mandatory checks

#### PHP version >= 7.2.5:
 ✔ 8.2.22

#### PDO extension:
 ✔ 

#### PDO\MYSQL extension:
 ✔ 

#### MYSQLI extension:
 ✔ 

#### Other required extensions:
 ✔ zlib ✔ json ✔ filter ✔ hash ✔ session

#### Required functions:
 ✔ debug_backtrace ✔ eval ✔ hash ✔ gzcompress ✔ gzuncompress ✔ pack

#### Required PHP configuration (php.ini):
 ✔ session.auto_start = 0 ✔ max_execution_time = 0 OR = -1 OR >= 30

#### Directories with write access:
 ✔ $DOC_ROOT/tmp ✔ $DOC_ROOT/tmp/assets ✔ $DOC_ROOT/tmp/cache ✔ $DOC_ROOT/tmp/climulti ✔ $DOC_ROOT/tmp/latest ✔ $DOC_ROOT/tmp/logs ✔ $DOC_ROOT/tmp/sessions ✔ $DOC_ROOT/tmp/tcpdf ✔ $DOC_ROOT/tmp/templates_c

### Optional checks

#### Required Private Directories:
 ✔ All private directories are inaccessible from the internet.

#### Recommended Private Directories:
 ✔ All private directories are inaccessible from the internet.

#### File integrity:
 ✔ 

#### 64-bit PHP Binary:
 ✔ 

#### Tracker status:
 ✔ 

#### Memory limit:
 ✔ 2048M

#### Time zone:
 ✔ 

#### Open URL:
 ✔ curl

#### PageSpeed is turned off:
 ✔ 

#### GD > 2.x + FreeType (graphics):
 ✔ 

#### Other extensions:
 ✔ json ✔ libxml ✔ dom ✔ SimpleXML ✔ openssl

#### Other functions:
 ✔ shell_exec ✔ set_time_limit ✔ mail ✔ parse_ini_file ✔ glob ✔ gzopen ✔ md5_file

#### Filesystem:
 ✔ 

#### Set up Cron - Managing processes via CLI:
 ✔ Ok

#### Last Successful Archiving Completion:
 ✔ The archiving process completed successfully 00:58:35 ago.

#### Database abilities:
 ✔ UTF8mb4 charset ✔ LOAD DATA INFILE ✔ CREATE TEMPORARY TABLES ✔ Changing transaction isolation level Your database version indicates you might be using a MariaDb server. If this is the case, please ensure to set <code>[database] schema = Mariadb</code> in the "config/config.ini.php" file, to ensure all database feature work as expected.

#### Max Packet Size:
 ✔ 

#### Forced SSL Connection:
 ✔ 

#### Geolocation:
 ✔ geoip2php (continent_code, continent_name, country_code, country_name, region_name, city_name, lat, long)

#### Update over HTTPS:
 ✔ 

#### Mobile Messaging SMS Provider:
 not configured

#### Writable JavaScript Tracker ("/matomo.js"):
 ✔ 

### Informational results

#### Matomo Version:
 5.1.1

#### Matomo Update History:
 4.16.0,4.15.1,

#### Matomo Install Version:
 4.15.1

#### Latest Available Version:
 5.1.1

#### Is Git Deployment:
 0

#### PHP_OS:
 Linux

#### PHP_BINARY:
 /usr/local/sbin/php-fpm

#### PHP SAPI:
 fpm-fcgi

#### Timezone Version:
 2024.1

#### PHP Timezone:
 UTC

#### PHP Time:
 1724843037

#### PHP Datetime:
 2024-08-28 11:03:57

#### PHP INI max_execution_time:
 30

#### PHP INI post_max_size:
 8M

#### PHP INI max_input_vars:
 1000

#### PHP INI zlib.output_compression:
 0

#### Curl Version:
 8.9.0, OpenSSL/3.3.1

#### Suhosin Installed:
 0

#### DB Prefix:
 matomo_

#### DB Charset:
 utf8mb4

#### DB Adapter:
 PDO\MYSQL

#### MySQL Version:
 10.11.8-MariaDB-ubu2204

#### Num Tables:
 115

#### Browser Segment Archiving Enabled:
 1

#### Development Mode Enabled:
 0

#### Internet Enabled:
 1

#### Multi Server Environment:
 0

#### Auto Update Enabled:
 1

#### Custom User Path:
 0

#### Custom Include Path:
 0

#### Release Channel:
 latest_stable

#### Plugins Activated:
 API, Actions, Annotations, BulkTracking, Contents, CoreAdminHome, CoreConsole, CoreHome, CorePluginsAdmin, CoreUpdater, CoreVisualizations, CoreVue, CustomDimensions, CustomJsTracker, Dashboard, DevicePlugins, DevicesDetection, Diagnostics, Ecommerce, Events, Feedback, GeoIp2, Goals, Heartbeat, ImageGraph, Insights, Installation, Intl, IntranetMeasurable, JsTrackerInstallCheck, LanguagesManager, Live, Login, Marketplace, MobileMessaging, Monolog, Morpheus, MultiSites, Overlay, PagePerformance, PrivacyManager, ProfessionalServices, Proxy, Referrers, Resolution, RssWidget, SEO, ScheduledReports, SegmentEditor, SitesManager, Tour, Transitions, TwoFactorAuth, UserCountry, UserCountryMap, UserId, UserLanguage, UsersManager, VisitFrequency, VisitTime, VisitorInterest, VisitsSummary, WebsiteMeasurable, Widgetize

#### Plugins Deactivated:
 DBStats, MobileAppMeasurable, TagManager

#### Plugins Invalid:

#### Server Info:
 nginx/1.27.0

#### Had visits in last 1 day:
 1

#### Had visits in last 3 days:
 1

#### Had visits in last 5 days:
 1

#### Archive Time Last Started:
 2024-08-28 10:05:02

#### Archive Time Last Finished:
 2024-08-28 10:05:22

#### User Agent:
 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36

#### Browser Language:
 it-it,it,en-us,en

#### Total Invalidation Count:
 0

#### In Progress Invalidation Count:
 0

#### Scheduled Invalidation Count:
 0

#### Earliest invalidation ts_started:

#### Latest invalidation ts_started:

#### Earliest invalidation ts_invalidated:

#### Latest invalidation ts_invalidated:

#### Number of segment invalidations:
 0

#### Number of plugin invalidations:
 0

#### List of plugins being invalidated:

#### Anonymize Referrer:

#### Do Not Track enabled:
 1

</details>

Validations

randy-innocraft commented 1 month ago

Hi @davidezordan25, Thanks for reporting this issue. Is the issue still occurring for you? Unfortunately, we're unable to reproduce the problem. Is there any other info that you could provide that would help us reproduce the problem?