It would be better to split the mail analysis function using a filter. This would have two advantages: - To optimise the analysis function because it has now grown to over 700 lines. - Anyone in this way can add a custom test to the set of default ones.