rickypc / robotframework-imaplibrary

IMAP email testing library for Robot Framework
https://pypi.python.org/pypi/robotframework-imaplibrary
Apache License 2.0
21 stars 35 forks source link

Use imaplib `uid` function to avoid races with concurrent IMAP clients #8

Closed gsikorski closed 7 years ago

gsikorski commented 7 years ago

This commit fixes issue with concurrent access to the same server by multiple IMAP clients. Instead of using IMAP message number, which is volatile, it refers to all emails with uid, which is guaranteed to be unique per IMAP session (https://tools.ietf.org/html/rfc3501#section-2.3.1.1). This protects against changes in the mailbox done by other clients accessing the same server concurrently, as well as changes made by the client itself causing renumeration of previous messages.

rickypc commented 7 years ago

Thank you, @gsikorski. Would you please fill in the CLA located here: https://goo.gl/forms/QMyqXJI2LM. Thanks.

gsikorski commented 7 years ago

I am not a lawyer. It is free contribution, feel free to accept this fix. I am not going to sign any papers, except the fact I do agree to publish my contribution under Apache License.

gsikorski commented 7 years ago

I double checked with my company and I signed this CLA. It seems fine, as long as we understand "Contribution" as the change in this particular repository.

gsikorski commented 7 years ago

@rickypc Are you going to merge this? We would like to use pip version instead of fork from github, if possible.

rickypc commented 7 years ago

I've been swamped lately, as I try to set aside my personal time to merge this. Sorry about that.

As for the CLA, I believed that it will be beneficial not just for the contributors like yourself, but also for the users of this library, now and in the future, in any jurisdictions. I realized it may cause small bureaucracy overhead, nor I want to overlooked it.

rickypc commented 7 years ago

Released in version 0.3.0. Thanks, @gsikorski for your contribution.