mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-12-28 01:28:51 +01:00
Fixes issue #141 - infinite loop for IMAP after
certain return codes. Thanks to Walter Doekes for the patch.
This commit is contained in:
parent
c892699744
commit
f51eabeae8
@ -112,11 +112,10 @@ def process_queue(q, quiet=False):
|
|||||||
|
|
||||||
server.login(q.email_box_user, q.email_box_pass)
|
server.login(q.email_box_user, q.email_box_pass)
|
||||||
server.select(q.email_box_imap_folder)
|
server.select(q.email_box_imap_folder)
|
||||||
while True:
|
|
||||||
status, data = server.search(None, 'NOT', 'DELETED')
|
status, data = server.search(None, 'NOT', 'DELETED')
|
||||||
|
if data:
|
||||||
msgnums = data[0].split()
|
msgnums = data[0].split()
|
||||||
if not msgnums:
|
|
||||||
break
|
|
||||||
for num in msgnums:
|
for num in msgnums:
|
||||||
status, data = server.fetch(num, '(RFC822)')
|
status, data = server.fetch(num, '(RFC822)')
|
||||||
ticket = ticket_from_message(message=data[0][1], queue=q, quiet=quiet)
|
ticket = ticket_from_message(message=data[0][1], queue=q, quiet=quiet)
|
||||||
|
Loading…
Reference in New Issue
Block a user