jonaswinkler / paperless-ng

A supercharged version of paperless: scan, index and archive all your physical documents
https://paperless-ng.readthedocs.io/en/latest/
GNU General Public License v3.0
5.38k stars 352 forks source link

[BUG] Mail consuming stopped #1078

Open stefnats opened 3 years ago

stefnats commented 3 years ago

Hello,

the mail consuming stops with this error message:

[2021-05-31 07:56:23,894] [ERROR] [paperless_mail] Rule mymailbox.All: Error while processing rule: command: FETCH => socket error: EOF
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/imaplib.py", line 1019, in _command_complete
    typ, data = self._get_tagged_response(tag)
  File "/usr/local/lib/python3.7/imaplib.py", line 1139, in _get_tagged_response
    self._get_response()
  File "/usr/local/lib/python3.7/imaplib.py", line 1047, in _get_response
    resp = self._get_line()
  File "/usr/local/lib/python3.7/imaplib.py", line 1151, in _get_line
    raise self.abort('socket error: EOF')
imaplib.IMAP4.abort: socket error: EOF
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/src/paperless/src/paperless_mail/mail.py", line 172, in handle_mail_account
    total_processed_files += self.handle_mail_rule(M, rule)
  File "/usr/src/paperless/src/paperless_mail/mail.py", line 216, in handle_mail_rule
    for message in messages:
  File "/usr/local/lib/python3.7/site-packages/imap_tools/mailbox.py", line 104, in fetch
    for fetch_item in (self._fetch_in_bulk if bulk else self._fetch_by_one)(nums, message_parts, reverse):  # noqa
  File "/usr/local/lib/python3.7/site-packages/imap_tools/mailbox.py", line 67, in _fetch_by_one
    fetch_result = self.box.fetch(message_num, message_parts)
  File "/usr/local/lib/python3.7/imaplib.py", line 534, in fetch
    typ, dat = self._simple_command(name, message_set, message_parts)
  File "/usr/local/lib/python3.7/imaplib.py", line 1196, in _simple_command
    return self._command_complete(name, self._command(name, *args))
  File "/usr/local/lib/python3.7/imaplib.py", line 1021, in _command_complete
    raise self.abort('command: %s => %s' % (name, val))
imaplib.IMAP4.abort: command: FETCH => socket error: EOF

What should i do to prevent this?

jonaswinkler commented 3 years ago

This looks like a network error to me.

mirisbowring commented 3 years ago

had the same issue today. Solution was to check the IMAP Security Settings. Starttls was selected, but ssl solved the problem.