You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mailgen processes all scripts in alphabetical order and checks the return values of the create_notifications function. The first script that returns a list of EmailNotification objects, stops the iteration.
All scripts can change the context, and in the known installation as well as in the example scripts, the first scripts add information to the context (00add_variables_to_context.py) and change the contact information (e.g., by selecting the most specific one).
However, if one of the scripts throws an exception, it is just skipped (line 152-155):
That means, though, that the context is different from what was expected, information is missing or wrong, and the notifications will be sent to other recipients or have unwanted content.
I propose to change the behavior to not send directives when any script fails to process it.
We could have an optional parameter (in the configuration file and/or command line flag) to ignore errors for the current behavior.
The text was updated successfully, but these errors were encountered:
Mailgen processes all scripts in alphabetical order and checks the return values of the
create_notifications
function. The first script that returns a list ofEmailNotification
objects, stops the iteration.All scripts can change the context, and in the known installation as well as in the example scripts, the first scripts add information to the context (
00add_variables_to_context.py
) and change the contact information (e.g., by selecting the most specific one).However, if one of the scripts throws an exception, it is just skipped (line 152-155):
intelmq-mailgen/intelmqmail/cb.py
Lines 148 to 159 in 8722f9b
That means, though, that the context is different from what was expected, information is missing or wrong, and the notifications will be sent to other recipients or have unwanted content.
@bernhardreiter Is this behaviour by design? If so, why?
I propose to change the behavior to not send directives when any script fails to process it.
We could have an optional parameter (in the configuration file and/or command line flag) to ignore errors for the current behavior.
The text was updated successfully, but these errors were encountered: