mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-06 16:07:03 +03:00
#162 SpamAssassin "X-Spam-Status: No," is not spam and "X-Spam-Status: Yes," is spam
This commit is contained in:
parent
fd2304edcf
commit
2ceb036402
4 changed files with 7 additions and 5 deletions
|
|
@ -116,7 +116,7 @@ class MailClient
|
||||||
\MailSo\Mime\Enumerations\Header::LIST_UNSUBSCRIBE,
|
\MailSo\Mime\Enumerations\Header::LIST_UNSUBSCRIBE,
|
||||||
// SPAM
|
// SPAM
|
||||||
\MailSo\Mime\Enumerations\Header::X_SPAM_STATUS,
|
\MailSo\Mime\Enumerations\Header::X_SPAM_STATUS,
|
||||||
\MailSo\Mime\Enumerations\Header::X_SPAM_FLAG,
|
// \MailSo\Mime\Enumerations\Header::X_SPAM_FLAG,
|
||||||
\MailSo\Mime\Enumerations\Header::X_SPAMD_RESULT,
|
\MailSo\Mime\Enumerations\Header::X_SPAMD_RESULT,
|
||||||
\MailSo\Mime\Enumerations\Header::X_BOGOSITY,
|
\MailSo\Mime\Enumerations\Header::X_BOGOSITY,
|
||||||
// Virus
|
// Virus
|
||||||
|
|
|
||||||
|
|
@ -466,8 +466,9 @@ class Message implements \JsonSerializable
|
||||||
$this->sSpamResult = "{$value[1]} / {$required[1]}";
|
$this->sSpamResult = "{$value[1]} / {$required[1]}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$spam = $oHeaders->ValueByName(\MailSo\Mime\Enumerations\Header::X_SPAM_FLAG);
|
$this->bIsSpam = 0 === \strpos($spam, 'Yes,');
|
||||||
$this->bIsSpam = false !== \stripos($spam, 'YES');
|
// $spam = $oHeaders->ValueByName(\MailSo\Mime\Enumerations\Header::X_SPAM_FLAG);
|
||||||
|
// $this->bIsSpam = false !== \stripos($spam, 'YES');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($virus = $oHeaders->ValueByName(\MailSo\Mime\Enumerations\Header::X_VIRUS)) {
|
if ($virus = $oHeaders->ValueByName(\MailSo\Mime\Enumerations\Header::X_VIRUS)) {
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ abstract class Header
|
||||||
X_SPAM_FLAG = 'X-Spam-Flag', // YES/NO
|
X_SPAM_FLAG = 'X-Spam-Flag', // YES/NO
|
||||||
X_SPAM_LEVEL = 'X-Spam-Level', // *******
|
X_SPAM_LEVEL = 'X-Spam-Level', // *******
|
||||||
X_SPAM_STATUS = 'X-Spam-Status', // Yes|No
|
X_SPAM_STATUS = 'X-Spam-Status', // Yes|No
|
||||||
|
X_SPAM_BAR = 'X-Spam-Bar', // ++
|
||||||
// Rspamd
|
// Rspamd
|
||||||
X_SPAMD_RESULT = 'X-Spamd-Result', // default: False [7.13 / 9.00],
|
X_SPAMD_RESULT = 'X-Spamd-Result', // default: False [7.13 / 9.00],
|
||||||
X_SPAMD_BAR = 'X-Spamd-Bar', // +++++++
|
X_SPAMD_BAR = 'X-Spamd-Bar', // +++++++
|
||||||
|
|
|
||||||
|
|
@ -56,8 +56,8 @@ class Header
|
||||||
|
|
||||||
private function initInputData(string $sName, string $sValue, string $sEncodedValueForReparse) : void
|
private function initInputData(string $sName, string $sValue, string $sEncodedValueForReparse) : void
|
||||||
{
|
{
|
||||||
$this->sName = trim($sName);
|
$this->sName = \trim($sName);
|
||||||
$this->sFullValue = trim($sValue);
|
$this->sFullValue = \trim($sValue);
|
||||||
$this->sEncodedValueForReparse = '';
|
$this->sEncodedValueForReparse = '';
|
||||||
|
|
||||||
$this->oParameters = null;
|
$this->oParameters = null;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue