Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request #2

Open
ckluss opened this issue Aug 15, 2022 · 2 comments
Open

feature request #2

ckluss opened this issue Aug 15, 2022 · 2 comments

Comments

@ckluss
Copy link

ckluss commented Aug 15, 2022

Hi @AlexanderWillner

thank you for providing the MailboxCleanup source!

Some small issues that may be good for a futur version

with Ubuntu Linux I had to use
self.imap.sock.setsockopt(socket.IPPROTO_TCP, TCP_KEEPALIVE, 1)
instead of 3 as last parameter and sometime I get error messages like

File "/src/mailbox_message.py", line 346, in convert_filename
    filename = filename.replace("\r", "").replace("\n", "")
TypeError: a bytes-like object is required, not 'str'
File "/src/mailbox_imap.py", line 328, in get_msg
    result, len(body) / 1024)
TypeError: object of type 'int' has no len()

would be great if the run then not aborts but only the mail is ignored.

With --all sometime not all subfolders are recursively processed, at least some mails are ignored, but I'd have to check this more closely.

Thank you again and best wishes
Christof

@AlexanderWillner
Copy link
Owner

Thanks a lot for the feedback!

with Ubuntu Linux I had to use self.imap.sock.setsockopt(socket.IPPROTO_TCP, TCP_KEEPALIVE, 1) instead of 3 as last parameter

Short question: what's the different semantics between 1 and 3 here?

would be great if the run then not aborts but only the mail is ignored.

True

With --all sometime not all subfolders are recursively processed, at least some mails are ignored, but I'd have to check this more closely.

Mh, that's a tricky one.

@ckluss
Copy link
Author

ckluss commented Aug 16, 2022

Hi @AlexanderWillner

with Ubuntu Linux I had to use self.imap.sock.setsockopt(socket.IPPROTO_TCP, TCP_KEEPALIVE, 1) instead of 3 as last parameter

Short question: what's the different semantics between 1 and 3 here?

I'm not sure, 3 was not valid on my system, so I changed it to 1. Perhaps this will help https://www.digi.com/resources/documentation/digidocs/90001537/Default.htm#References/r_Handling_Socket_Error-Keepalive.htm

would be great if the run then not aborts but only the mail is ignored.

True

With --all sometime not all subfolders are recursively processed, at least some mails are ignored, but I'd have to check this more closely.

Mh, that's a tricky one.

There seems to be problems with German umlauts in folder names, but perhaps there is something else with deeper folders. But it is less important.

res, folder_list = self.imap.list()
folders = [re.split('"."|"/"', item.decode())[-1].strip() for item in folder_list]

Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants