fix race when receiving mail during rule process
authorOlivier Matz <zer0@droids-corp.org>
Sun, 27 Nov 2016 14:37:18 +0000 (15:37 +0100)
committerOlivier Matz <olivier.matz@6wind.com>
Mon, 28 Nov 2016 09:51:16 +0000 (10:51 +0100)
commitbe455c18596343c4c430babff8360b4b0b708586
tree4aa3d1c2b327437b7f545a5b43a59b81f9ea527d
parent3bf7e2c76265fff7d1206990413430f69c13bb62
fix race when receiving mail during rule process

Get the state (uidnext) for each inbox used in the configuration.
It gives the uid of the next message the will be added in the mbox.
We will only care about messages with a uid lower than this uidnext,
to avoid race conditions with a message arriving while we are in the

Signed-off-by: Olivier Matz <zer0@droids-corp.org>
imapami/__init__.py
imapami/rules.py