Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default signature is not applied (regexps in application rules could help) #65

Open
AlexanderAmelkin opened this issue May 23, 2022 · 2 comments

Comments

@AlexanderAmelkin
Copy link

I have 4 signatures:

  1. Short English (default, no matching rule)
  2. Full English (no matching rule)
  3. Short local (rule *@mycompany.mydomain, all recipients must match)
  4. Full local (no matching rule)

The idea was that for all recipients in mycompany.mydomain, signature 3 must be used, while for all others (default) it must be signature 1.

In fact, signature 1 is never used.

It would be must better if the match field was a regexp (perl-style), so one could use negations, grouping, etc.

@4ch1m
Copy link
Owner

4ch1m commented May 23, 2022

The idea was that for all recipients in mycompany.mydomain, signature 3 must be used, while for all others (default) it must be signature 1.

The idea is that (whilst composing) every recipient must match with any of the given patterns:

image

As soon as there is even one recipient that doesn't fit to any pattern, the auto-switch won't get triggered.

In fact, signature 1 is never used.

Please provide a more concrete example with detailed test-data.

It would be must better if the match field was a regexp (perl-style), so one could use negations, grouping, etc.

Not everybody out there is a programmer.
Using an asterisk as placeholder seems more user-friendly for me.

@AlexanderAmelkin
Copy link
Author

The idea was that for all recipients in mycompany.mydomain, signature 3 must be used, while for all others (default) it must be signature 1.

The idea is that (whilst composing) every recipient must match with any of the given patterns:

Yes, I get that. My complain is that (IMO) if a match fails for some of the signatures, other signatures should still get checked, and if no rule matched, then as a final step the default signature should be used. Otherwise I don't get the idea of the 'default' signature.

image

As soon as there is even one recipient that doesn't fit to any pattern, the auto-switch won't get triggered.

That is clear, but that applies to that single signature for which the rule failed, doesn't it?

In fact, signature 1 is never used.

Please provide a more concrete example with detailed test-data.

Case 1: A message to colleague@mycompany.mydomain
Expected result: "Short local" signature (by auto-switch, based on the recipient match)
Actual result: "Short local" signature, as expected

Case 2: A message to john.doe@somewhere.com
Expected result: "Short English" signature (the default one)
Actual result: No signature at all

It would be must better if the match field was a regexp (perl-style), so one could use negations, grouping, etc.

Not everybody out there is a programmer. Using an asterisk as placeholder seems more user-friendly for me.

For non-programmers out there we could have a checkbox "Use regular expressions" that would be unchecked by default.
Anyway, even if regexps are not added, I believe that even non-programmers would benefit from the ability to negate the pattern (auto-switch if none of the recipients match any of the provided patterns). You could then build more sophisticated rule cascades and probably even eliminate the need for the 'default' attribute for signatures (which anyway doesn't seem to work).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants