imbox receives 163 emails and reports an error

Started reporting this:

 command SEARCH illegal in state AUTH, only allowed in states SELECTED

 

I can't find the reason for life and death, and the Traceback prompts:

  File "/usr/lib/python3.5/imaplib.py", line 863, in uid

    ', '.join(Commands[command])))

 

So open imaplib.py to find SELECTED and find it on line 731:

 self.state = 'AUTH'     # Might have been 'SELECTED'

 

Found on line 729 above:

typ, dat = self._simple_command(name, mailbox)

 

So print(dat), this is what we see:

The login is not safe! Please update your mail client: http://mail.163.com/dashi

In order to push their own clients

 

Well, it's 163 doing the blame, imbox is wrong, google it to find:

http://stackoverflow.com/questions/27797705/python-login-163-mail-server

 

The solution is to configure it through the following address:

http://config.mail.163.com/settings/imap/[email protected]

 

Of course, I also see this method, add C before the command:

http://billynyh.github.io/blog/2015/05/16/javamail-163/

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326689116&siteId=291194637