diff --git a/src/paperless_mail/mail.py b/src/paperless_mail/mail.py index a4ff6478c..a41b52a6e 100644 --- a/src/paperless_mail/mail.py +++ b/src/paperless_mail/mail.py @@ -831,6 +831,7 @@ class MailAccountHandler(LoggingMixin): input_doc = ConsumableDocument( source=DocumentSource.MailFetch, original_file=temp_filename, + mailrule_id=rule.pk, ) doc_overrides = DocumentMetadataOverrides( title=message.subject,