mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-09-26 01:12:43 -05:00
Enhancement: Allow excluding mail attachments by name (#4691)
* Adds new filtering to exclude attachments from processing * Frontend use include / exclude mail rule filename filters --------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
@@ -139,8 +139,8 @@ class MailRule(document_models.ModelWithOwner):
|
||||
blank=True,
|
||||
)
|
||||
|
||||
filter_attachment_filename = models.CharField(
|
||||
_("filter attachment filename"),
|
||||
filter_attachment_filename_include = models.CharField(
|
||||
_("filter attachment filename inclusive"),
|
||||
max_length=256,
|
||||
null=True,
|
||||
blank=True,
|
||||
@@ -151,6 +151,18 @@ class MailRule(document_models.ModelWithOwner):
|
||||
),
|
||||
)
|
||||
|
||||
filter_attachment_filename_exclude = models.CharField(
|
||||
_("filter attachment filename exclusive"),
|
||||
max_length=256,
|
||||
null=True,
|
||||
blank=True,
|
||||
help_text=_(
|
||||
"Do not consume documents which entirely match this "
|
||||
"filename if specified. Wildcards such as *.pdf or "
|
||||
"*invoice* are allowed. Case insensitive.",
|
||||
),
|
||||
)
|
||||
|
||||
maximum_age = models.PositiveIntegerField(
|
||||
_("maximum age"),
|
||||
default=30,
|
||||
|
Reference in New Issue
Block a user