Can't configure delta chat cmdline test tool

#1

I had downloaded Delta Chat core 0.42.0 (https://github.com/deltachat/deltachat-core/archive/v0.42.0.tar.gz)
followed the instructions in the README, and installed it executing:

sudo apt install libetpan-dev libssl-dev libsqlite3-dev libsasl2-dev libbz2-dev zlib1g-dev
mkdir builddir
cd builddir
meson
ninja
sudo ninja install
sudo ldconfig

then I executed the cmdline tool ./cmdline/delta acc.db and used the set command to set addr and mail_pw settings, and executed command configure but the program fails to connect with the server, this is the output:

> configure
INBOX-jobs started...
SMTP-jobs started...
[Warning] Not configured, cannot connect.
SMTP-jobs ended.
SMTP-idle started...
INBOX-jobs ended.
Interrupting IMAP-IDLE...
> [Warning] Not configured, cannot connect.
[Warning] Not configured, cannot connect.
[Warning] Not configured, cannot connect.
SENTBOX-IDLE started...
IMAP-fake-IDLEing...
[Warning] Not configured, cannot connect.
INBOX-IDLE will not be started because of waiting jobs.
INBOX-jobs started...
[Warning] Not configured, cannot connect.
MVBOX-IDLE started...
IMAP-fake-IDLEing...
INBOX-job #1, action 900 started...
Suspending SENTBOX-thread.
Interrupting SENTBOX-IDLE...
SENTBOX-IDLE ended.
SENTBOX-IDLE will not be started as it was interrupted while not ideling.
Suspending MVBOX-thread.
Interrupting MVBOX-IDLE...
MVBOX-IDLE ended.
MVBOX-IDLE will not be started as it was interrupted while not ideling.
Configure ...
{{Received DC_EVENT_CONFIGURE_PROGRESS(1 ‰)}}
{{Received DC_EVENT_CONFIGURE_PROGRESS(200 ‰)}}
Testing https://autoconfig.disroot.org/mail/config-v1.1.xml?emailaddress=adbenitez%40disroot.org ...
sh: 1: curl: not found
Can't read file.
{{Received DC_EVENT_CONFIGURE_PROGRESS(300 ‰)}}
Testing https://disroot.org/.well-known/autoconfig/mail/config-v1.1.xml?emailaddress=adbenitez%40disroot.org ...
sh: 1: curl: not found
Can't read file.
{{Received DC_EVENT_CONFIGURE_PROGRESS(310 ‰)}}
Testing https://disroot.org/autodiscover/autodiscover.xml ...
sh: 1: curl: not found
Can't read file.
{{Received DC_EVENT_CONFIGURE_PROGRESS(320 ‰)}}
Testing https://autodiscover.disroot.org/autodiscover/autodiscover.xml ...
sh: 1: curl: not found
Can't read file.
{{Received DC_EVENT_CONFIGURE_PROGRESS(330 ‰)}}
Testing http://autoconfig.disroot.org/mail/config-v1.1.xml?emailaddress=adbenitez%40disroot.org ...
sh: 1: curl: not found
Can't read file.
{{Received DC_EVENT_CONFIGURE_PROGRESS(340 ‰)}}
Testing http://disroot.org/.well-known/autoconfig/mail/config-v1.1.xml ...
sh: 1: curl: not found
Can't read file.
{{Received DC_EVENT_CONFIGURE_PROGRESS(350 ‰)}}
Testing https://autoconfig.thunderbird.net/v1.1/disroot.org ...
sh: 1: curl: not found
Can't read file.
{{Received DC_EVENT_CONFIGURE_PROGRESS(500 ‰)}}
{{Received DC_EVENT_CONFIGURE_PROGRESS(600 ‰)}}
Trying: adbenitez@disroot.org adbenitez@disroot.org:***:imap.disroot.org:993 adbenitez@disroot.org:***:smtp.disroot.org:465 AUTH_NORMAL IMAP_SSL SMTP_SSL
GnuTLS error: The operation timed out
[DC_EVENT_ERROR_NETWORK] first=1, msg=Could not connect to IMAP-server imap.disroot.org:993 using SSL. (Error #43)
IMAP disconnected.
{{Received DC_EVENT_CONFIGURE_PROGRESS(650 ‰)}}
Trying: adbenitez@disroot.org adbenitez@disroot.org:***:imap.disroot.org:993 adbenitez@disroot.org:***:smtp.disroot.org:465 AUTH_NORMAL IMAP_STARTTLS SMTP_SSL
IMAP stream lost; we'll reconnect soon.
[DC_EVENT_ERROR_NETWORK] first=0, msg=Could not connect to IMAP-server imap.disroot.org:993. (Error #4)
IMAP disconnected.
{{Received DC_EVENT_CONFIGURE_PROGRESS(660 ‰)}}
Trying: adbenitez@disroot.org adbenitez@disroot.org:***:imap.disroot.org:143 adbenitez@disroot.org:***:smtp.disroot.org:465 AUTH_NORMAL IMAP_STARTTLS SMTP_SSL
[DC_EVENT_ERROR_NETWORK] first=0, msg=Could not connect to IMAP-server imap.disroot.org:143. (Error #6)
IMAP disconnected.
{{Received DC_EVENT_CONFIGURE_PROGRESS(670 ‰)}}
Trying: adbenitez@disroot.org adbenitez:***:imap.disroot.org:993 adbenitez:***:smtp.disroot.org:465 AUTH_NORMAL IMAP_SSL SMTP_SSL
GnuTLS error: The operation timed out
[DC_EVENT_ERROR_NETWORK] first=0, msg=Could not connect to IMAP-server imap.disroot.org:993 using SSL. (Error #43)
IMAP disconnected.
{{Received DC_EVENT_CONFIGURE_PROGRESS(680 ‰)}}
Trying: adbenitez@disroot.org adbenitez:***:imap.disroot.org:993 adbenitez:***:smtp.disroot.org:465 AUTH_NORMAL IMAP_STARTTLS SMTP_SSL
IMAP stream lost; we'll reconnect soon.
[DC_EVENT_ERROR_NETWORK] first=0, msg=Could not connect to IMAP-server imap.disroot.org:993. (Error #4)
IMAP disconnected.
{{Received DC_EVENT_CONFIGURE_PROGRESS(690 ‰)}}
Trying: adbenitez@disroot.org adbenitez:***:imap.disroot.org:143 adbenitez:***:smtp.disroot.org:465 AUTH_NORMAL IMAP_STARTTLS SMTP_SSL
[DC_EVENT_ERROR_NETWORK] first=0, msg=Could not connect to IMAP-server imap.disroot.org:143. (Error #6)
IMAP disconnected.
{{Received DC_EVENT_CONFIGURE_PROGRESS(0 ‰)}}
Unsuspending SENTBOX-thread.
Unsuspending MVBOX-thread.
INBOX-jobs ended.
[Warning] Not configured, cannot connect.
[Warning] Not configured, cannot connect.
[Warning] Not configured, cannot connect.
INBOX-IDLE started...
IMAP-fake-IDLEing...
[Warning] Not configured, cannot connect.
[Warning] Not configured, cannot connect.
MVBOX-IDLE started...
IMAP-fake-IDLEing...
[Warning] Not configured, cannot connect.
SENTBOX-IDLE started...
IMAP-fake-IDLEing...
SMTP-idle ended.
SMTP-jobs started...
SMTP-jobs ended.
SMTP-idle started...
^C

I can check the server is accessible in my command line:

$ openssl s_client -connect disroot.org:993 -crlf
CONNECTED(00000003)
depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
verify return:1
depth=0 CN = disroot.org
verify return:1
---
Certificate chain
 0 s:/CN=disroot.org
   i:/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
 1 s:/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
   i:/O=Digital Signature Trust Co./CN=DST Root CA X3
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIGTTCCBTWgAwIBAgISA9iXrqtSS4u1TiovtElwDCRKMA0GCSqGSIb3DQEBCwUA
MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD
ExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xOTA0MTcwOTM3MzhaFw0x
OTA3MTYwOTM3MzhaMBYxFDASBgNVBAMTC2Rpc3Jvb3Qub3JnMIICIjANBgkqhkiG
9w0BAQEFAAOCAg8AMIICCgKCAgEA3H72en6h+WidC2Il+SY3BN8CSP+B0zfCckag
LrcVevhdbCo0CFGIMGOQU/tm763kdbsD6+IWbD7X10AzkPVYdLQq06V52ijTxKCz
Gccbgp5lRd6q2Jn+KJNdXC3k7R7vTEnKJIUJb3G7aaiNKNCDM8lSzikmdPOYPWar
knssi9cDuTFHOCUHeSI0cqRrnOuFxtYkODf1tDHGSSLDJ3SXf9yi0XHxM5fSucfS
LZ0T+kU80fAdEOkxcB0pzIQXG+GQjK9KbxYwO+SaZg8gGOgz0eC+rYGyYvLzgmUV
dVZqqLHIFL8BXnbT3GVhYUSc0MEXNyKa+8Bsc2nae16C/WYWb34DwW+tp2MFKYMN
lS3GZLKrBojtqpkTpuJBqGmJqSMr0+eZGD2T352ojxpU9od4Z2gXOc3m5uzFHTMt
aCxloGJtRvRcRYUUNw9qrWGO+wonh6JyRTLPgtIQMeGjBma7WO19su91RBIf2WKP
uqGTpBXHCWHgmcHFqguWC9cBwRG57OnUeVISWhQ7wNcEAJvJ5O9LhHAQZXqcw/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ArC7kkvcqDhN26JbQyG2AKLgMlkf
wSUr+VkR7HnxP4PGCJz1XpD3Xu+LEXwWxegZV4hOgy/+Uo89ZkvyBlUwYeTn4FgT
bRFakuTUJuxijWs4VDIj4RO3vdLM+XWKumm/fVRlSIdI6bovVmx2jU1/MzMxXTUb
Zre+g42BfE0ai8MUsYCyEtAGEIXlw9RnNcwmSY99gIwxb/NwxjzIAEV46hBlszSx
imoLU4D30Tk4kIeFQ6Iyq5aJqPyZjjDfQrpkUUdIRSjU
-----END CERTIFICATE-----
subject=/CN=disroot.org
issuer=/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
---
No client certificate CA names sent
Peer signing digest: SHA512
Server Temp Key: ECDH, P-384, 384 bits
---
SSL handshake has read 3740 bytes and written 334 bytes
Verification: OK
---
New, TLSv1.2, Cipher is ECDHE-RSA-AES128-GCM-SHA256
Server public key is 4096 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-RSA-AES128-GCM-SHA256
    Session-ID: A2AF8A9C0153C28A6D0C57DFFBBBBADA1AE7F9944A7DA6D70C79F6115DCBFA8E
    Session-ID-ctx: 
    Master-Key: 09EAAB5112B56DF632D2661F6301881C414BEC2CC73A59D90944A59DBC671BB3E891B92F54532E685DEDCCC68FA49482
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    TLS session ticket lifetime hint: 7200 (seconds)
    TLS session ticket:
    0000 - 21 b5 9c ae 7e 91 70 7c-af 24 45 b9 05 c7 6f 7c   !...~.p|.$E...o|
    0010 - 6a a2 27 1c 65 3c c5 c6-cb 80 89 c0 97 f6 fe 0b   j.'.e<..........
    0020 - d8 0a 36 b3 8c 75 93 a6-9b 3f 5a 84 e9 21 ac 30   ..6..u...?Z..!.0
    0030 - 12 dd f0 fa 69 73 da 4b-49 c2 7f 2d f2 06 4c 38   ....is.KI..-..L8
    0040 - 2b 10 8c b3 ba f7 36 ce-a0 c0 d8 9f bb fa 4e 2a   +.....6.......N*
    0050 - 64 d7 e9 70 53 be b0 35-ec c3 29 77 20 c1 dc a8   d..pS..5..)w ...
    0060 - 98 ed da 3d 60 7e 5f 6e-a3 15 b4 88 70 29 e7 a2   ...=`~_n....p)..
    0070 - 4f fe 76 59 69 ae 7f 87-f2 d4 ab 29 03 8e e7 1f   O.vYi......)....
    0080 - cf 0d 8a c1 ed 1b 4d 05-e0 92 35 0d 74 84 8d 03   ......M...5.t...
    0090 - 0b 57 2d bc f7 0c 17 15-f8 bc 36 99 15 b0 89 87   .W-.......6.....

    Start Time: 1556133868
    Timeout   : 7200 (sec)
    Verify return code: 0 (ok)
    Extended master secret: yes
---
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
a login adbenitez@disroot.org <MY PASSWORD>
a OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SPECIAL-USE QUOTA] Logged in

Please help!!!
Thanks in advance :slight_smile:

#2

I was trying to connect using the Delta Chat python bindings and also get the same error, I had used Delta Chat Android with that account without any problem.
output from deltabot:

0.13 [MAIN-0x9477610] DC_EVENT_INFO(0,'Interrupting IMAP-IDLE...')
0.23 [MAIN-0x9477610] DC_EVENT_INFO(0,'Interrupting IMAP-IDLE...')
starting imap thread
starting smtp thread
0.23 [MAIN-0x9477610] -- waiting for event with regex: DC_EVENT_CONFIGURE_PROGRESS --
0.23 [imap-0x9477610] DC_EVENT_INFO(0,'INBOX-jobs started...')
0.23 [smtp-0x9477610] DC_EVENT_INFO(0,'SMTP-jobs started...')
0.23 [imap-0x9477610] DC_EVENT_INFO(0,'INBOX-job #8, action 900 started...')
0.23 [smtp-0x9477610] DC_EVENT_INFO(0,'SMTP-jobs ended.')
0.23 [smtp-0x9477610] DC_EVENT_INFO(0,'SMTP-idle started...')
0.29 [imap-0x9477610] DC_EVENT_INFO(0,'Suspending SENTBOX-thread.')
0.29 [imap-0x9477610] DC_EVENT_INFO(0,'Interrupting SENTBOX-IDLE...')
0.29 [imap-0x9477610] DC_EVENT_INFO(0,'Suspending MVBOX-thread.')
0.29 [imap-0x9477610] DC_EVENT_INFO(0,'Interrupting MVBOX-IDLE...')
0.29 [imap-0x9477610] DC_EVENT_INFO(0,'Configure ...')
0.29 [imap-0x9477610] DC_EVENT_CONFIGURE_PROGRESS(1,0)
0.29 [MAIN-0x9477610] -- waiting for event with regex: DC_EVENT_CONFIGURE_PROGRESS --
0.29 [imap-0x9477610] DC_EVENT_CONFIGURE_PROGRESS(200,0)
0.29 [MAIN-0x9477610] -- waiting for event with regex: DC_EVENT_CONFIGURE_PROGRESS --
0.29 [imap-0x9477610] DC_EVENT_INFO(0,'Testing https://autoconfig.disroot.org/mail/config-v1.1.xml?emailaddress=adbenitez%40disroot.org ...')
0.29 [imap-0x9477610] DC_EVENT_HTTP_GET('https://autoconfig.disroot.org/mail/config-v1.1.xml?emailaddress=adbenitez%40disroot.org',0)
2.86 [imap-0x9477610] DC_EVENT_CONFIGURE_PROGRESS(300,0)
2.86 [MAIN-0x9477610] -- waiting for event with regex: DC_EVENT_CONFIGURE_PROGRESS --
2.86 [imap-0x9477610] DC_EVENT_INFO(0,'Got autoconfig: 0 adbenitez:0:disroot.org:993 adbenitez:0:disroot.org:587 IMAP_SSL SMTP_STARTTLS')
2.86 [imap-0x9477610] DC_EVENT_CONFIGURE_PROGRESS(600,0)
2.86 [MAIN-0x9477610] -- waiting for event with regex: DC_EVENT_CONFIGURE_PROGRESS --
2.86 [imap-0x9477610] DC_EVENT_INFO(0,'Trying: adbenitez@disroot.org adbenitez:***:disroot.org:993 adbenitez:***:disroot.org:587 AUTH_NORMAL IMAP_SSL SMTP_STARTTLS')
GnuTLS error: The operation timed out
3.08 [imap-0x9477610] DC_EVENT_ERROR_NETWORK(1,'Could not connect to IMAP-server disroot.org:993 using SSL. (Error #43)')
3.08 [imap-0x9477610] DC_EVENT_INFO(0,'IMAP disconnected.')
3.08 [imap-0x9477610] DC_EVENT_CONFIGURE_PROGRESS(0,0)
3.08 [MAIN-0x9477610] -- waiting for event with regex: DC_EVENT_CONFIGURE_PROGRESS --
3.08 [imap-0x9477610] DC_EVENT_INFO(0,'Unsuspending SENTBOX-thread.')
3.08 [imap-0x9477610] DC_EVENT_INFO(0,'Unsuspending MVBOX-thread.')
3.08 [imap-0x9477610] DC_EVENT_INFO(0,'INBOX-jobs ended.')
3.08 [imap-0x9477610] DC_EVENT_WARNING(0,'Not configured, cannot connect.')
3.08 [imap-0x9477610] DC_EVENT_WARNING(0,'Not configured, cannot connect.')
3.08 [imap-0x9477610] DC_EVENT_INFO(0,'INBOX-IDLE started...')
3.08 [imap-0x9477610] DC_EVENT_INFO(0,'IMAP-fake-IDLEing...')
#3

i think “apt install curl” is missing.

#4

I ran into the same problem and got the Information from r10s that basic configuration by cmdline tool is not possible!

a) You need to import a backup from a configured dc installation.

This will work.

EDIT:

(Another important tip to know):
The command to import backup is only working when IMAP thread is running!
b) Therefore it is necessary to launch “connect” command to start threads (!)
c) To prevent a real connect to email server I go offline with my PC before I’m doing backup import in cmdline tool.

I think these hints are really important for trying cmdline tool.

#5

indeed I don’t have curl installed, but that isn’t listed in the README page of Delta Chat core, will try that, thanks for the tip!!

#6

thanks, anyway I am not interested in the cmdline tool, I am interested in the python bindings, I was trying the cmdline tool to check if it was a problem with the core or with the bindings :wink:

#7

new test and still the same issue, I am now in another machine, with the latest master branch (I guess it is core 0.43.0) I am using a testrun email account, I am the only one having this issue?

#8

Solved!!!
Thanks to Lupine at #deltachat irc channel for pointing out (and solving) the issue:

after compiling and installing the master branch of libetpan which has the problem already solved.

1 Like