Closed vdcloudcraft closed 3 years ago
Glad you like the feature :)
OH. Well this is the stuff you usually don't think too much about, and I wasn't even aware of that character limit. Regarding extending the character limit: sure, we can do that. It's supposed to be 128 characters, but due to some weir legacy code that's still in there from OG paperless, it was limited to 50.
About truncating names: I'm not so sure. If we truncate correspondent names, Paperless would create a new correspondent object for the truncated name; possibly creating unwanted correspondents that you have to edit later, and new mails from the same correspondent with the long name would get truncated again, not match the edited correspondent and another correspondent is created. Not ideal.
I'd rather not set a correspondent at all in that case.
Another effect that comes from this, is that the consumption process entirely fails after this error. This doesn't seem like it would be breaking the consumption for other mails, so maybe catching that error and continuing would be more intuitive. Right now one mail with unexpected format is preventing all other mails in that imap folder from being consumed.
Sure, I'll put that on the list, seems reasonable.
Hi, I've set up paperless-ng with docker-compose and Postgres. While tinkering with some mail settings I've come across following traceback in the admin logs:
I've set up some mail processing rules (which btw is an excellent feature that I plan on using extensively) and this one is configured to assign the correspondent from name. I've located the offending mail and it comes from an Amazon Marketplace vendor that crammed a stupid amount of marketing claims into its name, which is then reflected as the name of the sender in that mail.
So, seeing as I can't change that vendors name, would it be possible to either increase the character limit in the db for that field (50 seems somewhat low, seeing how those names can get quite long when being generated like Amazon does) or to just truncate the the name to 50 chars? I don't really see myself needing more than 50 chars after sanitizing those names, but the data needs to get into the system so I can actually do that.
Another effect that comes from this, is that the consumption process entirely fails after this error. This doesn't seem like it would be breaking the consumption for other mails, so maybe catching that error and continuing would be more intuitive. Right now one mail with unexpected format is preventing all other mails in that imap folder from being consumed.
I'd love to provide a PR for this, but unfortunately my Python/Django-Fu isn't advanced enough for this yet.