Skip to Content
Menu
This question has been flagged
2 Replies
10806 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

Avatar
Discard
Author

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

Author Best Answer

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

Avatar
Discard
Author

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....

Best Answer

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"?

Avatar
Discard

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

This also seem to influence users creation.