paperless-ng icon indicating copy to clipboard operation
paperless-ng copied to clipboard

[BUG] Mail consumer creates correspondent entries for email that should be ingored

Open reusing-code opened this issue 3 years ago • 3 comments

Describe the bug When consuming an email folder using a mail rule that uses "Assign corresponent from: Use name (or mail address if not available)" it creates corresponent entries for all emails that have any attachments in this folder, even those that don't match the filter. This results in many empty correspondent entries (with 0 documents), that are just unnecessary noise.

To Reproduce Steps to reproduce the behavior:

  1. Configure an email account (Admin -> Mail accounts)
  2. Create an email rule (Admin -> Mail rules -> add) with the following settings:
    • choose the email account and some folder
    • Some filter, e.g. Filter attachment filename: *.pdf
    • Attachment type: only process attachments
    • Metadata: Assign corresponent from: Use name (or mail address if not available)
  3. Put some emails into the folder, some with, some without pdf attachments
  4. After processing the correspondents list will be populated with all email correspondents, not just the ones from emails with pdf attachments

Expected behavior Only the correspondents that have an actual document assigned to them during processing are created by the mail consumer.

Screenshots

Webserver logs

[2022-02-14 14:42:09,399] [DEBUG] [paperless_mail] Rule ##### Posteingang: Processing mail Login with your FRITZ!Box 7490 from the Internet from [email protected] with 2 attachment(s)

[2022-02-14 14:42:09,400] [DEBUG] [paperless_mail] Rule ##### Posteingang: Skipping attachment  with content disposition inline

[2022-02-14 14:42:09,401] [DEBUG] [paperless_mail] Rule ##### Posteingang: Skipping attachment  with content disposition inline

In that case MyFritz was created as a correspondent

Relevant information

  • Host OS of the machine running paperless: Ubuntu 20.04
  • Browser chrome
  • Version 1.5.0
  • Installation method: docker
  • Any configuration changes you made in docker-compose.yml, docker-compose.env or paperless.conf: Irrelevant

reusing-code avatar Feb 14 '22 17:02 reusing-code

I have the same problem. Do you already have a solution / fix for the problem?

TobiTobsn007 avatar Jan 16 '23 20:01 TobiTobsn007

Well, my solution was to have an extra folder (I called it paperless) in my email account and I'm only process that folder in paperless. I copy all emails with pdf attachments into that folder. It's an extra manual step, but works pretty well.

reusing-code avatar Jan 16 '23 21:01 reusing-code

Thanks for your answer. I found an option that works for me. Changing 'attachment type' to -> Process all files including 'inline' attachments.

TobiTobsn007 avatar Jan 17 '23 20:01 TobiTobsn007