git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC 0/3] imap-send curl tunnelling support

From
Nicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com>
Date
Aug 9, 2017, 14:43 UTC
Message-ID
<ab866314-608b-eaca-b335-12cffe165526@morey-chaisemartin.com>

From 7.21.5, curl can be tricked into using an open fd. This series uses this to allow using curl over a tunnel.

I have a few doubt on patch #2:
- is socketpair working on all git supported system (windows ?)
- should socketpair always be used or limited to the curl over tunnel case ?
  I don't think there is too much different between an unname pipe and a socketpair but I'm not sure either :)

This series also shows a "bug" in curl. When trying out the tunnel example fro imap-send documentation, this happends: Starting tunnel 'ssh -q -C localhost /usr/sbin/imapd ./Maildir'... ok sending 3 messages 16:38:54.055221 http.c:639 == Info: Hostname was NOT found in DNS cache 16:38:54.059505 http.c:639 == Info: Trying ::1... 16:38:54.059545 http.c:639 == Info: Connected to localhost () port 143 (#0) 16:38:54.354379 http.c:586 <= Recv header, 0000000332 bytes (0x0000014c) 16:38:54.354405 http.c:598 <= Recv header: * PREAUTH [CAPABILITY IMAP4REV1 I18NLEVEL=1 LITERAL+ IDLE UIDPLUS NAMESPACE CHILDREN MAILBOX-REFERRALS BINARY UNSELECT ESEARCH WITHIN SCAN SORT THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND] Pre-authenticated user nmorey portia.home.nicolas.morey-chaisemartin.com IMAP4rev1 2007e.404 at Wed, 9 Aug 2017 16:38:54 +0200 (CEST) 16:38:54.354425 http.c:639 == Info: Bad tagged response 16:38:54.354448 http.c:639 == Info: Closing connection 0 curl_easy_perform() failed: FTP: weird server reply

It appears curl do not support the PREAUTH tag.
However a test with "nc imap.server.ext 143" is working fine.
Nicolas Morey-Chaisemartin (3):
  imap-send: move tunnel setup to its own function
  imap-send: use a socketpair instead of pipe to communicate with the
    tunnel
  imap_send: add support for curl over tunnel
 Documentation/git-imap-send.txt |  4 +-
 imap-send.c                     | 91 +++++++++++++++++++++++++++++++----------
 2 files changed, 72 insertions(+), 23 deletions(-)
Next: Nicolas Morey-Chaisemartin
Message 1 of 22 in “[RFC 0/3] imap-send curl tunnelling support”
  1. Nicolas Morey-ChaisemartinAug 9, 2017
  2. 1/3 imap-send: move tunnel setup to its own functionNicolas Morey-Chaisemartin, Aug 9, 2017
  3. 3/3 imap_send: add support for curl over tunnelNicolas Morey-Chaisemartin, Aug 9, 2017
  4. 2/3 imap-send: use a socketpair instead of pipe to communicate with the tunnelNicolas Morey-Chaisemartin, Aug 9, 2017
  5. Nicolas Morey-ChaisemartinAug 15, 2017
  6. Stefan BellerAug 15, 2017
  7. Johannes SchindelinAug 16, 2017
  8. Nicolas Morey-ChaisemartinAug 21, 2017
  9. Johannes SixtAug 22, 2017
  10. Nicolas Morey-ChaisemartinAug 22, 2017
  11. Johannes SchindelinAug 23, 2017
  12. Jeff KingAug 16, 2017
  13. Nicolas Morey-ChaisemartinAug 21, 2017
  14. Jeff KingAug 23, 2017
  15. Nicolas Morey-ChaisemartinAug 24, 2017
  16. Jeff KingAug 24, 2017
  17. Daniel StenbergAug 24, 2017
  18. Jeff KingAug 24, 2017
  19. Daniel StenbergAug 24, 2017
  20. Nicolas Morey-ChaisemartinAug 24, 2017
  21. Jeff KingAug 24, 2017
  22. Jeff KingAug 16, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.