mail_user mail filters for maildrop not working correctly (or misleading)
-- This bug report also applies to the SVN version (currently commit 2870) --
When creating a mail filter for a mailbox, to regexp being used is not entirely correct. mail headers are always formatted like "Header: Value"
So if i'd like to delete all mail coming from foo@bar.com, you would set:
Name: foo Source: To - Is - foo@bar.com Action: Delete
This creates the regexp: if (/^To:foo@bar.com$/:h)
Which is incorrect. There should be a space between the header and value.
Current work-around is to choose "Begins", "Contains" or "Ends"
So it's a bit misleading .. i want to block all mail where To Is "foo@bar.com" .. not " foo@bar.com".
I suggest to fix the regexps so by default it puts a space between the header and the value and from there on you check for begin/end/is/contains
I made a patch and it's in commit 2781
Note: If someone using sieve can test this as well, and patch it as well, because I think it has the same problem.