-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat(rule mail collector): add criterion for quarantine released #18943
base: 10.0/bugfixes
Are you sure you want to change the base?
Conversation
This probably requires a test case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reverted the change in src/RuleMailCollector.php
(then ran db:install
), tests are still green. I'd expect they fail, should'nt they?
In |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it could be possible to pass all headers in a _headers
to the input in the RuleMailCollectorCollection::prepareInputDataForProcess()
method, add a _headers
criterion, and adapt the RuleCriteria::match()
method to handle array of values in the different pattern types.
@@ -110,6 +110,12 @@ public function getCriterias() | |||
$criterias['x-uce-status']['table'] = ''; | |||
$criterias['x-uce-status']['type'] = 'text'; | |||
|
|||
$criterias['_headers'] = [ | |||
'name' => __('Full email headers'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this would be more precise:
'name' => __('Full email headers'), | |
'name' => __('Entire email header string'), |
@cconard96 What would be the most relevant text here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just Headers
would be fine IMO.
If headers contains XXX then ...
Checklist before requesting a review
Please delete options that are not relevant.
Description
When an email is quarantined by Microsoft and then released by an admin, GLPI considers it as an automated email and blocks it using the default rule:
This PR adds a criterion to the default rule to identify that an email has been released from quarantine by modifying the rule as follows:
However, since this criterion is specific to Microsoft, the default rule is not modified. Users must add it manually if needed.