]> git.mxchange.org Git - friendica.git/blobdiff - src/Util/Emailer.php
Make the proxy functionality optional
[friendica.git] / src / Util / Emailer.php
index b402abf25e66ca01230ebe3bf286ea58ce8e7aa3..8116fbf85017d646e03969a87e409aaee96d292c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -134,6 +134,17 @@ class Emailer
                        return true;
                }
 
+               // @see https://github.com/friendica/friendica/issues/9142
+               $countMessageId = 0;
+               foreach ($email->getAdditionalMailHeader() as $name => $value) {
+                       if (strtolower($name) == 'message-id') {
+                               $countMessageId += count($value);
+                       }
+               }
+               if ($countMessageId > 0) {
+                       $this->logger->warning('More than one Message-ID found - RFC violation', ['email' => $email]);
+               }
+
                $email_textonly = false;
                if (!empty($email->getRecipientUid())) {
                        $email_textonly = $this->pConfig->get($email->getRecipientUid(), 'system', 'email_textonly');