Re: Regarding issue with auxprop plugin

2018-05-21 Thread Om Kale
Hi Dilyan,
These are the contents of my /usr/lib/sasl2.
okale:/usr/local/lib/sasl2$ ls -lrth
total 904K
-rw-r--r-- 1 root root4 May  9 18:11 berkeley_db.active
-rwxr-xr-x 1 root root  93K May 18 15:12 libcrammd5.so.3.0.0
lrwxrwxrwx 1 root root   19 May 18 15:12 libcrammd5.so.3 ->
libcrammd5.so.3.0.0
lrwxrwxrwx 1 root root   19 May 18 15:12 libcrammd5.so ->
libcrammd5.so.3.0.0
-rwxr-xr-x 1 root root  672 May 18 15:12 libcrammd5.la
-rwxr-xr-x 1 root root 232K May 18 15:12 libdigestmd5.so.3.0.0
lrwxrwxrwx 1 root root   21 May 18 15:12 libdigestmd5.so.3 ->
libdigestmd5.so.3.0.0
lrwxrwxrwx 1 root root   21 May 18 15:12 libdigestmd5.so ->
libdigestmd5.so.3.0.0
-rwxr-xr-x 1 root root  693 May 18 15:12 libdigestmd5.la
-rwxr-xr-x 1 root root 160K May 18 15:12 libscram.so.3.0.0
lrwxrwxrwx 1 root root   17 May 18 15:12 libscram.so.3 -> libscram.so.3.0.0
lrwxrwxrwx 1 root root   17 May 18 15:12 libscram.so -> libscram.so.3.0.0
-rwxr-xr-x 1 root root  669 May 18 15:12 libscram.la
-rwxr-xr-x 1 root root 214K May 18 15:12 libotp.so.3.0.0
lrwxrwxrwx 1 root root   15 May 18 15:12 libotp.so.3 -> libotp.so.3.0.0
lrwxrwxrwx 1 root root   15 May 18 15:12 libotp.so -> libotp.so.3.0.0
-rwxr-xr-x 1 root root  657 May 18 15:12 libotp.la
-rwxr-xr-x 1 root root  81K May 18 15:12 libplain.so.3.0.0
lrwxrwxrwx 1 root root   17 May 18 15:12 libplain.so.3 -> libplain.so.3.0.0
lrwxrwxrwx 1 root root   17 May 18 15:12 libplain.so -> libplain.so.3.0.0
-rwxr-xr-x 1 root root  668 May 18 15:12 libplain.la
-rwxr-xr-x 1 root root  79K May 18 15:12 libanonymous.so.3.0.0
lrwxrwxrwx 1 root root   21 May 18 15:12 libanonymous.so.3 ->
libanonymous.so.3.0.0
lrwxrwxrwx 1 root root   21 May 18 15:12 libanonymous.so ->
libanonymous.so.3.0.0
-rwxr-xr-x 1 root root  684 May 18 15:12 libanonymous.la
-rwxr-xr-x 1 root root   37 May 18 15:59 memcached-sasl-pwdb
-rw-r--r-- 1 root root  105 May 18 16:02 memcached.conf
okale:/usr/local/lib/sasl2$


Also I see pluginviewer looks in the same directory for the plugins:

open("/usr/lib/sasl2/libotp.so.3", O_RDONLY|O_CLOEXEC) = 4
read(4,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\331\0\0\0\0\0\0"..., 832)
= 832
fstat(4, {st_mode=S_IFREG|0755, st_size=218776, ...}) = 0
mmap(NULL, 2204424, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) =
0x7f33d9d44000
mprotect(0x7f33d9d59000, 2097152, PROT_NONE) = 0
mmap(0x7f33d9f59000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x15000) = 0x7f33d9f59000
close(4)= 0
mprotect(0x7f33d9f59000, 4096, PROT_READ) = 0
open("/usr/lib/sasl2/libdigestmd5.la", O_RDONLY) = 4
close(4)= 0
open("/usr/lib/sasl2/libplain.la", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=668, ...}) = 0
read(4, "# libplain.la - a libtool librar"..., 4096) = 668
close(4)= 0
open("/usr/lib/sasl2/libplain.so.3", O_RDONLY|O_CLOEXEC) = 4

I had changed the symbolic links as mentioned in the cyrus wiki like this:

ln -s /usr/local/lib/sasl2 /usr/lib/sasl2


In spite of this, I see the following error in my memcached server log:

mech:  ``PLAIN'' with 26 bytes of data
SASL (severity 5): could not find auxprop plugin, was searching for 'sasldb'
SASL (severity 5): could not find auxprop plugin, was searching for 'sasldb'

