Skip to content

Commit

Permalink
#162 SpamAssassin "X-Spam-Status: No," is not spam and "X-Spam-Status…
Browse files Browse the repository at this point in the history
…: Yes," is spam
  • Loading branch information
djmaze committed Nov 18, 2021
1 parent fd2304e commit 2ceb036
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ private function getEnvelopeOrHeadersRequestString()
\MailSo\Mime\Enumerations\Header::LIST_UNSUBSCRIBE,
// SPAM
\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_BOGOSITY,
// Virus
Expand Down
5 changes: 3 additions & 2 deletions snappymail/v/0.0.0/app/libraries/MailSo/Mail/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,9 @@ function ($link) {
$this->sSpamResult = "{$value[1]} / {$required[1]}";
}
}
$spam = $oHeaders->ValueByName(\MailSo\Mime\Enumerations\Header::X_SPAM_FLAG);
$this->bIsSpam = false !== \stripos($spam, 'YES');
$this->bIsSpam = 0 === \strpos($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)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ abstract class Header
X_SPAM_FLAG = 'X-Spam-Flag', // YES/NO
X_SPAM_LEVEL = 'X-Spam-Level', // *******
X_SPAM_STATUS = 'X-Spam-Status', // Yes|No
X_SPAM_BAR = 'X-Spam-Bar', // ++
// Rspamd
X_SPAMD_RESULT = 'X-Spamd-Result', // default: False [7.13 / 9.00],
X_SPAMD_BAR = 'X-Spamd-Bar', // +++++++
Expand Down
4 changes: 2 additions & 2 deletions snappymail/v/0.0.0/app/libraries/MailSo/Mime/Header.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ function __construct(string $sName, string $sValue = '', string $sEncodedValueFo

private function initInputData(string $sName, string $sValue, string $sEncodedValueForReparse) : void
{
$this->sName = trim($sName);
$this->sFullValue = trim($sValue);
$this->sName = \trim($sName);
$this->sFullValue = \trim($sValue);
$this->sEncodedValueForReparse = '';

$this->oParameters = null;
Expand Down

0 comments on commit 2ceb036

Please sign in to comment.