File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
intelmq/bots/outputs/smtp_batch Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -330,16 +330,18 @@ def prepare_mails(self) -> Iterable[Mail]:
330
330
331
331
# collect all data which must be the same for all events of the
332
332
# bucket and thus can be used for templating
333
- template_data = {}
334
- # only collect if templating is enabled (save the memory otherwise)
333
+ template_keys = [ 'source.abuse_contact' ]
334
+ # only collect if templating is enabled (save the memory otherwise)+
335
335
if jinja2 and self .templating and any (self .templating .values ()):
336
- template_data = {
337
- k .replace ("." , "_" ): lines [0 ][k ]
338
- for k in ["source.abuse_contact" ] + self .additional_grouping_keys
339
- if k in rows_output [0 ]
340
- }
336
+ template_keys .extend (self .additional_grouping_keys )
341
337
342
- email_to = template_data ["source_abuse_contact" ]
338
+ template_data = {
339
+ k .replace ("." , "_" ): lines [0 ][k ]
340
+ for k in template_keys
341
+ if k in rows_output [0 ]
342
+ }
343
+
344
+ email_to = template_data ["source.abuse_contact" ]
343
345
filename = f'{ time .strftime ("%y%m%d" )} _{ count } _events'
344
346
path = NamedTemporaryFile ().name
345
347
You can’t perform that action at this time.
0 commit comments