My memcached.conf looks as below:
pwcheck_method: auxprop
auxprop_plugin: sasldb
mech_list: plain
log_level: 5
sasldb_path: /usr/lib/sasl2

What I can't understand is how I enable the auxprop plugin with berkeley db
for cyrus to read the config correctly?



Thanks and Regards,
Om Kale


On Sat, May 19, 2018 at 5:47 AM, Dilyan Palauzov 
wrote:

> Hello,
>
> sasl installs the plugins in $prefix/lib/sasl2, which defaults to /usr/
> local/lib/sasl2, but looks for them in $plugindir, which defaults to
> /usr/lib/sasl2 . So "./configure && make install" does not work.
>
> To check if this is related to you, find the directory containing the
> plugins are installed, e.g. /usr/local/lib/sasl2 and the
> directory checked by pluginviewer, e.g. by running it behind strace.
>
> It could be something completely different, however, I don't recall the
> details now.
>
> This patch:
>
>  - ensures a usable system after "./configure && make install", in
> particular
>it abolishes the possibility to install plugins in one directory
> and load
>them from another;
>  - installs the plugins by default in $(libdir)/sasl2;
>  - looks for configuration files by default in the directory, where
> plugins are
>installed, as de jure it has always been, and in
> ${sysconfdir}/sasl2 instead
>of /etc/sasl2;
>  - updates ./configure --help accordingly;
>
> $(mkinstalldirs) $(framedir)/Versions/A/Resources
> diff --git a/configure.ac b/configure.ac
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1124,17 +1124,15 @@ AC_SUBST(SASL_STATIC_OBJS)
>  AC_SUBST(SASL_STATIC_LIBS)
>
>  AC_ARG_WITH(plugindir, [  

Cyrus Jmap support question

2018-05-21 Thread Zhivko Vasilev
Hello Everyone,

I hope you can help me.

I'm implementing a JMAP client and try to use Cyrus as reference server.Send 
and Receive via IMAP/SMTP work fine.
But when I try to connect via HTTP/2 , connection is reset by HTTP/2
reset stream command.
imapd.log file show only  "starttls: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-
SHA384 (256/256 bits new) no authentication"
My http2 call is POST https://[1]cyrus.mailtemi.com[2]:443/jmap[3]
HEADERS:
"accept", "application/json"
"content-type", "application/json"
"Authorization", "base64 encoded user name:pass"
BODY:
{"methodCalls":[["Mailbox/get",{},"#1"]],"using":["jmap-
core","jmap-mail"]}
Is there a way to turn on HTTP log to track what I do incorrectly.

I tried to track with curl  the server allways reponded with HTTP
error 301.The  command I've tried was
"curl --verbose --http2 -X POST \
 -H "Content-Type: application/json" \
 -H "Accept: application/json" \
 --user u...@cyrus.mailtemi.com:q \
 -d '[["Mailbox/get", {}, "#1"],"using":["jmap-core","jmap-
 mail"]]' \ http://[4]35.192.121.94:443[5]/jmap[6];
returned
* Connected to 35.192.121.94 (35.192.121.94) port 80 (#0)
* Server auth using Basic with user 'u...@cyrus.mailtemi.com'
> POST /jmap HTTP/1.1
> Host: 35.192.121.94
> Authorization: Basic dTFAY3lydXMubWFpbHRlbWkuY29tOnE=
> User-Agent: curl/7.58.0
> Connection: Upgrade, HTTP2-Settings
> Upgrade: h2c
> HTTP2-Settings: AAMAAABkAARAAAIA
> Content-Type: application/json
> Accept: application/json
> Content-Length: 61
>
* upload completely sent off: 61 out of 61 bytes
< HTTP/1.1 101 Switching Protocols
< Connection: Upgrade
< Upgrade: h2c
* Received 101
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after
  upgrade: len=0* Connection state changed (MAX_CONCURRENT_STREAMS updated)!
< HTTP/2 301
< date: Mon, 21 May 2018 17:36:58 GMT
< location: /jmap/
< vary: Accept-Encoding
< content-length: 0
<
* Connection #0 to host 35.192.121.94 left intact

Please give me some advice or clue how to track what is the problem.
I'm stuck at this point for two days :(

Thanks ,
Zhivko Vasilev


Links:

  1. https://my.ip.address:443/jmap
  2. mailto:u...@cyrus.mailtemi.com
  3. https://my.ip.address:443/jmap
  4. http://35.192.121.94/jmap
  5. https://my.ip.address:443/jmap
  6. http://35.192.121.94/jmap