modoboa-webmail icon indicating copy to clipboard operation
modoboa-webmail copied to clipboard

Remote IMAP server connection [help wanted]

Open 8Cris1 opened this issue 7 years ago • 3 comments

Hi, I would use modoboa-webmail to connect to a remote IMAP server. I set the parameters on the online panel setting with my remote IMAP server (no localhost) where is installed "Courier" MDA. It seems that modoboa does not connect to him nor the user and password are recognized. What's wrong?

Thanks

8Cris1 avatar May 14 '18 12:05 8Cris1

Could you provide more information? (logs lines for example) Where did you declare your users: in modoboa or in another server? BTW, Modoboa has never been tested with courrier...

tonioo avatar May 16 '18 11:05 tonioo

My user is declared on both Modoboa and remote server. When I login into modoboa-webmail, it correctly reaches the remote IMAP server (I see the imap logs). If I click on Inbox or Sent or on other folders I have Internal Error with this traceback:

KeyError at /webmail/
'BODY[HEADER.FIELDS (DATE FROM TO CC SUBJECT)]'

Request Method: GET

Django Version: 1.11.12
Python Executable: /usr/bin/python
Python Version: 2.7.5
Python Path: ['/var/www/python/modoboa_test', '/usr/lib64/python27.zip', '/usr/lib64/python2.7', '/usr/lib64/python2.7/plat-linux2', '/usr/lib64/python2.7/lib-tk', '/usr/lib64/python2.7/lib-old', '/usr/lib64/python2.7/lib-dynload', '/usr/lib64/python2.7/site-packages', '/usr/lib64/python2.7/site-packages/gtk-2.0', '/usr/lib/python2.7/site-packages']
Server time: Mer, 16 Mag 2018 16:42:47 +0200
Installed Applications:
(u'django.contrib.auth',
 u'django.contrib.contenttypes',
 u'django.contrib.sessions',
 u'django.contrib.messages',
 u'django.contrib.sites',
 u'django.contrib.staticfiles',
 u'reversion',
 u'ckeditor',
 u'ckeditor_uploader',
 u'rest_framework',
 u'rest_framework.authtoken',
 u'modoboa',
 u'modoboa.core',
 u'modoboa.lib',
 u'modoboa.admin',
 u'modoboa.transport',
 u'modoboa.relaydomains',
 u'modoboa.limits',
 u'modoboa.parameters',
 u'modoboa_stats',
 u'modoboa_amavis',
 u'modoboa_webmail')
Installed Middleware:
(u'x_forwarded_for.middleware.XForwardedForMiddleware',
 u'django.contrib.sessions.middleware.SessionMiddleware',
 u'django.middleware.common.CommonMiddleware',
 u'django.middleware.csrf.CsrfViewMiddleware',
 u'django.contrib.auth.middleware.AuthenticationMiddleware',
 u'django.contrib.messages.middleware.MessageMiddleware',
 u'django.middleware.locale.LocaleMiddleware',
 u'django.middleware.clickjacking.XFrameOptionsMiddleware',
 u'modoboa.core.middleware.LocalConfigMiddleware',
 u'modoboa.lib.middleware.AjaxLoginRedirect',
 u'modoboa.lib.middleware.CommonExceptionCatcher',
 u'modoboa.lib.middleware.RequestCatcherMiddleware')


Traceback:  

File "/usr/lib64/python2.7/site-packages/django/core/handlers/exception.py" in inner
  41.             response = get_response(request)

File "/usr/lib64/python2.7/site-packages/django/core/handlers/base.py" in _get_response
  187.                 response = self.process_exception_by_middleware(e, request)

File "/usr/lib64/python2.7/site-packages/django/core/handlers/base.py" in _get_response
  185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/lib64/python2.7/site-packages/django/utils/decorators.py" in inner
  185.                     return func(*args, **kwargs)

File "/usr/lib64/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  23.                 return view_func(request, *args, **kwargs)

File "/usr/lib/python2.7/site-packages/modoboa/admin/lib.py" in wrapped_f
  41.                 return f(request, *args, **kwargs)

File "/usr/lib/python2.7/site-packages/modoboa_webmail/views.py" in index
  625.         response = globals()[action](request)

File "/usr/lib/python2.7/site-packages/modoboa_webmail/views.py" in listmailbox
  404.         email_list = mbc.fetch(page.id_start, page.id_stop, mbox)

File "/usr/lib/python2.7/site-packages/modoboa_webmail/lib/imaputils.py" in fetch
  737.                 msg_data["BODY[HEADER.FIELDS ({})]".format(headers)]

Exception Type: KeyError at /webmail/
Exception Value: 'BODY[HEADER.FIELDS (DATE FROM TO CC SUBJECT)]'
Request information:
USER: [email protected]

GET:
action = u'listmailbox'
reset_page = u'true'
_ = u'1526481809593'

POST: No POST data

FILES: No FILES data

8Cris1 avatar May 17 '18 07:05 8Cris1

As I said, modoboa webmail has never been tested with courrier...

tonioo avatar May 17 '18 08:05 tonioo