cURL / Mailing Lists / curl-library / Single Mail

curl-library

imaps question

From: <fthx_at_fthx.de>
Date: Mon, 30 May 2016 21:33:25 +0200

Dear all,

I am using libcurl with C/C++ on CentOs 7 and the problem is that the
same binary on 2 machines don't work in the same way.
Here the version list of both machines:
Linux dev2 3.10.0-327.13.1.el7.x86_64 #1 SMP Thu Mar 31 16:04:38 UTC
2016 x86_64 x86_64 x86_64 GNU/Linux
Linux dev1 3.10.0-327.10.1.el7.x86_64 #1 SMP Tue Feb 16 17:03:50 UTC
2016 x86_64 x86_64 x86_64 GNU/Linux

on both:
openssl-1.0.1e-51.el7_2.2.x86_64
libcurl-7.29.0-25.el7.centos.x86_64
openssl-devel-1.0.1e-51.el7_2.2.x86_64
openssl-libs-1.0.1e-51.el7_2.2.x86_64

On both I use the same url to the same imap server. Its hard coded in
the binary.

"dev1" is working correct.
"dev2" is not working correct.

Verbose Output of dev1: (makes a correkt CURLOPT_CUSTOMREQUEST as required)
* Hostname was NOT found in DNS cache
* Trying XX.XX.XX.XX...
* Connected to nnn.nnn.de (XX.XX.XX.XX) port 993 (#0)
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* Server certificate:
* subject: C=DE; OU=Domain Control Validated; CN=nnn.nnn.de
* start date: 2015-03-04 14:57:17 GMT
* expire date: 2018-03-04 14:57:17 GMT
* subjectAltName: nnn.nnn.de matched
* issuer: C=BE; O=GlobalSign nv-sa; CN=AlphaSSL CA - SHA256 - G2
* SSL certificate verify ok.
< * OK IMAP4 ready
> A001 CAPABILITY
< * CAPABILITY IMAP4rev1 SASL-IR SORT THREAD=REFERENCES MULTIAPPEND
UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS UIDPLUS
LIST-EXTENDED I18NLEVEL=1 QUOTA AUTH=PLAIN AUTH=LOGIN AUTH=PLAIN
< A001 OK completed
> A002 AUTHENTICATE LOGIN c3VwcG9ydEB6YnNzLmRl
< + UGFzc3dvcmQ6
> Um01emQ2NT9RdGZz
< A002 OK Logged in.
> A003 SELECT INBOX
< * FLAGS (\Answered \Flagged \Deleted \Seen \Draft $NotJunk NotJunk
$Junk NonJunk $Forwarded Junk $MDNSent)
< * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft
$NotJunk NotJunk $Junk NonJunk $Forwarded Junk $MDNSent \*)] Flags
permitted.
< * 286 EXISTS
< * 0 RECENT
< * OK [UNSEEN 246] First unseen.
< * OK [UIDVALIDITY 1436360203] UIDs valid
< * OK [UIDNEXT 3529] Predicted next UID
< A003 OK [READ-WRITE] Select completed.
> A004 UID FETCH 1:* (FLAGS BODY.PEEK[HEADER.FIELDS (SUBJECT DATE FROM)])
< * 1 FETCH (UID 200 FLAGS (\Seen $NotJunk NotJunk NonJunk)
BODY[HEADER.FIELDS (SUBJECT DATE FROM)] {130}

Verbose Output of dev2: (CURLOPT_CUSTOMREQUEST, "UID FETCH 1:* (FLAGS
BODY.PEEK[HEADER.FIELDS (SUBJECT DATE FROM)])" not working)
* About to connect() to nnn.nnn.de port 993 (#0)
* Trying XX.XX.XX.XX...
* Connected to sslmailpool.ispgateway.de (XX.XX.XX.XX) port 993 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* skipping SSL peer certificate verification
* SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate:
* subject: CN=nnn.nnn.de,OU=Domain Control Validated,C=DE
* start date: Mar 04 14:57:17 2015 GMT
* expire date: Mar 04 14:57:17 2018 GMT
* common name: nnn.nnn.de
* issuer: CN=AlphaSSL CA - SHA256 - G2,O=GlobalSign nv-sa,C=BE
< * OK IMAP4 ready
> B CAPABILITY
< * CAPABILITY IMAP4rev1 SASL-IR SORT THREAD=REFERENCES MULTIAPPEND
UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS UIDPLUS
LIST-EXTENDED I18NLEVEL=1 QUOTA AUTH=PLAIN AUTH=LOGIN AUTH=PLAIN
< B OK completed
> C AUTHENTICATE LOGIN
< + VXNlcm5hbWU6
> c3VwcG9ydEB6YnNzLmRl
< + UGFzc3dvcmQ6
> Um01emQ2NT9RdGZz
< C OK Logged in.
> D SELECT INBOX
< * FLAGS (\Answered \Flagged \Deleted \Seen \Draft $NotJunk NotJunk
$Junk NonJunk $Forwarded Junk $MDNSent)
< * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft
$NotJunk NotJunk $Junk NonJunk $Forwarded Junk $MDNSent \*)] Flags
permitted.
< * 283 EXISTS
< * 0 RECENT
< * OK [UNSEEN 246] First unseen.
< * OK [UIDVALIDITY 1436360203] UIDs valid
< * OK [UIDNEXT 3526] Predicted next UID
< D OK [READ-WRITE] Select completed.
> A FETCH 1 BODY[TEXT]
< * 1 FETCH (BODY[TEXT] {513}

As you can see on "dev2" the outgoing IMAP commands are different --> "B
CAPABILITY" versus "dev1" --> "A001 CAPABILITY"
Also the CURLOPT_CUSTOMREQUEST, "UID FETCH 1:* (FLAGS
BODY.PEEK[HEADER.FIELDS (SUBJECT DATE FROM)])" is working on "dev1" as
required,
but on "dev2" only a "A FETCH 1 BODY[TEXT]" is issued.

As I stated: I do execute on both machines the same binary file and I
have no idea why the communication is different and also the result.

Maybe someone have any idea/hints for me ? there is no curlrc on place
but maybe there is some kind of env-variable ? I have nothing found yet.
Any help would be greatly appreciated. Thank you in advance.

Martin

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-05-30