diff --git a/docs/usage.md b/docs/usage.md index 28d6265ef..75bf5c27a 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -136,7 +136,9 @@ These rules perform the following: Paperless will check all emails only once and completely ignore messages that do not match your filters. It will also only perform the rule action -on e-mails that it has consumed documents from. +on e-mails that it has consumed documents from. The filename attachment +exclusion pattern could be splitted by commto to allow different exclusion +patterns. The actions all ensure that the same mail is not consumed twice by different means. These are as follows: diff --git a/src/paperless_mail/tests/test_mail.py b/src/paperless_mail/tests/test_mail.py index 26130b643..90a2bc797 100644 --- a/src/paperless_mail/tests/test_mail.py +++ b/src/paperless_mail/tests/test_mail.py @@ -592,6 +592,18 @@ class TestMail( exclude_pattern="f1*", expected_matches=["f2.pdf", "f3.pdf", "file.PDf"], ), + FilterTestCase( + "PDF Files without f1 and f2", + include_pattern="*.pdf", + exclude_pattern="f1*,f2*", + expected_matches=["f3.pdf", "file.PDf"], + ), + FilterTestCase( + "PDF Files without f1 and f2 and f3", + include_pattern="*.pdf", + exclude_pattern="f1*,f2*,f3*", + expected_matches=[list"file.PDf"], + ), FilterTestCase( "All Files, no PNG", include_pattern="*",