Skip to content

Commit

Permalink
Faster bIsSpam check #162
Browse files Browse the repository at this point in the history
  • Loading branch information
djmaze committed Nov 18, 2021
1 parent 2ceb036 commit c78be97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion snappymail/v/0.0.0/app/libraries/MailSo/Mail/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ function ($link) {
$this->sSpamResult = "{$value[1]} / {$required[1]}";
}
}
$this->bIsSpam = 0 === \strpos($spam, 'Yes,');
$this->bIsSpam = 'Yes' === \substr($spam, 0, 3);
// $spam = $oHeaders->ValueByName(\MailSo\Mime\Enumerations\Header::X_SPAM_FLAG);
// $this->bIsSpam = false !== \stripos($spam, 'YES');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ 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', // ++
X_SPAM_BAR = 'X-Spam-Bar', // ++ | --
X_SPAM_REPORT = 'X-Spam-Report',
// Rspamd
X_SPAMD_RESULT = 'X-Spamd-Result', // default: False [7.13 / 9.00],
X_SPAMD_BAR = 'X-Spamd-Bar', // +++++++
Expand Down

0 comments on commit c78be97

Please sign in to comment.