mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 08:27:03 +03:00
Added: Search in HEADER. Like: "header=X-Rspamd-Action no action"
This commit is contained in:
parent
94aa2f11c4
commit
a08d376023
1 changed files with 10 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ namespace MailSo\Imap;
|
||||||
class SearchCriterias
|
class SearchCriterias
|
||||||
{
|
{
|
||||||
const
|
const
|
||||||
RegEx = 'in|e?mail|from|to|subject|has|is|date|since|before|text|body|size|larger|bigger|smaller|maxsize|minsize|keyword|older_than|newer_than|on|senton|sentsince|sentbefore';
|
RegEx = 'in|e?mail|from|to|subject|has|is|date|since|before|text|body|size|larger|bigger|smaller|maxsize|minsize|keyword|older_than|newer_than|on|senton|sentsince|sentbefore|header';
|
||||||
/**
|
/**
|
||||||
https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.4
|
https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.4
|
||||||
|
|
||||||
|
|
@ -234,6 +234,14 @@ class SearchCriterias
|
||||||
$aCriteriasResult[] = 'HEADER Content-Type multipart/report';
|
$aCriteriasResult[] = 'HEADER Content-Type multipart/report';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'HEADER':
|
||||||
|
$aValue = \explode(' ', $sRawValue, 2);
|
||||||
|
$aCriteriasResult[] = 'HEADER '
|
||||||
|
. static::escapeSearchString($oImapClient, $aValue[0])
|
||||||
|
. ' '
|
||||||
|
. static::escapeSearchString($oImapClient, $aValue[1]);
|
||||||
|
break;
|
||||||
|
|
||||||
case 'FLAGGED':
|
case 'FLAGGED':
|
||||||
case 'UNFLAGGED':
|
case 'UNFLAGGED':
|
||||||
case 'SEEN':
|
case 'SEEN':
|
||||||
|
|
@ -433,6 +441,7 @@ class SearchCriterias
|
||||||
case 'BEFORE':
|
case 'BEFORE':
|
||||||
case 'OLDER':
|
case 'OLDER':
|
||||||
case 'YOUNGER':
|
case 'YOUNGER':
|
||||||
|
case 'HEADER':
|
||||||
if (\strlen($mValue)) {
|
if (\strlen($mValue)) {
|
||||||
$aResult[$sName] = $mValue;
|
$aResult[$sName] = $mValue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue