@@ -29,113 +29,101 @@ processors:
2929 lang : painless
3030 params :
3131 definite_positive :
32- Action : receipt
33- Attempt : delivery
34- AttNames : process
35- CustomerIP : avlog
36- CustomName : impersonation-protect
37- CustomThreatDictionary : impersonation-protect
38- Definition : impersonation-protect
39- Delivered : delivery
40- Err : delivery
41- Error : receipt
42- fileName : attachment-protect
43- Hits : impersonation-protect
44- Hld : process
45- InternalName : impersonation-protect
46- IPInternalName : process
47- IPNewDomain : process
48- IPReplyMismatch : process
49- IPSimilarDomain : process
50- IPThreadDict : process
51- Latency : delivery
52- MimecastIP : avlog
53- MsgSize : process
54- NewDomain : impersonation-protect
32+ action : receipt
33+ attempt : delivery
34+ attnames : process
35+ customerip : avlog
36+ customname : impersonation-protect
37+ customthreatdictionary : impersonation-protect
38+ definition : impersonation-protect
39+ delivered : delivery
40+ err : delivery
41+ error : receipt
42+ filename : attachment-protect
43+ hits : impersonation-protect
44+ hld : process
45+ internalname : impersonation-protect
46+ ipinternalname : process
47+ ipnewdomain : process
48+ ipreplymismatch : process
49+ ipsimilardomain : process
50+ ipthreaddict : process
51+ latency : delivery
52+ mimecastip : avlog
53+ msgsize : process
54+ newdomain : impersonation-protect
5555 reason : url-protect
56- ReceiptAck : delivery
57- ReplyMismatch : impersonation-protect
58- RcptActType : journal
59- ScanResultInfo : internal-email-protect
60- SenderDomainInternal : avlog
61- SimilarCustomExternalDomain : impersonation-protect
62- SimilarInternalDomain : impersonation-protect
63- SimilarMimecastExternalDomain : impersonation-protect
64- Snt : delivery
65- SpamInfo : receipt
66- SpamLimit : receipt
67- SpamProcessingDetail : receipt
68- SpamScore : receipt
69- TaggedExternal : impersonation-protect
70- TaggedMalicious : impersonation-protect
71- ThreatDictionary : impersonation-protect
72- UseTls : delivery
56+ receiptack : delivery
57+ replymismatch : impersonation-protect
58+ rcptacttype : journal
59+ scanresultinfo : internal-email-protect
60+ senderdomaininternal : avlog
61+ similarcustomexternaldomain : impersonation-protect
62+ similarinternaldomain : impersonation-protect
63+ similarmimecastexternaldomain : impersonation-protect
64+ snt : delivery
65+ spaminfo : receipt
66+ spamlimit : receipt
67+ spamprocessingdetail : receipt
68+ spamscore : receipt
69+ taggedexternal : impersonation-protect
70+ taggedmalicious : impersonation-protect
71+ threatdictionary : impersonation-protect
72+ usetls : delivery
7373 negative :
74- aCode : [avlog, url-protect, attachment-protect]
75- Act : [delivery, avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect, journal]
76- AttCnt : [receipt, avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect, journal]
77- AttSize : [receipt, avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect, journal]
78- Cphr : [process,avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect, journal]
79- Dir : [process, avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect]
80- fileExt : [receipt, process, delivery, spam, internal-email-protect, impersonation-protect, url-protect, journal]
81- fileMime : [receipt, process, delivery, spam, internal-email-protect, impersonation-protect, url-protect, journal]
82- headerFrom : [process, delivery, avlog, internal-email-protect, impersonation-protect, url-protect, attachment-protect, journal]
83- IP : [process, spam, internal-email-protect, url-protect, journal]
74+ acode : [avlog, url-protect, attachment-protect]
75+ act : [delivery, avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect, journal]
76+ attcnt : [receipt, avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect, journal]
77+ attsize : [receipt, avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect, journal]
78+ cphr : [process,avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect, journal]
79+ dir : [process, avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect]
80+ fileext : [receipt, process, delivery, spam, internal-email-protect, impersonation-protect, url-protect, journal]
81+ filemime : [receipt, process, delivery, spam, internal-email-protect, impersonation-protect, url-protect, journal]
82+ headerfrom : [process, delivery, avlog, internal-email-protect, impersonation-protect, url-protect, attachment-protect, journal]
83+ ip : [process, spam, internal-email-protect, url-protect, journal]
8484 md5 : [receipt, process, delivery, spam, internal-email-protect, impersonation-protect, url-protect, journal]
85- Rcpt : [process, avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect]
85+ rcpt : [process, avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect]
8686 recipient : [receipt, process, delivery, journal]
87- Recipient : [receipt, process, delivery, journal]
88- RejCode : [process, avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect, journal]
89- RejInfo : [process, avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect, journal]
90- RejType : [process, avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect, journal]
87+ rejcode : [process, avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect, journal]
88+ rejinfo : [process, avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect, journal]
89+ rejtype : [process, avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect, journal]
9190 route : [receipt, process, journal]
92- Route : [receipt, process, journal]
93- senderDomain : [receipt, process, delivery, internal-email-protect, impersonation-protect, journal]
94- SenderDomain : [receipt, process, delivery, internal-email-protect, impersonation-protect, journal]
91+ senderdomain : [receipt, process, delivery, internal-email-protect, impersonation-protect, journal]
9592 sha1 : [receipt, process, delivery, spam, internal-email-protect, impersonation-protect, url-protect, journal]
9693 sha256 : [receipt, process, delivery, spam, internal-email-protect, impersonation-protect, url-protect, journal]
97- Size : [receipt, process, delivery, spam, internal-email-protect, impersonation-protect, url-protect, journal]
98- sourceIp : [receipt, process, delivery, avlog, internal-email-protect, impersonation-protect, attachment-protect, journal]
99- SourceIP : [receipt, process, delivery, avlog, internal-email-protect, impersonation-protect, attachment-protect, journal]
100- TlsVer : [process, avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect, journal]
94+ size : [receipt, process, delivery, spam, internal-email-protect, impersonation-protect, url-protect, journal]
95+ sourceip : [receipt, process, delivery, avlog, internal-email-protect, impersonation-protect, attachment-protect, journal]
96+ tlsver : [process, avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect, journal]
10197 url : [receipt, process, delivery, avlog, spam, impersonation-protect, attachment-protect, journal]
102- URL : [receipt, process, delivery, avlog, spam, impersonation-protect, attachment-protect, journal]
103- urlCategory : [receipt, process, delivery, avlog, spam, impersonation-protect, attachment-protect, journal]
104- UrlCategory : [receipt, process, delivery, avlog, spam, impersonation-protect, attachment-protect, journal]
105- Virus : [process, delivery, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect, journal]
98+ urlcategory : [receipt, process, delivery, avlog, spam, impersonation-protect, attachment-protect, journal]
99+ virus : [process, delivery, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect, journal]
106100 positive :
107- aCode : [receipt, process, delivery, spam, internal-email-protect, impersonation-protect, journal]
108- Act : [receipt, process]
109- AttCnt : [process, delivery]
110- AttSize : [process, delivery]
111- Cphr : [receipt, delivery]
112- Dir : [receipt, delivery, journal]
113- fileExt : [avlog, attachment-protect]
114- fileMime : [avlog, attachment-protect]
115- headerFrom : [receipt, spam]
116- IP : [receipt, delivery, avlog, impersonation-protect, attachment-protect]
101+ acode : [receipt, process, delivery, spam, internal-email-protect, impersonation-protect, journal]
102+ act : [receipt, process]
103+ attcnt : [process, delivery]
104+ attsize : [process, delivery]
105+ cphr : [receipt, delivery]
106+ dir : [receipt, delivery, journal]
107+ fileext : [avlog, attachment-protect]
108+ filemime : [avlog, attachment-protect]
109+ headerfrom : [receipt, spam]
110+ ip : [receipt, delivery, avlog, impersonation-protect, attachment-protect]
117111 md5 : [avlog, attachment-protect]
118- Rcpt : [receipt, delivery, journal]
112+ rcpt : [receipt, delivery, journal]
119113 recipient : [avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect]
120- Recipient : [avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect]
121- RejCode : [receipt, delivery]
122- RejInfo : [receipt, delivery]
123- RejType : [receipt, delivery]
114+ rejcode : [receipt, delivery]
115+ rejinfo : [receipt, delivery]
116+ rejtype : [receipt, delivery]
124117 route : [delivery, avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect]
125- Route : [delivery, avlog, spam, internal-email-protect, impersonation-protect, url-protect, attachment-protect]
126- senderDomain : [avlog, spam, url-protect, attachment-protect]
127- SenderDomain : [avlog, spam, url-protect, attachment-protect]
118+ senderdomain : [avlog, spam, url-protect, attachment-protect]
128119 sha1 : [avlog, attachment-protect]
129120 sha256 : [avlog, attachment-protect]
130- Size : [avlog, attachment-protect]
131- sourceIp : [spam, url-protect]
132- SourceIP : [spam, url-protect]
133- TlsVer : [receipt, delivery]
121+ size : [avlog, attachment-protect]
122+ sourceip : [spam, url-protect]
123+ tlsver : [receipt, delivery]
134124 url : [internal-email-protect, url-protect]
135- URL : [internal-email-protect, url-protect]
136- urlCategory : [internal-email-protect, url-protect]
137- UrlCategory : [internal-email-protect, url-protect]
138- Virus : [receipt, avlog]
125+ urlcategory : [internal-email-protect, url-protect]
126+ virus : [receipt, avlog]
139127 candidates :
140128 receipt : 0
141129 process : 0
@@ -149,7 +137,14 @@ processors:
149137 attachment-protect : 0
150138 if : ctx.mimecast instanceof Map
151139 source : |
140+ // Canonicalise keys to lowercase. If this causes issues in future
141+ // because case becomes significant, this table space optimisation
142+ // will need to be reverted.
143+ def keys = new HashSet();
152144 for (def k: ctx.mimecast.keySet()) {
145+ keys.add(k.toLowerCase());
146+ }
147+ for (def k: keys) {
153148 def typ = params.definite_positive.get(k);
154149 if (typ != null) {
155150 // We have a definitive known stage.
@@ -158,7 +153,7 @@ processors:
158153 }
159154 }
160155 def score = params.candidates.clone();
161- for (def k: ctx.mimecast.keySet() ) {
156+ for (def k: keys ) {
162157 def typ = params.negative.get(k);
163158 if (typ == null) {
164159 continue;
@@ -174,7 +169,7 @@ processors:
174169 }
175170 // Find best remaining and list all co-equal winners.
176171 int max = 0;
177- for (def k: ctx.mimecast.keySet() ) {
172+ for (def k: keys ) {
178173 def typ = params.positive.get(k);
179174 if (typ == null) {
180175 continue;
0 commit comments