Code Monkey home page Code Monkey logo

Comments (3)

thekix avatar thekix commented on June 29, 2024

Hello @xianwenchen

your Python version is 2.7. Offlineimap3 needs Python 3:

system/distribution (with version): Void
offlineimap version (offlineimap -V): offlineimap v7.3.3, imaplib2 v2.101 (bundled), Python v2.7.18, OpenSSL 1.1.1k 25 Mar 2021
**Python version: 2.7**
server name or domain: imap.163.com
CLI options: none

Cheers,
kix

from offlineimap3.

xianwenchen avatar xianwenchen commented on June 29, 2024

General informations

  • system/distribution (with version): Void
  • offlineimap version (offlineimap -V): offlineimap v7.3.0, imaplib2 v3.06, Python v3.9.4, OpenSSL 1.1.1k 25 Mar 2021 (Actually, it's the git master version)
  • Python version: 3.9
  • server name or domain: imap.163.com
  • CLI options: none

Configuration file offlineimaprc

[Account [email protected]]
remoterepository = [email protected]_remote
localrepository = [email protected]_local

[Repository [email protected]_local]
type = Maildir
localfolders = ~/foo/bar

[Repository [email protected]_remote]
type = IMAP
remotehost = imap.163.com
remoteuser = foo
remotepass = bar
ssl = yes
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
maxconnections = 1
readonly = True
sync_deletes = no

Logs, error

OfflineIMAP 7.3.0
  Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v3.06, Python v3.9.4, OpenSSL 1.1.1k  25 Mar 2021
Account sync [email protected]:
 *** Processing account [email protected]
 Establishing connection to imap.163.com:993 ([email protected]_remote)
Folder &dcVr0mWHTvZZOQ- [acc: [email protected]]:
 Syncing &dcVr0mWHTvZZOQ-: IMAP -> Maildir
 ERROR: Aborting sync, folder '&dcVr0mWHTvZZOQ-' [acc: '[email protected]']
  Error SELECTing mailbox '&dcVr0mWHTvZZOQ-', server reply:
('NO', [b'SELECT Unsafe Login. Please contact [email protected] for help'])
Folder &g0l6P3ux- [acc: [email protected]]:
 Syncing &g0l6P3ux-: IMAP -> Maildir
 ERROR: Aborting sync, folder '&g0l6P3ux-' [acc: '[email protected]']
  Error SELECTing mailbox '&g0l6P3ux-', server reply:
('NO', [b'SELECT Unsafe Login. Please contact [email protected] for help'])
Folder &i6KWBZCuTvY- [acc: [email protected]]:
 Syncing &i6KWBZCuTvY-: IMAP -> Maildir
 ERROR: Aborting sync, folder '&i6KWBZCuTvY-' [acc: '[email protected]']
  Error SELECTing mailbox '&i6KWBZCuTvY-', server reply:
('NO', [b'SELECT Unsafe Login. Please contact [email protected] for help'])
Folder &V4NXPpCuTvY- [acc: [email protected]]:
 Syncing &V4NXPpCuTvY-: IMAP -> Maildir
 ERROR: Aborting sync, folder '&V4NXPpCuTvY-' [acc: '[email protected]']
  Error SELECTing mailbox '&V4NXPpCuTvY-', server reply:
('NO', [b'SELECT Unsafe Login. Please contact [email protected] for help'])
Folder &XfJSIJZk- [acc: [email protected]]:
 Syncing &XfJSIJZk-: IMAP -> Maildir
 ERROR: Aborting sync, folder '&XfJSIJZk-' [acc: '[email protected]']
  Error SELECTing mailbox '&XfJSIJZk-', server reply:
('NO', [b'SELECT Unsafe Login. Please contact [email protected] for help'])
Folder &XfJT0ZAB- [acc: [email protected]]:
 Syncing &XfJT0ZAB-: IMAP -> Maildir
 ERROR: Aborting sync, folder '&XfJT0ZAB-' [acc: '[email protected]']
  Error SELECTing mailbox '&XfJT0ZAB-', server reply:
('NO', [b'SELECT Unsafe Login. Please contact [email protected] for help'])
Folder &Xn9USpCuTvY- [acc: [email protected]]:
 Syncing &Xn9USpCuTvY-: IMAP -> Maildir
 ERROR: Aborting sync, folder '&Xn9USpCuTvY-' [acc: '[email protected]']
  Error SELECTing mailbox '&Xn9USpCuTvY-', server reply:
('NO', [b'SELECT Unsafe Login. Please contact [email protected] for help'])
Folder Archives [acc: [email protected]]:
 Syncing Archives: IMAP -> Maildir
 ERROR: Aborting sync, folder 'Archives' [acc: '[email protected]']
  Error SELECTing mailbox 'Archives', server reply:
('NO', [b'SELECT Unsafe Login. Please contact [email protected] for help'])
Folder INBOX [acc: [email protected]]:
 Syncing INBOX: IMAP -> Maildir
 ERROR: Aborting sync, folder 'INBOX' [acc: '[email protected]']
  Error SELECTing mailbox 'INBOX', server reply:
('NO', [b'SELECT Unsafe Login. Please contact [email protected] for help'])
Folder Notes [acc: [email protected]]:
 Syncing Notes: IMAP -> Maildir
 ERROR: Aborting sync, folder 'Notes' [acc: '[email protected]']
  Error SELECTing mailbox 'Notes', server reply:
('NO', [b'SELECT Unsafe Login. Please contact [email protected] for help'])
Account sync [email protected]:
 *** Finished account '[email protected]' in 0:05

Steps to reproduce the error

  • Just run offlineimap

Solution to the error

The IMAP server at imap.163.com implemented the IMAP ID extension. To successfully authenticate, the IMAP client must send client ID.

Here is a code snippet that I obtained from https://blog.yrpang.com/posts/45207/:

from imapclient import IMAPClient

server = IMAPClient("imap.163.com", ssl=True, port=993)
server.login("<user>", "<passwd>")

server.id_({"name": "IMAPClient", "version": "2.1.0"})

messages = server.select_folder('INBOX')

I guess this may mean that we need a configuration option that is a switch. When the switch is on, offlineimap sends IMAP client ID.

I'm posting it here because I wonder if the issue is applicable to offlineimap3 as well. If it does, it will be great if we could fix it.

from offlineimap3.

xianwenchen avatar xianwenchen commented on June 29, 2024

As expected, the problem exists in offlineimap3 now. I have confirmed it using the master from the git repository. Could you reopen the issue?

from offlineimap3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.