diff --git a/webui/config.php b/webui/config.php index 429108e8..6c67d21e 100644 --- a/webui/config.php +++ b/webui/config.php @@ -19,6 +19,7 @@ define('ENABLE_GOOGLE_LOGIN', 0); define('SEARCH_RESULT_CHECKBOX_CHECKED', 1); define('HELPER_URL', ''); define('ENABLE_SYSLOG', 0); +define('REWRITE_MESSAGE_ID', 0); define('GOOGLE_CLIENT_ID', 'xxxxxxxxxxx'); define('GOOGLE_CLIENT_SECRET', 'xxxxxxxxxxxxx'); define('GOOGLE_DEVELOPER_KEY', 'xxxxxxxxxxxx'); diff --git a/webui/model/mail/mail.php b/webui/model/mail/mail.php index 6c8fcf7a..5f2aa672 100644 --- a/webui/model/mail/mail.php +++ b/webui/model/mail/mail.php @@ -8,6 +8,10 @@ class ModelMailMail extends Model { if($to == "" || strlen($msg) < 30){ return $ok; } + if(REWRITE_MESSAGE_ID == 1) { + $msg = preg_replace("/Message-ID:([\ \w\_\-\@\<\>\.\r]+)\n/i", "Message-ID: <" . generate_random_string(25) . '@' . SITE_NAME . ">\n", $msg); + } + $r = fsockopen($smtphost, $smtpport); if(!$r){ return -1; }