Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

2

incoming email imap ssl fetch mail error

By
joachim grubelnik
on 11/14/14, 7:26 AM 2,662 views

hi 

i just have a new instance of Odoo v8 and tried to configure an exchange server IMAP account to receive emails. 

as usual i did the setup for email client, but hits time i get an error message i never got before. 

anyone already seen this and have an idea ? After the incoming mailserver setup the "Test & Confirm" button works fine. but on clicking fetch now pops up this message. 

thanks joe

Traceback (most recent call last): File "/opt/odoo_v8.0/intdadi/odoo/openerp/http.py", line 500, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/opt/odoo_v8.0/intdadi/odoo/openerp/http.py", line 517, in dispatch result = self._call_function(**self.params) File "/opt/odoo_v8.0/intdadi/odoo/openerp/http.py", line 283, in _call_function return checked_call(self.db, *args, **kwargs) File "/opt/odoo_v8.0/intdadi/odoo/openerp/service/model.py", line 113, in wrapper return f(dbname, *args, **kwargs) File "/opt/odoo_v8.0/intdadi/odoo/openerp/http.py", line 280, in checked_call return self.endpoint(*a, **kw) File "/opt/odoo_v8.0/intdadi/odoo/openerp/http.py", line 733, in __call__ return self.method(*args, **kw) File "/opt/odoo_v8.0/intdadi/odoo/openerp/http.py", line 376, in response_wrap response = f(*args, **kw) File "/opt/odoo_v8.0/intdadi/odoo/addons/web/controllers/main.py", line 952, in call_button action = self._call_kw(model, method, args, {}) File "/opt/odoo_v8.0/intdadi/odoo/addons/web/controllers/main.py", line 940, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) File "/opt/odoo_v8.0/intdadi/odoo/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo_v8.0/intdadi/odoo/addons/fetchmail/fetchmail.py", line 221, in fetch_mail imap_server.close() File "/usr/lib/python2.7/imaplib.py", line 394, in close typ, dat = self._simple_command('CLOSE') File "/usr/lib/python2.7/imaplib.py", line 1087, in _simple_command return self._command_complete(name, self._command(name, *args)) File "/usr/lib/python2.7/imaplib.py", line 837, in _command ', '.join(Commands[name]))) error: command CLOSE illegal in state AUTH, only allowed in states SELECTED

just checked the logs from server directly 2014-11-14 12:56:27,537 2295 INFO o8_intdadi openerp.addons.fetchmail.fetchmail: start checking for new emails on imap server Exchange 2014-11-14 12:56:29,651 2295 ERROR o8_intdadi_ openerp.addons.fetchmail.fetchmail: General failure when trying to fetch mail from imap server Exchange.mydomain. Traceback (most recent call last): File "/opt/odoo_v8.0/intdadi/odoo/addons/fetchmail/fetchmail.py", line 197, in fetch_mail result, data = imap_server.search(None, '(UNSEEN)') File "/usr/lib/python2.7/imaplib.py", line 639, in search typ, dat = self._simple_command(name, *criteria) File "/usr/lib/python2.7/imaplib.py", line 1087, in _simple_command return self._command_complete(name, self._command(name, *args)) File "/usr/lib/python2.7/imaplib.py", line 837, in _command ', '.join(Commands[name]))) error: command SEARCH illegal in state AUTH, only allowed in states SELECTED 2014-11-14 12:56:29,652 2295 ERROR o8_intdadi_ openerp.http: Exception during JSON request handling. Traceback (most recent call last): File "/opt/odoo_v8.0/intdadi/odoo/openerp/http.py", line 500, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/opt/odoo_v8.0/intdadi/odoo/openerp/http.py", line 517, in dispatch result = self._call_function(**self.params) File "/opt/odoo_v8.0/intdadi/odoo/openerp/http.py", line 283, in _call_function return checked_call(self.db, *args, **kwargs) File "/opt/odoo_v8.0/intdadi/odoo/openerp/service/model.py", line 113, in wrapper return f(dbname, *args, **kwargs) File "/opt/odoo_v8.0/intdadi/odoo/openerp/http.py", line 280, in checked_call return self.endpoint(*a, **kw) File "/opt/odoo_v8.0/intdadi/odoo/openerp/http.py", line 733, in __call__ return self.method(*args, **kw) File "/opt/odoo_v8.0/intdadi/odoo/openerp/http.py", line 376, in response_wrap response = f(*args, **kw) File "/opt/odoo_v8.0/intdadi/odoo/addons/web/controllers/main.py", line 952, in call_button action = self._call_kw(model, method, args, {}) File "/opt/odoo_v8.0/intdadi/odoo/addons/web/controllers/main.py", line 940, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) File "/opt/odoo_v8.0/intdadi/odoo/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo_v8.0/intdadi/odoo/addons/fetchmail/fetchmail.py", line 221, in fetch_mail imap_server.close() File "/usr/lib/python2.7/imaplib.py", line 394, in close typ, dat = self._simple_command('CLOSE') File "/usr/lib/python2.7/imaplib.py", line 1087, in _simple_command return self._command_complete(name, self._command(name, *args)) File "/usr/lib/python2.7/imaplib.py", line 837, in _command ', '.join(Commands[name]))) error: command CLOSE illegal in state AUTH, only allowed in states SELECTED

joachim grubelnik
on 11/14/14, 8:01 AM
1
joachim grubelnik
On 11/14/14, 10:38 AM

Ok tried to minimize errors and removed the security at the exchange server side, used port 143 instead of 993 so it seems there is a really a problem with the imaplib.py somehow  ? 

Noone else has this problem with an exchange server ? 

i keep on going testing and will test an external server like google or zimbra, curiouse if this is the same situation

Interesting... Just tried with zimbra server, also ssl tls port 993 aso ... everything work fine immediately ... so it seems some kind of missconfiguration in ms exchange or some rfc problem soemwhere....

joachim grubelnik
on 11/14/14, 10:47 AM
0
orsomannaro
On 2/16/15, 11:19 AM

Same problem with a local installation of Zimbra via SSL.

Test is ok but fetching email Odoo show the error.

Zimbra log don't show any connection from Odoo.

This happen only with last OCB version (the one with "Folders to monitor " parameters).

May be this problem related to server-tool "Email gateway - folders"?

Yes. I uninstall "Email gateway - folders" module and all seem work fine now.

orsomannaro
on 2/16/15, 11:47 AM

This also seem to influence users creation.

orsomannaro
on 2/16/15, 11:53 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 11/14/14, 7:26 AM
Seen: 2662 times
Last updated: 5/11/15, 8:06 AM