mail icon indicating copy to clipboard operation
mail copied to clipboard

Unable to fetch mailfence messages that include images or attachments

Open snyssen opened this issue 3 years ago • 0 comments

Steps to reproduce

  1. Open an e-mail sent to a mailfence address and that includes an attachment or some image.

Expected behavior

The body of the message should load.

Actual behavior

Nothing happen, only the title and correspondents are shown but not the body nor the attachments.

Mail app version

1.13.8

Mailserver or service

mailfence

Operating system

Fedora

PHP engine version

Other

Web server

Other

Database

PostgreSQL

Additional info

NextCloud instance is run with the official Docker image and proxied through proxied through Traefik.


When I check the logs it seems that at some point the mailfence server denied the authentication:

Error log
[mail] Error: OCA\Mail\Exception\ServiceException: Could not fetch stats of mailbox 90. IMAP error: Mail server denied authentication. at <<closure>>

0. /var/www/html/custom_apps/mail/lib/Service/Sync/SyncService.php line 130
 OCA\Mail\IMAP\MailboxSync->syncStats(OCA\Mail\Account {}, OCA\Mail\Db\Mailbox {id: 90})
1. /var/www/html/custom_apps/mail/lib/Controller/MailboxesController.php line 161
 OCA\Mail\Service\Sync\SyncService->syncMailbox(OCA\Mail\Account {}, OCA\Mail\Db\Mailbox {id: 90}, 42, [27639,27633], true, null)
2. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 225
 OCA\Mail\Controller\MailboxesController->sync(90, [27639,27633], false, null)
3. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 133
 OC\AppFramework\Http\Dispatcher->executeController(OCA\Mail\Control ... {}, "sync")
4. /var/www/html/lib/private/AppFramework/App.php line 172
 OC\AppFramework\Http\Dispatcher->dispatch(OCA\Mail\Control ... {}, "sync")
5. /var/www/html/lib/private/Route/Router.php line 298
 OC\AppFramework\App::main("OCA\\Mail\\Cont ... r", "sync", OC\AppFramework\ ... {}, ["90","mail.mailboxes.sync"])
6. /var/www/html/lib/base.php line 1030
 OC\Route\Router->match("/apps/mail/api/mailboxes/90/sync")
7. /var/www/html/index.php line 36
 OC::handleRequest()

POST /apps/mail/api/mailboxes/90/sync
from 172.18.0.3 by snyssen at 2022-09-13T10:05:57+00:00

Then when trying to load the message it fails without much explanation:

Error log
[mail] Error: OCA\Mail\Exception\ServiceException: Could not load message at <<closure>>

0. /var/www/html/custom_apps/mail/lib/Controller/MessagesController.php line 248
 OCA\Mail\Service\MailManager->getImapMessage(OCA\Mail\Account {}, OCA\Mail\Db\Mailbox {id: 83}, 646, true)
1. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 225
 OCA\Mail\Controller\MessagesController->getBody(27622)
2. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 133
 OC\AppFramework\Http\Dispatcher->executeController(OCA\Mail\Controller\MessagesController {}, "getBody")
3. /var/www/html/lib/private/AppFramework/App.php line 172
 OC\AppFramework\Http\Dispatcher->dispatch(OCA\Mail\Controller\MessagesController {}, "getBody")
4. /var/www/html/lib/private/Route/Router.php line 298
 OC\AppFramework\App::main("OCA\\Mail\\Cont ... r", "getBody", OC\AppFramework\ ... {}, ["27622","mail.messages.getBody"])
5. /var/www/html/lib/base.php line 1030
 OC\Route\Router->match("/apps/mail/api/messages/27622/body")
6. /var/www/html/index.php line 36
 OC::handleRequest()

GET /apps/mail/api/messages/27622/body
from 172.18.0.3 by snyssen at 2022-09-13T10:49:36+00:00

Two thing to note:

  • I used the login info provided by mailfence and they work flawlessly on my mobile device with K-9 Mail, which is able to read all mails
  • I can still load the body of mails that do not include images or attachments, so it may not be related to the Mail server denied authentication error

snyssen avatar Sep 13 '22 11:09 snyssen