This patch includes the "offlineimap" string and the proccess id
in the output for non interactive logs and syslog logs.
Now, the output is something like this (syslog):
Oct 11 21:55:10 yangon offlineimap[635798]: Syncing foo: IMAP -> Maildir
Oct 11 21:55:10 yangon offlineimap[635798]: Syncing foo bar: IMAP -> Maildir
Oct 11 21:55:10 yangon offlineimap[635798]: Syncing INBOX: IMAP -> Maildir
Oct 11 21:55:10 yangon offlineimap[635798]: Syncing bar: IMAP -> Maildir
Oct 11 21:55:10 yangon offlineimap[635798]: Syncing Trash: IMAP -> Maildir
Closes#88
This patch enables the ID extension of IMAPv4.
The patch sends the client name and the client version to the server.
Usually, the server doesn't require it, but in some cases the server
drop de connection if the ID is not send.
#Close #71
Similarly to 7a428537, reading the host
using remotehosteval returns a bytes objects instead an utf-8 string.
This patch includes support for both string and bytes objects.
This patch handles the socks connection problems. First, move the "msg"
variable to the places where the variable is used. This variable could
be unset in the for loop, so is better move to these places.
This patch also removes the "msg" variable set in th except blocks, like
except socket.error as msg, because the variable is not used.
The patch also removes the "i" variable, not used.
Finally, the patch correct some typos.
Close: #67
Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
This patch adds support to create and delete folders with the space
character.
When the folder includes spaces, all the folder name must be quoted.
Close: #58
Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
This patch checks the exception raises by os.rename()
on Windows and provide the same behavior than Linux.
This patch is related to issue #37, issue 5.
This patch sets closes the issue 37.
closes#37
The new imaplib2 version >= 3.06 includes a function "version()",
and this patch uses the old style __version__ value and the new
function.
This patch is related to issue #37, issue 2.
Moving the quoted boundary fix to the Base class so that it can be used
by any subclass that needs to read an email. Adding another utility to
extract message-id from a raw email.
Up to a4863b2 offlineimap did not include a default CA bundle. And
folks who set cert_fingerprint (because they might connect to a
host using a self-signed cert or an onion service without the onion
address in the SANs) were able to validate their certificates.
Since a4863b2 you always have a `sslcacertfile` configured (since
it always falls back to the os one) and thus the old way didn't
work anymore.
If a use defines a `cert_fingerprint` there is not much use to
validate the cert through the CA chain, since the fingerprint
is the stronges verification you can get. Therefor we can disable
verfication when `cert_fingerprint` is set.
This enables users to fetch emails again from onion services or
hosts using self-signed certifcates, but doesn't question nor
change any other behavior.
Fixes#41
unreachable due to an optimization in PR#56. Since message-id is more
useful to better pin point the correct message, removing dbg_output.
Also fixing https://github.com/OfflineIMAP/offlineimap3/issues/62 by
correcting broken multipart boundaries or raising an error if as_bytes()
fails. Related python bug submitted: https://bugs.python.org/issue43818
although this workaround should be sufficent in the interim.
Signed-off-by: Joseph Ishac <jishac@nasa.gov>
If synclabels is enabled then offlineimap is sending '1:*' to imaplib2,
and imaplib2 while creating the FETCH command is quoting the sequence
and the command becomes:
b"JFFJ10 FETCH '1:*' (FLAGS X-GM-LABELS UID)\r\n"
Remove the single-quotes to prevent that and also consider the response
as bytes.
Closes: #52
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
When ui is set to 'Curses Blinkenlights' and debug logs are enabled,
we get an exception with 'embedded null character'.
Remove the NULL from the log, keeping the log message same as before.
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Reading the password from Curses Blinkenlights returns a bytes objects
instead an utf-8 string.
This patch will decode if bytes is provided.
Closes: #49
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Reading the password using remotepassfile returns a bytes objects
instead an utf-8 string.
This patch includes support strings and bytes objects.
Closes: #40
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
a message from a string to an email object that is part of the built-in
email library. The allows for emails to be processed as bytes and
re-encoded properly if they are not UTF-8 or ascii encoded. Currently
these changes cover the Base, IMAP, and Maildir classes but not the
specialized GMAIL class yet.
Similarly to 7a4285370f, reading the username
using remoteusereval returns a bytes objects instead an utf-8 string.
This patch includes support for both string and bytes objects.
Signed-off-by: Konstantinos Natsakis <5933427+knatsakis@users.noreply.github.com>
The current code for supporting the utf8foldernames does not work with
Python3 due to changes in the 'codecs' module and related functions.
This fix adapts the existing code to work with Python3.
Signed-off-by: Amit Ramon <amit@riseup.net>
The current code mixed string and bytes leading to:
ERROR: Exceptions occurred during the run!
ERROR: While attempting to sync account 'honk.sigxcpu.org'
sequence item 1: expected str instance, int found
Traceback:
File "/usr/share/offlineimap3/offlineimap/accounts.py", line 298, in syncrunner
self.__sync()
File "/usr/share/offlineimap3/offlineimap/accounts.py", line 374, in __sync
remoterepos.getfolders()
File "/usr/share/offlineimap3/offlineimap/repository/IMAP.py", line 648, in getfolders
imapobj = self.imapserver.acquireconnection()
File "/usr/share/offlineimap3/offlineimap/imapserver.py", line 592, in acquireconnection
self.__authn_helper(imapobj)
File "/usr/share/offlineimap3/offlineimap/imapserver.py", line 449, in __authn_helper
if func(imapobj):
File "/usr/share/offlineimap3/offlineimap/imapserver.py", line 362, in __authn_gssapi
imapobj.authenticate('GSSAPI', self.__gsshandler)
File "/usr/lib/python3/dist-packages/imaplib2.py", line 691, in authenticate
typ, dat = self._simple_command('AUTHENTICATE', mechanism.upper())
File "/usr/lib/python3/dist-packages/imaplib2.py", line 1684, in _simple_command
return self._command_complete(self._command(name, *args), kw)
File "/usr/lib/python3/dist-packages/imaplib2.py", line 1404, in _command
literal = literator(data, rqb)
File "/usr/lib/python3/dist-packages/imaplib2.py", line 2247, in process
ret = self.mech(self.decode(data))
File "/usr/share/offlineimap3/offlineimap/imapserver.py", line 318, in __gsshandler
reply = ''.join(reply)
Closes: #46
Signed-off-by: Guido Günther <agx@sigxcpu.org>