paperless icon indicating copy to clipboard operation
paperless copied to clipboard

The secret wasn't in the body - but it is...

Open reiniertc opened this issue 4 years ago • 3 comments

I've configured the mail importer in my paperless-docker setup on my synology. In the log, In 90% of the time I keep getting "The secret wasn't in the body" and the consumer won't import the mail. But the secret is mentioned in the body of the mail.

I've tried:

  • only the secret in the body
  • the secret as the first word in the body

Any ideas why I keep getting the error?

reiniertc avatar May 07 '20 11:05 reiniertc

Can we assume that you have PAPERLESS_EMAIL_SECRET configured as an environment variable e.g. either in paperless.conf or via docker-compose.yml?

Do you have spelled it the same way (e.g. match casing etc.) in your mail as you configured it?

You could add a log statement here and verify what's actually received as body.

Tooa avatar Jun 13 '20 18:06 Tooa

Yes I have PAPERLESS_EMAIL_SECRET configured as an environment variable (in the Synology GUI). And it's spelled the correct way (inlcuding matching cases).

I'm relatively new to docker: I'm guessing you suggest to add some code to start logging the mail subject, but I have no idea how to do that.

reiniertc avatar Jun 16 '20 10:06 reiniertc

I ran into the same error message. The problem is in the message encoding. When sent using Office 365 the message body is base64 encoded and paperless doesn't read the encoding header for the body. When sent using a service like gmail that does not base64 encode the body, it works properly.

drbayer avatar Feb 17 '21 22:02 drbayer