Nextcloud mail app config error

Hi,

NC15 (but previous versions too)

I’m trying to configure the email app for any user (this case jdoe) but somehow I get ‘an error occured’ message. The log shows:

Horde_Imap_Client_Exception_ServerResponse: You do not have adequate permissions to carry out this operation.

And this how I try to configure the account:

Also tried with the FQDN instead of localhost.

There must be something obvious I’m overlooking.

Any hints appreciated!

TIA

Just tested here. It works using your settings except SMTP which is on port 587 and login = username@domain.name

1 Like

By the way that IMAP client looks not bad at all. The day it includes an out of office feature I would probably ditch Sogo.

Thanks, I made the adjustments, but the error stays. I suspect (according to the log) that there is something wrong with my AD/LDAP. I switched between them in the past.

Are you able to connect using another client ?

You may test using telnet, the protocol is easy to mimic by hand :

> telnet localhost 587

Something similar to the following should now be displayed:

  Trying 69.63.149.30...
  Connected to mail.port25.com (69.63.149.30).
  Escape character is '^]'.
  220 mail.port25.com (PowerMTA(TM) v4.0) ESMTP service ready

The first command we need to issue to the mail server is the EHLO or HELO. This is a basic greeting that starts the communication between the telnet client and the SMTP server. Also passed is the DNS PTR for the IP address from which we are connecting as determined previously.

EHLO server.example.com

Something similar to the following should be returned:

250-mail.port25.com says hello
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-CHUNKING
250-8BITMIME
250-XACK
250-XMRG
250-SIZE 54525952
250-VERP
250 DSN

This shows the SMTP commands that the SMTP server accepts. Not all SMTP servers support the same sets of commands. For example, yahoo only shows the following:

250-8BITMIME
250-SIZE 41943040
250 PIPELINING

And aol shows only one with:

250 DSN

The next command we need to issue is the MAIL FROM command. This determines the address to which bounces are sent. This is not the same as the from header, which is the email address shown in an email client.

MAIL FROM: <support@port25.com>
250 2.1.0 MAIL ok

Now that the MAIL FROM command has been sent we can send the RCPT TO command. This command tells the SMTP mail server to who the message should be sent. This can be the same or different than the to header, which is the email address shown in the email client.

RCPT TO: <support@port25.com>
250 2.1.5 <support@port25.com> ok

The last command to run before starting the body of the message is the DATA command. This command lets the SMTP mail server know that everything else about to be sent is the body of the message (which also contains the headers).

DATA
354 send message

It is important to note that if a mail server supports PIPELINING, as mail.port25.com does, the SMTP mail server may wait until the DATA command is issued before responding to any other commands after the EHLO/HELO. In this case, enter the MAIL FROM, RCPT TO, and DATA commands before waiting for a response.

Now that the DATA command has been sent we can start sending the message contents. This starts with the various headers. At minimum a message should contain a to, from, subject, and date header. The headers entered here will be shown to the user in their email client.

From: "John Smith" <jsmith@port25.com>
To: "Jane Doe" <jdoe@port25.com>
Subject: test message sent from manual telnet session
Date: Wed, 11 May 2011 16:19:57 -0400

With the headers set, we now add one blank line with a carriage return/line feed (just press enter twice) and then we start the actual body of the message.

Hello World,
This is a test message sent from a manual telnet session.

 

Yours truly,
SMTP administrator

With the message complete, we need to tell the SMTP server that we are done with the message and want the SMTP mail server to accept it. This is done with a period on a line by itself. If during the writing of a message a period on a line by itself is needed, you must put 2 periods, the first escaping the second.

.

3 Likes

Hi get this:

[root@srv01 ~]# telnet localhost 587
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
220 srv01.domain.com ESMTP Postfix

and it sits at the prompt

My post was badly formatted : now you have to issue an EHLO command :

Yes, I use Thunderbird and SOGo with no issues.

This is the exact same issue:

This is the code that triggers it:


in /usr/share/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket.php

Have a look at this regarding the NOPERM IMAP error : https://msg.wikidoc.info/index.php/IMAP_error_statuses

Have a look at the maillog to see dovecot errors ?

Nope no activity in maillog when I do tail -f maillog and select the mail app and the ‘an unknown error’ ocurred’.

You can try enabling logging in /usr/share/nextcloud/config/config.php:

and see if /var/lib/nethserver/nextcloud/horde_imap.log gives more info.

Thanks @dnutan.

Strange enough I do not see/get /var/lib/nethserver/nextcloud/horde_imap.log

Maybe the mail app needs to go further in the process to get the log generated.
You can grep or use the log viewer to search for any trace related to the mail account. Also nextcloud.log.

As @pagaille said, the error relates to:

NOPERM
The access control system (e.g., Access Control List (ACL), see
[RFC4314]) does not permit this user to carry out an operation,
such as selecting or creating a mailbox.

    C: f select "/archive/projects/experiment-iv"
    S: f NO [NOPERM] Access denied

Does this happen with another email account?

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

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

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

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.

I tried everything localhost, 127.0.0.1, 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

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/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket.php line 4569
    _responseCode(Horde_Imap_Clien ... }}, Horde_Imap_Clien ... }})
 1. /usr/share/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket.php line 4317
    _getLine(Horde_Imap_Clien ... }})
 2. /usr/share/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket.php line 4245
    _sendCmdChunk(Horde_Imap_Clien ... }}, [Horde_Imap_Clie ... }])
 3. /usr/share/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Socket.php line 1754
    _sendCmd(Horde_Imap_Clien ... }})
 4. /usr/share/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base.php line 1733
    _status([Horde_Imap_Client_Mailbox {}], 8717)
 5. /usr/share/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base.php line 4038
    status(["Public"], 8717)
 6. /usr/share/nextcloud/apps/mail/vendor/pear-pear.horde.org/Horde_Imap_Client/Horde/Imap/Client/Base.php line 3590
    _syncStatus("Public")
 7. /usr/share/nextcloud/apps/mail/lib/IMAP/FolderMapper.php line 69
    getSyncToken("Public")
 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
    index(4)
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
    match("/apps/mail/api/accounts/4/folders")
17. /usr/share/nextcloud/index.php line 42
    handleRequest()

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

Thank you.