mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-08 22:18:28 +03:00
Issue #139 detect Rspamd X-Virus
This commit is contained in:
parent
33b7546e9c
commit
d71b36f09e
3 changed files with 9 additions and 4 deletions
|
|
@ -157,10 +157,11 @@ class MailClient
|
|||
// SPAM
|
||||
\MailSo\Mime\Enumerations\Header::X_SPAM_STATUS,
|
||||
\MailSo\Mime\Enumerations\Header::X_SPAMD_RESULT,
|
||||
\MailSo\Mime\Enumerations\Header::X_BOGOSITY
|
||||
\MailSo\Mime\Enumerations\Header::X_BOGOSITY,
|
||||
// Virus
|
||||
,\MailSo\Mime\Enumerations\Header::X_VIRUS_SCANNED,
|
||||
,\MailSo\Mime\Enumerations\Header::X_VIRUS_STATUS
|
||||
\MailSo\Mime\Enumerations\Header::X_VIRUS,
|
||||
\MailSo\Mime\Enumerations\Header::X_VIRUS_SCANNED,
|
||||
\MailSo\Mime\Enumerations\Header::X_VIRUS_STATUS
|
||||
), true);
|
||||
//
|
||||
// return \MailSo\Imap\Enumerations\FetchType::ENVELOPE;
|
||||
|
|
|
|||
|
|
@ -479,6 +479,9 @@ class Message implements \JsonSerializable
|
|||
$this->bIsSpam = false !== \stripos($spam, 'YES');
|
||||
}
|
||||
|
||||
if ($virus = $oHeaders->ValueByName(\MailSo\Mime\Enumerations\Header::X_VIRUS)) {
|
||||
$this->bHasVirus = true;
|
||||
}
|
||||
if ($virus = $oHeaders->ValueByName(\MailSo\Mime\Enumerations\Header::X_VIRUS_STATUS)) {
|
||||
if (false !== \stripos($spam, 'infected')) {
|
||||
$this->bHasVirus = true;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,8 @@ abstract class Header
|
|||
X_HAM_REPORT = 'X-Ham-Report',
|
||||
X_MICROSOFT_ANTISPAM = 'x-microsoft-antispam',
|
||||
|
||||
// X-Quarantine-ID
|
||||
// X_QUARANTINE_ID = 'X-Quarantine-ID',
|
||||
// Rspamd
|
||||
X_VIRUS = 'X-Virus',
|
||||
// ClamAV
|
||||
X_VIRUS_SCANNED = 'X-Virus-Scanned',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue