Email source processing broken in version 4.1.5
As a follow up to issue #1073 the fix implemented with 4.1.5 (or something else that has changed between 4.1.4 and 4.1.5) now prevents the processing of Email sources completely.
I tested with a POP3 source. Mails are no longer fetched from the mailbox. The following error is shown in the log:
app_1 | mayan.apps.sources.tasks <500> [ERROR] "task_source_process_document() line 42 Error processing source id: 18; __enter__" app_1 | Traceback (most recent call last): app_1 | File "/opt/mayan-edms/lib/python3.7/site-packages/mayan/apps/sources/tasks.py", line 38, in task_source_process_document app_1 | source.get_backend_instance().process_documents(dry_run=dry_run) app_1 | File "/opt/mayan-edms/lib/python3.7/site-packages/mayan/apps/sources/source_backends/mixins.py", line 113, in process_documents app_1 | for self.shared_uploaded_file in self.get_shared_uploaded_files() or (): app_1 | File "/opt/mayan-edms/lib/python3.7/site-packages/mayan/apps/sources/source_backends/email_backends.py", line 241, in get_shared_uploaded_files app_1 | with pop3_module(**kwargs) as server: app_1 | AttributeError: __enter__ app_1 | [2022-02-11 12:09:39,993: ERROR/ForkPoolWorker-1] Error processing source id: 18; __enter__ app_1 | Traceback (most recent call last): app_1 | File "/opt/mayan-edms/lib/python3.7/site-packages/mayan/apps/sources/tasks.py", line 38, in task_source_process_document app_1 | source.get_backend_instance().process_documents(dry_run=dry_run) app_1 | File "/opt/mayan-edms/lib/python3.7/site-packages/mayan/apps/sources/source_backends/mixins.py", line 113, in process_documents app_1 | for self.shared_uploaded_file in self.get_shared_uploaded_files() or (): app_1 | File "/opt/mayan-edms/lib/python3.7/site-packages/mayan/apps/sources/source_backends/email_backends.py", line 241, in get_shared_uploaded_files app_1 | with pop3_module(**kwargs) as server: app_1 | AttributeError: __enter__