This patch gets the month number using datetime library.
I removed the function Mon2num. The list is not used now, it is removed
too.
I need change the regex in the compile to get the fields. Now is str,
not binary, so I remored the 'b'.
The IMAP command is:
C: A654 FETCH 2:4 (FLAGS BODY[HEADER.FIELDS (DATE FROM)])
not
C: A654 FETCH '2:4' (FLAGS BODY[HEADER.FIELDS (DATE FROM)])
The single quotes must be removed.
This patch modifies two files. First, we need split using '', not '""'.
Else we don't split anything.
OTOH, we need convert the bytes to string, then we can parse the folder
names.
On some architectures, using threading.TIMEOUT_MAX for the timeout
parameter can overflow causing Condition.wait() to return immediately.
Instead of relying on TIMEOUT_MAX, remove it and wait forever.
Signed-off-by: Ilias Tsitsimpis <iliastsi@debian.org>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
While trying to see why I couldn't get my emails from an Exchange server
I found this:
[imap]: 41:31.42 someserver.com handler _put_response(IOMC1 OK)
[imap]: 41:31.42 someserver.com handler unexpected response: 'IOMC1 OK'
And shortly after that the connection was closed. IOMC1 is just the
unique tag for the session.
The pattern looks for the tag, a number, a word like "OK" or something,
*then a space*, then optionally some data.
If the data aren't there it shouldn't be expecting a space.
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This allows OfflineIMAP to not stall on malfunctional IPv6 connections,
and fall-back to a functional IPv4 connection, if faster, as described
in RFC6555.
Signed-off-by: Olivier Mehani <shtrom@ssji.net>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
When creating a folder in one command on Gmail you end up with
one tag such as 'x/y/z' instead of three nested tags such as 'z'
inside of 'y' inside of 'x'. Creating each layer individually
results in the desired nested label structure.
This was tested in a personal transfer of email from a remote
IMAP server to Gmail.
OfflineIMAP/offlineimap#335OfflineIMAP/offlineimap#598
Signed-off-by: Kyle Altendorf <sda@fstab.net>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
addch() and addstr() throw an exception if text has to be printed
outside of the window. This may occur if the terminal is very small.
Such erroneous prints are no-ops now.
Signed-off-by: Mart Lubbers <mart@martlubbers.net>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/595