Re: Can JMAP be proxied in a murder setup?

Ken Murchison <[email protected]>
Newsgroups gmane.mail.imap.cyrus
Message-ID <[email protected]>
I believe that JMAP /should/ honor autocreate and the fact that it 
doesn't seems to be an oversight.


On 7/22/21 3:55 PM, David Luong wrote:
> Hi Ken.
>
> This is excellent news!
>
> Another JMAP related issue I'd like your comment on.  I have enabled 
> *autocreate_inbox_folders* in Cyrus IMAP but when the user is logged 
> in via JMAP interface, the user's mailbox is not created. Instead, 500 
> Internal Server Error is returned. See log below.  If I use IMAP 
> protocol to login, the mailbox is auto created. Should JMAP behave the 
> same way?
>
> JMAP:
> Jul 22 19:03:43 rms01i.example.com cyrus/http[858045]: http_auth: 
> found matching scheme: Basic
> Jul 22 19:03:43 rms01i.example.com cyrus/http[858045]: login: 
> [172.25.57.162] 15554441001 Basic User logged in 
> SESSIONID=<cyrus-1626980623-858045-1-6232473965603291866>
> Jul 22 19:03:43 rms01i.example.com cyrus/http[858045]: 
> sqldb_exec(/var/lib/imap/user/q/15554441001.dav): PRAGMA foreign_keys 
> = ON;
> Jul 22 19:03:43 rms01i.example.com cyrus/http[858045]: 
> sqldb_exec(/var/lib/imap/user/q/15554441001.dav): PRAGMA secure_delete 
> = OFF;
> Jul 22 19:03:43 rms01i.example.com cyrus/http[858045]: 
> sqldb_exec(/var/lib/imap/user/q/15554441001.dav): PRAGMA temp_store = 2;
> Jul 22 19:03:43 rms01i.example.com cyrus/http[858045]: 
> sqldb_exec(/var/lib/imap/user/q/15554441001.dav): PRAGMA user_version;
> Jul 22 19:03:43 rms01i.example.com cyrus/http[858045]: could not 
> autoprovision calendars for userid 15554441001: Invalid user
> Jul 22 19:03:43 rms01i.example.com cyrus/http[858045]: auth_success 
> returned error: 500 Internal Server Error
> Jul 22 19:03:43 rms01i.example.com cyrus/http[858045]: auth failed - 
> reinit
> Jul 22 19:03:43 rms01i.example.com cyrus/http[858045]: write_body(code 
> = -1964266955, flags.te = 0, len = 489)
> Jul 22 19:03:43 rms01i.example.com cyrus/http[858045]: 
> simple_hdr(Date: Thu, 22 Jul 2021 19:03:43 GMT)
> Jul 22 19:03:43 rms01i.example.com cyrus/http[858045]: 
> simple_hdr(Connection: Upgrade)
> Jul 22 19:03:43 rms01i.example.com cyrus/http[858045]: 
> simple_hdr(Upgrade: h2c)
> Jul 22 19:03:43 rms01i.example.com cyrus/http[858045]: 
> simple_hdr(Vary: Accept-Encoding)
> Jul 22 19:03:43 rms01i.example.com cyrus/http[858045]: 
> simple_hdr(Content-Type: text/html; charset=utf-8)
> Jul 22 19:03:43 rms01i.example.com cyrus/http[858045]: 
> simple_hdr(Content-Length: 489)
> Jul 22 19:03:43 rms01i.example.com cyrus/http[858045]: [172.25.57.162] 
> as "15554441001" with "curl/7.54.0" via 
> SESSIONID=<cyrus-1626980623-858045-1-6232473965603291866>; "POST 
> /jmap/ HTTP/1.1" => "HTTP/1.1 500 Internal Server Error" (error=The 
> server encountered an internal error.) [timing: cmd=0.017799 
> net=0.000000 total=0.017799]
>
> IMAP:
> Jul 22 19:04:50 rms01i.example.com cyrus/imap[858059]: accepted connection
> Jul 22 19:04:50 rms01i.example.com cyrus/imap[858059]: 
> extractor_init(0x55749ef10b90)
> Jul 22 19:04:50 rms01i.example.com cyrus/imap[858059]: SASL sql plugin 
> Parse the username 15554441001
> Jul 22 19:04:50 rms01i.example.com cyrus/imap[858059]: SASL sql plugin 
> try and connect to a host
> Jul 22 19:04:50 rms01i.example.com cyrus/imap[858059]: SASL sql plugin 
> trying to open db 'imap_db
> Jul 22 19:04:50 rms01i.example.com cyrus/imap[858059]: SASL begin 
> transaction
> Jul 22 19:04:50 rms01i.example.com cyrus/imap[858059]: SASL sql plugin 
> create statement from userPassword
> Jul 22 19:04:50 rms01i.example.com cyrus/imap[858059]: SASL sql plugin 
> doing query SELECT password FROM imap_users WHERE username = 
> '[email protected] <mailto:[email protected]>';
> Jul 22 19:04:50 rms01i.example.com cyrus/imap[858059]: SASL sql 
> plugin: no result found
> Jul 22 19:04:50 rms01i.example.com cyrus/imap[858059]: SASL commit 
> transaction
> Jul 22 19:04:50 rms01i.example.com cyrus/imap[858059]: SASL sql plugin 
> Parse the username 15554441001
> Jul 22 19:04:50 rms01i.example.com cyrus/imap[858059]: SASL sql plugin 
> try and connect to a host
> Jul 22 19:04:50 rms01i.example.com cyrus/imap[858059]: SASL sql plugin 
> trying to open db 'imap_db
> Jul 22 19:04:50 rms01i.example.com cyrus/imap[858059]: login: 
> pool-10-12-92-29.iot1.com [10.12.92.29] 15554441001 PLAIN User logged 
> in SESSIONID=<cyrus-1626980690-858059-1-16985860205569064466>
> Jul 22 19:04:50 rms01i.example.com cyrus/imap[858059]: 
> autocreateinbox: autocreate inbox for user 15554441001 was called
> Jul 22 19:04:50 rms01i.example.com cyrus/imap[858059]: 
> autocreateinbox: User 15554441001, INBOX was successfully created
> Jul 22 19:04:50 rms01i.example.com cyrus/imap[858059]: 
> autocreateinbox: User 15554441001, subfolder default creation succeeded.
> Jul 22 19:04:50 rms01i.example.com cyrus/imap[858059]: User 
> 15554441001, Inbox subfolders, created 1, subscribed 0
> Jul 22 19:04:50 rms01i.example.com cyrus/imap[858059]: USAGE 
> 15554441001 user: 0.019144 sys: 0.010459
> Jul 22 19:04:50 rms01i.example.com cyrus/imap[858059]: 
> extractor_destroy(0x55749ef16930)
> *Cyrus <https://cyrus.topicbox.com/latest>* / Info / see discussions 
> <https://cyrus.topicbox.com/groups/info> + participants 
> <https://cyrus.topicbox.com/groups/info/members> + delivery options 
> <https://cyrus.topicbox.com/groups/info/subscription> Permalink 
> <https://cyrus.topicbox.com/groups/info/Td54b0b6af2a95f94-M27de364fa58dbc0cbf24205d> 
>

-- 
Kenneth Murchison
Senior Software Developer
Fastmail US LLC


------------------------------------------
Cyrus: Info
Permalink: https://cyrus.topicbox.com/groups/info/Td54b0b6af2a95f94-M693351d38800820999a60595
Delivery options: https://cyrus.topicbox.com/groups/info/subscription
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.