Nextcloud mail app config error


(HF) #15

None of the NS server user accounts work. All encounter the same error.

(m) #16

Same issue as last commenter. Can we resurrect this since it hasn’t been solved?

(Bulat) #17

I have the same problem, but I did not understand how to solve it.
It is clear that the problem is not in the mail application, but on the server.

There are two servers that are the same set up,
na odnom server - rabotayet
na drugom - net

I checked all configs of dovecot, postfix, rspamd server

NethServer release 7.6.1810 (final)
[Nextcloud] 15.0.5

(Giacomo Sanchietti) #18

I’ve just tried on our installation, it works out of the box.

Just set the Host to “localhost” and use “user@domain” ads login.

(Bulat) #19

I tried everything localhost,, Ip
“User@domain” “user”
Does not help
Authentication passes normally according to the logs
Mail content is not displayed.
the same error comes out

as I said, I launched two servers
and both set up the same
works on one

server 1 - nextcloud - mail application
connects to server 1 mail
cannot connect to server 2 mail

server 2 - nextcloud - mail application
connects to server 1 mail
cannot connect to server 2 mail

those. to server 2 can not connect from another server too

(Charles) #20

I have the same version of Nethserver and Nextcloud as @Bulat. I’ve enabled the Nextcloud Mail app and followed the suggestings from @giacomo and @pagaille in setting up my mail account in Settings. I’m getting similar errors related to permission in my Nextcloud Logging. Perhaps @giacomo you had horde installed on your Nethserver previously and that’s why you don’t see the errors we see?

[mail] Error: Horde_Imap_Client_Exception_ServerResponse: You do not have adequate permissions to carry out this operation. at <<closure>>

 0. /usr/share/nextcloud/apps/mail/vendor/ line 4569
    _responseCode(Horde_Imap_Clien ... }}, Horde_Imap_Clien ... }})
 1. /usr/share/nextcloud/apps/mail/vendor/ line 4317
    _getLine(Horde_Imap_Clien ... }})
 2. /usr/share/nextcloud/apps/mail/vendor/ line 4245
    _sendCmdChunk(Horde_Imap_Clien ... }}, [Horde_Imap_Clie ... }])
 3. /usr/share/nextcloud/apps/mail/vendor/ line 1754
    _sendCmd(Horde_Imap_Clien ... }})
 4. /usr/share/nextcloud/apps/mail/vendor/ line 1733
    _status([Horde_Imap_Client_Mailbox {}], 8717)
 5. /usr/share/nextcloud/apps/mail/vendor/ line 4038
    status(["Public"], 8717)
 6. /usr/share/nextcloud/apps/mail/vendor/ line 3590
 7. /usr/share/nextcloud/apps/mail/lib/IMAP/FolderMapper.php line 69
 8. /usr/share/nextcloud/apps/mail/lib/Service/MailManager.php line 87
    getFolders(OCA\Mail\Account {}, Horde_Imap_Clien ... e})
 9. /usr/share/nextcloud/apps/mail/lib/Controller/FoldersController.php line 74
    getFolders(OCA\Mail\Account {})
10. /usr/share/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 166
11. /usr/share/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
    executeController(OCA\Mail\Controller\FoldersController {}, "index")
12. /usr/share/nextcloud/lib/private/AppFramework/App.php line 118
    dispatch(OCA\Mail\Controller\FoldersController {}, "index")
13. /usr/share/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    main("OCA\\Mail\\Cont ... r", "index", OC\AppFramework\ ... {}, {accountId: "4", ... "})
14. <<closure>>
    __invoke({accountId: "4", ... "})
15. /usr/share/nextcloud/lib/private/Route/Router.php line 297
    call_user_func(OC\AppFramework\ ... {}, {accountId: "4", ... "})
16. /usr/share/nextcloud/lib/base.php line 987
17. /usr/share/nextcloud/index.php line 42

GET /nextcloud/index.php/apps/mail/api/accounts/4/folders
from by 27F9C913-0BE4-497E-BE67-992F307B8378 at 2019-04-18T02:16:51+00:00

Thank you.

(Giacomo Sanchietti) #21

No I don’t.

You should asks the Nextcloud forum since the problem is application specific.

(Charles) #22

Thanks @giacomo for the reply. I’ll open a post at Nextcloud or with the Mail App team.

Thank you.

(Matthieu Gaillet) #23

For the record, I tried to configure it again here and I got the same error message. It worked for a minute then stopped. Strange issue.

(Matthieu Gaillet) #24

SOLVED : Just disable the shared mailboxes !

The problem is that nextcloud’s client lists all the folders of the server when connecting. That’s all right but for the Public folder the server answers permission denied. (maybe that’s the root cause @giacomo ?)

Here’s the wireshark decode :

(Matthieu Gaillet) #25

Case opened :

(Giacomo Sanchietti) #26

It seems strange to me, I tried it with shared mailboxes and it worked …

(Matthieu Gaillet) #27


I tested both on my production machine and on a freshly installed VM.

Do you also get the NOPERM answer when querying the server using the STATUS command ?

# telnet localhost 143
Connected to localhost.
Escape character is '^]'.
. LOGIN matthieu@mydomain.tld password
. NO [NOPERM] Permission denied (0.001 + 0.000 secs).

The developper of the Mail app answered that the version shipped with NC 15 is outdated (0.11.1). I should try with 0.14 but must update to NC 16 first, which is not available yet on nethserver.

(Matthieu Gaillet) #28

Same with NC16 / Mail 0.14

(Giacomo Sanchietti) #29

No, I get this:

. OK Status completed (0.002 + 0.000 + 0.001 secs).

Still from NC 16 I can’t read the content of a message inside a public folder.
But since all other clients are working, this should be a bug on the Mail app itself.

(Matthieu Gaillet) #30

:thinking: how come we don’t have the same behaviour ? After all there isn’t much parameters when creating a shared mailbox ? All my test and production machines behave the same.

Anyway the mail app should probably handle this correctly.

(Giacomo Sanchietti) #31

That’s a question for @davidep. But we did some experiments on our server and maybe it’s not 100% like a clean machine.

(Davide Principi) #32

Try to run

/etc/e-smith/events//nethserver-mail-server-update/S98nethserver-mail-server-init-acl --force

See if the STATUS command now succeedes

(Matthieu Gaillet) #33

Thanks @davidep

–> . NO [NOPERM] Permission denied (0.001 + 0.000 secs).

(Bulat) #34

Thank you very much @giacomo
This solved my problem
In the “shared mailboxes” I had a folder “Junk” which was created when installing the package nethserver-mail-quarantine
or can it manually

I can not remove “Junk” through the web panel
I deleted “Junk” via ssh console
and it all worked

/ etc / e-smith / events // nethserver-mail-server-update / S98nethserver-mail-server-init-acl --force

This request returns the same answer on both servers

[NOTICE] Initialize ACLs of Public (vmail) IMAP namespace

p.s. when adding a shared mailbox
problem comes back