New header match rules are constantly created
Header match rules are named using a class attribute counter (HeaderMatchRule._count
) that is incremented on each rule creation. Existing rules are not checked when the get_links()
method is called, as a result new rule instances are created each time an email arrives. This leads to logs that are very hard to debug, this is part of the content of the msgdata
dict:
{'rule_hits': ['header-match-186300', 'header-match-186301']}
I have a merge request that will give the rules more predictable and debuggable names, and reuse them if possible.