@Bad-and-Mad opened this Issue on August 12th 2020

dear ladies and gentlemen,

would you possibly include a parameter "Auto-Submitted: yes"
for the header of the matomo-email-reports to prevent vacation messages?

as described at


Thank you

I added this in my case by "hardcoding" the ".../libs/Zend/Mail.php":

cat ~/Piwik_01/libs/Zend/Mail.php | grep -in -A10 -B20 "by M.W."

523-    protected function _storeHeader($headerName, $value, $append = false)
524-    {
525-        if (isset($this->_headers[$headerName])) {
526-            $this->_headers[$headerName][] = $value;
527-        } else {
528-            $this->_headers[$headerName] = array($value);
529-        }
531-            if ($append) {
532-            $this->_headers[$headerName]['append'] = true;
533-        }
535:            // by M.W.
536-            if ( null === $this->_headers[ 'Auto-Submitted' ] ) {
537-            $this->_headers[ 'Auto-Submitted' ][] = 'yes';
538-        }
540-    }
@Findus23 commented on August 12th 2020 Member


I have never heard of this header before outside of Auto-Submitted: auto-generated in the vacation message to prevent endless responses and a quick search through my inbox doesn't contain a single E-mail with an Auto-Submitted: yes header and all Auto-Submitted: auto-generated emails are from the Matomo forum (powered by discourse). It seems discourse also adds X-Auto-Response-Suppress: All which maybe also should be added.


But it seems reasonable and simple to add it. Since Matomo 4, Matomo uses phpmailer to send, so you probably want to add
$phpMailer->addCustomHeader('Auto-Submitted', 'yes'); somewhere here:


If you want to, please create a Pull Request with this change against Matomo 4.x-dev.

@Bad-and-Mad commented on August 12th 2020

Thank you for the fast reaction!

It doesn't matter whether you set the parameter to "Auto-Submitted: auto-generated" or to "Auto-Submitted: yes".

The only thing that matters is how in



"Implementations SHOULD NOT respond to any message that has an" Auto-submitted "header field with a value other than" no ". This header field is described in [RFC3834]."

It should simply be prevented that a sieve filter sends a vacation notification as an automatic response to emails from the Matomo installation.

My current version is "Matomo-Version: 3.14.0". There is no such file "Transport.php" here.

In addition, changes to the code result in file integrity warnings.

Perhaps this could be solved a little more elegantly by introducing a configuration parameter in the Matomo backend.

@Findus23 commented on August 12th 2020 Member


What I was proposing was that you create a pull request here on Github to make the change for everyone, so that this is fixed when Matomo 4 will come out. But if you want to, I can also do it for you.

@Bad-and-Mad commented on August 12th 2020

Would you please create the pull request?

Thank you so much!

@Findus23 commented on August 13th 2020 Member

@Bad-and-Mad I created https://github.com/matomo-org/matomo/pull/16292 with the change.

This Issue was closed on August 13th 2020
Powered by GitHub Issue Mirror