mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +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
|
// SPAM
|
||||||
\MailSo\Mime\Enumerations\Header::X_SPAM_STATUS,
|
\MailSo\Mime\Enumerations\Header::X_SPAM_STATUS,
|
||||||
\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
|
||||||
,\MailSo\Mime\Enumerations\Header::X_VIRUS_SCANNED,
|
\MailSo\Mime\Enumerations\Header::X_VIRUS,
|
||||||
,\MailSo\Mime\Enumerations\Header::X_VIRUS_STATUS
|
\MailSo\Mime\Enumerations\Header::X_VIRUS_SCANNED,
|
||||||
|
\MailSo\Mime\Enumerations\Header::X_VIRUS_STATUS
|
||||||
), true);
|
), true);
|
||||||
//
|
//
|
||||||
// return \MailSo\Imap\Enumerations\FetchType::ENVELOPE;
|
// return \MailSo\Imap\Enumerations\FetchType::ENVELOPE;
|
||||||
|
|
|
||||||
|
|
@ -479,6 +479,9 @@ class Message implements \JsonSerializable
|
||||||
$this->bIsSpam = false !== \stripos($spam, 'YES');
|
$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 ($virus = $oHeaders->ValueByName(\MailSo\Mime\Enumerations\Header::X_VIRUS_STATUS)) {
|
||||||
if (false !== \stripos($spam, 'infected')) {
|
if (false !== \stripos($spam, 'infected')) {
|
||||||
$this->bHasVirus = true;
|
$this->bHasVirus = true;
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,8 @@ abstract class Header
|
||||||
X_HAM_REPORT = 'X-Ham-Report',
|
X_HAM_REPORT = 'X-Ham-Report',
|
||||||
X_MICROSOFT_ANTISPAM = 'x-microsoft-antispam',
|
X_MICROSOFT_ANTISPAM = 'x-microsoft-antispam',
|
||||||
|
|
||||||
// X-Quarantine-ID
|
// X_QUARANTINE_ID = 'X-Quarantine-ID',
|
||||||
|
// Rspamd
|
||||||
X_VIRUS = 'X-Virus',
|
X_VIRUS = 'X-Virus',
|
||||||
// ClamAV
|
// ClamAV
|
||||||
X_VIRUS_SCANNED = 'X-Virus-Scanned',
|
X_VIRUS_SCANNED = 'X-Virus-Scanned',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue