|
@ -36,8 +36,7 @@ class Fetchmail(models.Model): |
|
|
"Starting to check mailbox size for server %s" |
|
|
"Starting to check mailbox size for server %s" |
|
|
% server.name) |
|
|
% server.name) |
|
|
imap_server = server.connect() |
|
|
imap_server = server.connect() |
|
|
# The list of all folders |
|
|
|
|
|
result, list = imap_server.list() |
|
|
|
|
|
|
|
|
result, folders = imap_server.list() |
|
|
if result != "OK": |
|
|
if result != "OK": |
|
|
raise Exception(_("Server responded %s") % result) |
|
|
raise Exception(_("Server responded %s") % result) |
|
|
result_msg += _( |
|
|
result_msg += _( |
|
@ -53,7 +52,7 @@ class Fetchmail(models.Model): |
|
|
) |
|
|
) |
|
|
number_of_messages_all = 0 |
|
|
number_of_messages_all = 0 |
|
|
size_all = 0 |
|
|
size_all = 0 |
|
|
for item in list: |
|
|
|
|
|
|
|
|
for item in folders: |
|
|
x = shlex.split(item.decode()) |
|
|
x = shlex.split(item.decode()) |
|
|
mailbox = x[-1] |
|
|
mailbox = x[-1] |
|
|
# Select the desired folder |
|
|
# Select the desired folder |
|
|