{"thread":{"id":"57742","subject":"Setting up `send-email` for SSL, and then using GCM (Git Credential Manager)","startedAt":"2022-04-16T11:38:13Z","lastAt":"2022-04-30T16:32:03Z","messageCount":3,"participants":["Philip Oakley"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"453765","messageId":"c5a5b7a6-33fe-2dc7-ab18-b9b22d59c2c8@iee.email","threadId":"57742","inReplyTo":"10919180-85ea-2172-28df-b718cdbdf783@iee.email","subject":"Setting up `send-email` for SSL, and then using GCM (Git Credential Manager)","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.email","sentAt":"2022-04-16T11:38:06Z","receivedAt":"2022-04-16T11:38:13Z","isPatch":false,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"This maybe a wXYz-Problem. But I'm stuck at getting SSL to work with\n`send-email`.\n\nI'm trying to update both my home Windows PC (win10) and my Ubuntu\ntravel laptop (an old-Acer-i5) `send-email` setup/config to use my\npersonal email domain (with authentication), rather than my old home ISP\nlocked (no auth) connection, but I'm struggling.\n\nZ) Does the GCM (Git Credential Manager) integrate well with send-email,\nand what guidance is available for setting up and debugging the\n`send-email` configuration?\n\nY) It's not clear what I should see in the terminal window in either\nGit-for-Windows or Ubuntu when testing the `git send-email` command -\nwithout/with using GCM.\n\nw) Some back story. I set up my existing telephone-line-locked home\nsend-email config many years ago around the time of dial-up/ADSL. My\nrouter logs into my ISP giving me an open port 25 for SMTP (though\ndoesn't advertise that any more). My config for the ISP is simple,\nneeding only the `smtpServer, smtpServerPort`, and my `from,\nsuppressfrom, & chainreplyto` settings. It works for both the Win PC and\nmy Ubuntu laptop, but I can only use this when at home.\n\nI also have a personal email domain (iee.email) whose authentication\nworks with Thunderbird for the WinPC at home, and the Ubuntu laptop at\nhome and when away from home.  I'd like to be able to use ` send-email`\nvia the personal email domain on the laptop when away from home (final\ngoal), and also match that `send-email` use on the Win PC (which would\nalso allow easy switching ISP when needed).\n\nX) Where I've reached. I've discovered `sendemail.identity`, so at least\nI can have both configurations available for selection [7]. I've added\nthe --smtp-debug=1` with little insight. I've hit a brick wall with\nrespect to establishing the connection (I think). It's not clear if any\nauthentication (password stuff) has started.\n\nI fail to get the \"<<<220 xxxxx   server ready\" reply that my ISP\nidentity gives, rather I get \"Net::SMTP: Net::Cmd::getline(): unexpected\nEOF on command channel: Connection reset by peer ... Unable to\ninitialize SMTP properly. Check config and use --smtp-debug. VALUES:\nserver=smtp.hosts.co.uk encryption= hello=localhost.localdomain port=465\"\n\nI've added below the terminal responses [1,3] and extracts of the config\n[2,4] for my test 'cover-letter'. Plus my Thunderbird settings [5] for\ncomparison. Git build [6]. Domain provider advice [8].\n\nThoughts: Maybe the setting I need for `git-end-email` don't match those\nused by Thunderbird; Is there extra debug info if I set some extra\nparameters. Maybe some other tool can provide insight into what's failing?\n\nAny suggestions?\n--\nPhilip\n\n[1] Failing case\nphili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git (die_preserve_ggg)\n$ git send-email --identity=Names   --to=\"Philip Oakley\n<philipoakley@iee.email>\" --smtp-debug=1  0000*.patch\n0000-cover-letter.patch\nNet::SMTP>>> Net::SMTP(3.13)\nNet::SMTP>>>   Net::Cmd(3.13)\nNet::SMTP>>>     Exporter(5.76)\nNet::SMTP>>>   IO::Socket::IP(0.41)\nNet::SMTP>>>     IO::Socket(1.46)\nNet::SMTP>>>       IO::Handle(1.46)\nNet::SMTP: Net::Cmd::getline(): unexpected EOF on command channel:\nConnection reset by peer at C:/Program\nFiles/Git/mingw64/libexec/git-core\\git-send-email line 1698.\nUnable to initialize SMTP properly. Check config and use --smtp-debug.\nVALUES: server=smtp.hosts.co.uk encryption= hello=localhost.localdomain\nport=465 at C:/Program Files/Git/mingw64/libexec/git-core\\git-send-email\nline 1725.\n\nphili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git (die_preserve_ggg)\n\n---\n[2]\n[sendemail \"Names\"]\n    chainreplyto = false\n    from = Philip Oakley <philipoakley@iee.email>\n    suppressfrom = true\n    smtpServer = smtp.hosts.co.uk\n    smtpServerPort = 465\n    smptEncryption = ssl\n    smtpUser = iee.email\n\n    smtpPass = <password>\n\n----------------------\n[3] Existing (passing) case\nphili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git (die_preserve_ggg)\n$ git send-email --identity=TalkTalk   --to=\"Philip Oakley\n<philipoakley@iee.email>\" --smtp-debug=1  0000*.patch\n0000-cover-letter.patch\nNet::SMTP>>> Net::SMTP(3.13)\nNet::SMTP>>>   Net::Cmd(3.13)\nNet::SMTP>>>     Exporter(5.76)\nNet::SMTP>>>   IO::Socket::IP(0.41)\nNet::SMTP>>>     IO::Socket(1.46)\nNet::SMTP>>>       IO::Handle(1.46)\nNet::SMTP=GLOB(0x800c16240)<<< 220 cm4nec smtp.talktalk.net ESMTP server\nready\nNet::SMTP=GLOB(0x800c16240)>>> EHLO localhost.localdomain\nNet::SMTP=GLOB(0x800c16240)<<< 250-cm4nec hello [84.13.159.41], pleased\nto meet you\nNet::SMTP=GLOB(0x800c16240)<<< 250-HELP\nNet::SMTP=GLOB(0x800c16240)<<< 250-SIZE 30000000\nNet::SMTP=GLOB(0x800c16240)<<< 250-ENHANCEDSTATUSCODES\nNet::SMTP=GLOB(0x800c16240)<<< 250-8BITMIME\nNet::SMTP=GLOB(0x800c16240)<<< 250 OK\nNet::SMTP=GLOB(0x800c16240)>>> MAIL FROM:<philipoakley@iee.email>\nNet::SMTP=GLOB(0x800c16240)<<< 250 2.1.0 <philipoakley@iee.email> sender ok\nNet::SMTP=GLOB(0x800c16240)>>> RCPT TO:<philipoakley@iee.email>\nNet::SMTP=GLOB(0x800c16240)<<< 250 2.1.5 <philipoakley@iee.email>\nrecipient ok\nNet::SMTP=GLOB(0x800c16240)>>> DATA\nNet::SMTP=GLOB(0x800c16240)<<< 354 OK\nNet::SMTP=GLOB(0x800c16240)>>> From: Philip Oakley <philipoakley@iee.email>\nNet::SMTP=GLOB(0x800c16240)>>> To: Philip Oakley <philipoakley@iee.email>\nNet::SMTP=GLOB(0x800c16240)>>> Subject: [PATCH 0/1] *** Test Names ***\nNet::SMTP=GLOB(0x800c16240)>>> Date: Sat, 16 Apr 2022 09:54:00 +0100\nNet::SMTP=GLOB(0x800c16240)>>> Message-Id:\n<20220416085400.277-1-philipoakley@iee.email>\nNet::SMTP=GLOB(0x800c16240)>>> X-Mailer: git-send-email 2.36.0.rc0.windows.1\nNet::SMTP=GLOB(0x800c16240)>>> MIME-Version: 1.0\nNet::SMTP=GLOB(0x800c16240)>>> Content-Transfer-Encoding: 8bit\nNet::SMTP=GLOB(0x800c16240)>>> *** Test BLURB  ***\n[...]\nNet::SMTP=GLOB(0x800c16240)>>> 2.36.0.rc0.windows.1\nNet::SMTP=GLOB(0x800c16240)>>> .\nNet::SMTP=GLOB(0x800c16240)<<< 250 2.0.0 feC1ntahZW5NofeC1ntcj4 mail\naccepted for delivery\nOK. Log says:\nServer: smtp.talktalk.net\nMAIL FROM:<philipoakley@iee.email>\nRCPT TO:<philipoakley@iee.email>\nFrom: Philip Oakley <philipoakley@iee.email>\nTo: Philip Oakley <philipoakley@iee.email>\nSubject: [PATCH 0/1] *** Test Names ***\nDate: Sat, 16 Apr 2022 09:54:00 +0100\nMessage-Id: <20220416085400.277-1-philipoakley@iee.email>\nX-Mailer: git-send-email 2.36.0.rc0.windows.1\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\n\nResult: 250\nNet::SMTP=GLOB(0x800c16240)>>> QUIT\nNet::SMTP=GLOB(0x800c16240)<<< 221 2.0.0 cm4nec smtp.talktalk.net\nclosing connection\n\nphili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git (die_preserve_ggg)\n\n---\n[4]\n[sendemail \"TalkTalk\"]\n    chainreplyto = false\n    from = Philip Oakley <philipoakley@iee.email>\n    suppressfrom = true\n    smtpServer = smtp.talktalk.net\n    smtpServerPort = 25\n\n[5] Thunderbird (IMAP) Server Settings (gui)\nServerName: imap.hosts.co.uk\nServerPort: 993\nUserName: iee.email\nConnectionSecurity: SSL/TLS    [None|StartTLS|Ssl/tls]\nAuthMethod: NormalPass     \n[Normal|Encrypted|Kerebos/Gssapi|NTLM|TLScert|Oath2]\n--\nThunderbird Outgoing SMPTP Server\nsmtp.hosts.co.uk\n465\nSSL/TLS\nNormalPassword\niee.email\n\n[6] Git Build details\nphili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git\n$ git --version --build-options\ngit version 2.36.0.rc0.windows.1\ncpu: x86_64\nbuilt from commit: c61dcf9cfa725959a79a3fb61d63bc05cc13ac7a\nsizeof-long: 4\nsizeof-size_t: 8\nshell-path: /bin/sh\nfeature: fsmonitor--daemon\n\nphili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git\n$ cat /etc/install-options.txt\nEditor Option: Notepad++\nCustom Editor Path:\nDefault Branch Option: main\nPath Option: Cmd\nSSH Option: OpenSSH\nTortoise Option: false\nCURL Option: OpenSSL\nCRLF Option: CRLFAlways\nBash Terminal Option: MinTTY\nGit Pull Behavior Option: Merge\nUse Credential Manager: Enabled\nPerformance Tweaks FSCache: Enabled\nEnable Symlinks: Disabled\nEnable Pseudo Console Support: Disabled\nEnable FSMonitor: Disabled\n\n[7] sendemail.identity now comes straight after the new safe.directory\nentry - serendipity ..\n\n[8] Names domain smtp advice\nhttps://www.names.co.uk/support/articles/sending-emails-via-alternate-smtp-ports/\n[Use SSL/465]\n\n\n"},{"id":"453777","messageId":"2f8567f7-6d9c-e79b-9a05-7dd55cb40224@iee.email","threadId":"57742","inReplyTo":"CACBZZX6d4f3TZnytxXy5_62EVbUL7UObyhR7eR3ApsECeQ=6sA@mail.gmail.com","subject":"Re: Setting up `send-email` for SSL, and then using GCM (Git Credential Manager)","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.email","sentAt":"2022-04-16T15:14:17Z","receivedAt":"2022-04-16T15:14:23Z","isPatch":false,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"(added Git List back - should be non HTML now ;-)\n\nOn 16/04/2022 15:49, Ævar Arnfjörð Bjarmason wrote:\n> I'm on mobile so sorry for the off list HTML, but\n\n> 1. No it doesn't have GCM integration.\n\nThanks for clarifying that.\n\n> 2. Have you tried debugging with e.g. stunnel and leaving the\n> encryption out of git send email\n\nSounds useful. I hadn't realised what 'stunnel' did beforehand.. \nHopefully it'll let me see how the server that hosts my domain is\nresponding (or not).\nAt the moment I'm doing my investigation from my win10 machine...\n\n> 3. I find all things email so much less of a hassle by setting up a\n> local \"open relay\" exim or other real MTA on my laptop.\n>\nI suspect (hope) that once I've cracked the access method to the remote\nemail server that I'll be able to set my gitconfig so that `send-email`\nwill Just Work(tm), minus the GCM aspiration ;-)\n\n>\n> Maybe that helps, maybe not, it sidesteps your questions a bit, but\n> maybe in a way where you won't need to worry about git send email.\n\nIt has been a help.\n\nPhilip\n\n>\n> On Sat, Apr 16, 2022, 16:04 Philip Oakley <philipoakley@iee.email> wrote:\n>\n>     This maybe a wXYz-Problem. But I'm stuck at getting SSL to work with\n>     `send-email`.\n>\n>     I'm trying to update both my home Windows PC (win10) and my Ubuntu\n>     travel laptop (an old-Acer-i5) `send-email` setup/config to use my\n>     personal email domain (with authentication), rather than my old\n>     home ISP\n>     locked (no auth) connection, but I'm struggling.\n>\n>     Z) Does the GCM (Git Credential Manager) integrate well with\n>     send-email,\n>     and what guidance is available for setting up and debugging the\n>     `send-email` configuration?\n>\n>     Y) It's not clear what I should see in the terminal window in either\n>     Git-for-Windows or Ubuntu when testing the `git send-email` command -\n>     without/with using GCM.\n>\n>     w) Some back story. I set up my existing telephone-line-locked home\n>     send-email config many years ago around the time of dial-up/ADSL. My\n>     router logs into my ISP giving me an open port 25 for SMTP (though\n>     doesn't advertise that any more). My config for the ISP is simple,\n>     needing only the `smtpServer, smtpServerPort`, and my `from,\n>     suppressfrom, & chainreplyto` settings. It works for both the Win\n>     PC and\n>     my Ubuntu laptop, but I can only use this when at home.\n>\n>     I also have a personal email domain (iee.email) whose authentication\n>     works with Thunderbird for the WinPC at home, and the Ubuntu laptop at\n>     home and when away from home.  I'd like to be able to use `\n>     send-email`\n>     via the personal email domain on the laptop when away from home (final\n>     goal), and also match that `send-email` use on the Win PC (which would\n>     also allow easy switching ISP when needed).\n>\n>     X) Where I've reached. I've discovered `sendemail.identity`, so at\n>     least\n>     I can have both configurations available for selection [7]. I've added\n>     the --smtp-debug=1` with little insight. I've hit a brick wall with\n>     respect to establishing the connection (I think). It's not clear\n>     if any\n>     authentication (password stuff) has started.\n>\n>     I fail to get the \"<<<220 xxxxx   server ready\" reply that my ISP\n>     identity gives, rather I get \"Net::SMTP: Net::Cmd::getline():\n>     unexpected\n>     EOF on command channel: Connection reset by peer ... Unable to\n>     initialize SMTP properly. Check config and use --smtp-debug. VALUES:\n>     server=smtp.hosts.co.uk <http://smtp.hosts.co.uk> encryption=\n>     hello=localhost.localdomain port=465\"\n>\n>     I've added below the terminal responses [1,3] and extracts of the\n>     config\n>     [2,4] for my test 'cover-letter'. Plus my Thunderbird settings [5] for\n>     comparison. Git build [6]. Domain provider advice [8].\n>\n>     Thoughts: Maybe the setting I need for `git-end-email` don't match\n>     those\n>     used by Thunderbird; Is there extra debug info if I set some extra\n>     parameters. Maybe some other tool can provide insight into what's\n>     failing?\n>\n>     Any suggestions?\n>     --\n>     Philip\n>\n>     [1] Failing case\n>     phili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git\n>     (die_preserve_ggg)\n>     $ git send-email --identity=Names   --to=\"Philip Oakley\n>     <philipoakley@iee.email>\" --smtp-debug=1  0000*.patch\n>     0000-cover-letter.patch\n>     Net::SMTP>>> Net::SMTP(3.13)\n>     Net::SMTP>>>   Net::Cmd(3.13)\n>     Net::SMTP>>>     Exporter(5.76)\n>     Net::SMTP>>>   IO::Socket::IP(0.41)\n>     Net::SMTP>>>     IO::Socket(1.46)\n>     Net::SMTP>>>       IO::Handle(1.46)\n>     Net::SMTP: Net::Cmd::getline(): unexpected EOF on command channel:\n>     Connection reset by peer at C:/Program\n>     Files/Git/mingw64/libexec/git-core\\git-send-email line 1698.\n>     Unable to initialize SMTP properly. Check config and use --smtp-debug.\n>     VALUES: server=smtp.hosts.co.uk <http://smtp.hosts.co.uk>\n>     encryption= hello=localhost.localdomain\n>     port=465 at C:/Program\n>     Files/Git/mingw64/libexec/git-core\\git-send-email\n>     line 1725.\n>\n>     phili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git\n>     (die_preserve_ggg)\n>\n>     ---\n>     [2]\n>     [sendemail \"Names\"]\n>         chainreplyto = false\n>         from = Philip Oakley <philipoakley@iee.email>\n>         suppressfrom = true\n>         smtpServer = smtp.hosts.co.uk <http://smtp.hosts.co.uk>\n>         smtpServerPort = 465\n>         smptEncryption = ssl\n>         smtpUser = iee.email\n>\n>         smtpPass = <password>\n>\n>     ----------------------\n>     [3] Existing (passing) case\n>     phili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git\n>     (die_preserve_ggg)\n>     $ git send-email --identity=TalkTalk   --to=\"Philip Oakley\n>     <philipoakley@iee.email>\" --smtp-debug=1  0000*.patch\n>     0000-cover-letter.patch\n>     Net::SMTP>>> Net::SMTP(3.13)\n>     Net::SMTP>>>   Net::Cmd(3.13)\n>     Net::SMTP>>>     Exporter(5.76)\n>     Net::SMTP>>>   IO::Socket::IP(0.41)\n>     Net::SMTP>>>     IO::Socket(1.46)\n>     Net::SMTP>>>       IO::Handle(1.46)\n>     Net::SMTP=GLOB(0x800c16240)<<< 220 cm4nec smtp.talktalk.net\n>     <http://smtp.talktalk.net> ESMTP server\n>     ready\n>     Net::SMTP=GLOB(0x800c16240)>>> EHLO localhost.localdomain\n>     Net::SMTP=GLOB(0x800c16240)<<< 250-cm4nec hello [84.13.159.41],\n>     pleased\n>     to meet you\n>     Net::SMTP=GLOB(0x800c16240)<<< 250-HELP\n>     Net::SMTP=GLOB(0x800c16240)<<< 250-SIZE 30000000\n>     Net::SMTP=GLOB(0x800c16240)<<< 250-ENHANCEDSTATUSCODES\n>     Net::SMTP=GLOB(0x800c16240)<<< 250-8BITMIME\n>     Net::SMTP=GLOB(0x800c16240)<<< 250 OK\n>     Net::SMTP=GLOB(0x800c16240)>>> MAIL FROM:<philipoakley@iee.email>\n>     Net::SMTP=GLOB(0x800c16240)<<< 250 2.1.0 <philipoakley@iee.email>\n>     sender ok\n>     Net::SMTP=GLOB(0x800c16240)>>> RCPT TO:<philipoakley@iee.email>\n>     Net::SMTP=GLOB(0x800c16240)<<< 250 2.1.5 <philipoakley@iee.email>\n>     recipient ok\n>     Net::SMTP=GLOB(0x800c16240)>>> DATA\n>     Net::SMTP=GLOB(0x800c16240)<<< 354 OK\n>     Net::SMTP=GLOB(0x800c16240)>>> From: Philip Oakley\n>     <philipoakley@iee.email>\n>     Net::SMTP=GLOB(0x800c16240)>>> To: Philip Oakley\n>     <philipoakley@iee.email>\n>     Net::SMTP=GLOB(0x800c16240)>>> Subject: [PATCH 0/1] *** Test Names ***\n>     Net::SMTP=GLOB(0x800c16240)>>> Date: Sat, 16 Apr 2022 09:54:00 +0100\n>     Net::SMTP=GLOB(0x800c16240)>>> Message-Id:\n>     <20220416085400.277-1-philipoakley@iee.email>\n>     Net::SMTP=GLOB(0x800c16240)>>> X-Mailer: git-send-email\n>     2.36.0.rc0.windows.1\n>     Net::SMTP=GLOB(0x800c16240)>>> MIME-Version: 1.0\n>     Net::SMTP=GLOB(0x800c16240)>>> Content-Transfer-Encoding: 8bit\n>     Net::SMTP=GLOB(0x800c16240)>>> *** Test BLURB  ***\n>     [...]\n>     Net::SMTP=GLOB(0x800c16240)>>> 2.36.0.rc0.windows.1\n>     Net::SMTP=GLOB(0x800c16240)>>> .\n>     Net::SMTP=GLOB(0x800c16240)<<< 250 2.0.0 feC1ntahZW5NofeC1ntcj4 mail\n>     accepted for delivery\n>     OK. Log says:\n>     Server: smtp.talktalk.net <http://smtp.talktalk.net>\n>     MAIL FROM:<philipoakley@iee.email>\n>     RCPT TO:<philipoakley@iee.email>\n>     From: Philip Oakley <philipoakley@iee.email>\n>     To: Philip Oakley <philipoakley@iee.email>\n>     Subject: [PATCH 0/1] *** Test Names ***\n>     Date: Sat, 16 Apr 2022 09:54:00 +0100\n>     Message-Id: <20220416085400.277-1-philipoakley@iee.email>\n>     X-Mailer: git-send-email 2.36.0.rc0.windows.1\n>     MIME-Version: 1.0\n>     Content-Transfer-Encoding: 8bit\n>\n>     Result: 250\n>     Net::SMTP=GLOB(0x800c16240)>>> QUIT\n>     Net::SMTP=GLOB(0x800c16240)<<< 221 2.0.0 cm4nec smtp.talktalk.net\n>     <http://smtp.talktalk.net>\n>     closing connection\n>\n>     phili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git\n>     (die_preserve_ggg)\n>\n>     ---\n>     [4]\n>     [sendemail \"TalkTalk\"]\n>         chainreplyto = false\n>         from = Philip Oakley <philipoakley@iee.email>\n>         suppressfrom = true\n>         smtpServer = smtp.talktalk.net <http://smtp.talktalk.net>\n>         smtpServerPort = 25\n>\n>     [5] Thunderbird (IMAP) Server Settings (gui)\n>     ServerName: imap.hosts.co.uk <http://imap.hosts.co.uk>\n>     ServerPort: 993\n>     UserName: iee.email\n>     ConnectionSecurity: SSL/TLS    [None|StartTLS|Ssl/tls]\n>     AuthMethod: NormalPass     \n>     [Normal|Encrypted|Kerebos/Gssapi|NTLM|TLScert|Oath2]\n>     --\n>     Thunderbird Outgoing SMPTP Server\n>     smtp.hosts.co.uk <http://smtp.hosts.co.uk>\n>     465\n>     SSL/TLS\n>     NormalPassword\n>     iee.email\n>\n>     [6] Git Build details\n>     phili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git\n>     $ git --version --build-options\n>     git version 2.36.0.rc0.windows.1\n>     cpu: x86_64\n>     built from commit: c61dcf9cfa725959a79a3fb61d63bc05cc13ac7a\n>     sizeof-long: 4\n>     sizeof-size_t: 8\n>     shell-path: /bin/sh\n>     feature: fsmonitor--daemon\n>\n>     phili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git\n>     $ cat /etc/install-options.txt\n>     Editor Option: Notepad++\n>     Custom Editor Path:\n>     Default Branch Option: main\n>     Path Option: Cmd\n>     SSH Option: OpenSSH\n>     Tortoise Option: false\n>     CURL Option: OpenSSL\n>     CRLF Option: CRLFAlways\n>     Bash Terminal Option: MinTTY\n>     Git Pull Behavior Option: Merge\n>     Use Credential Manager: Enabled\n>     Performance Tweaks FSCache: Enabled\n>     Enable Symlinks: Disabled\n>     Enable Pseudo Console Support: Disabled\n>     Enable FSMonitor: Disabled\n>\n>     [7] sendemail.identity now comes straight after the new safe.directory\n>     entry - serendipity ..\n>\n>     [8] Names domain smtp advice\n>     https://www.names.co.uk/support/articles/sending-emails-via-alternate-smtp-ports/\n>     [Use SSL/465]\n>\n>\n\n"},{"id":"454683","messageId":"a47aa216-958a-f8a9-e9bb-be6d56c05f2d@iee.email","threadId":"57742","inReplyTo":"2f8567f7-6d9c-e79b-9a05-7dd55cb40224@iee.email","subject":"Re: Setting up `send-email` for SSL, and then using GCM (Git Credential Manager)","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.email","sentAt":"2022-04-30T16:31:41Z","receivedAt":"2022-04-30T16:32:03Z","isPatch":false,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"A catch up email to report where I got to; some successes and some\nremaining todos.\nDetails in-line with original query.\n\nOn 16/04/2022 16:14, Philip Oakley wrote:\n> (added Git List back - should be non HTML now ;-)\n>\n> On 16/04/2022 15:49, Ævar Arnfjörð Bjarmason wrote:\n>> I'm on mobile so sorry for the off list HTML, but\n>> 1. No it doesn't have GCM integration.\n> Thanks for clarifying that.\n>\n>> 2. Have you tried debugging with e.g. stunnel and leaving the\n>> encryption out of git send email\n> Sounds useful. I hadn't realised what 'stunnel' did beforehand.. \n> Hopefully it'll let me see how the server that hosts my domain is\n> responding (or not).\n> At the moment I'm doing my investigation from my win10 machine...\nI didn't , in the end, use `stunnel`, but it looks like the right tool\nfor more detailed investigation.\n>\n>> 3. I find all things email so much less of a hassle by setting up a\n>> local \"open relay\" exim or other real MTA on my laptop.\n>>\n> I suspect (hope) that once I've cracked the access method to the remote\n> email server that I'll be able to set my gitconfig so that `send-email`\n> will Just Work(tm), minus the GCM aspiration ;-)\nEnded up using plain port 25 SMTP + pwd, which wasn't advertised as\navailable by my domain provider. Not the full solution but a start. At\nleast I now have a working `send-email` that is not locked to my home\nISP connection.\n>\n>> Maybe that helps, maybe not, it sidesteps your questions a bit, but\n>> maybe in a way where you won't need to worry about git send email.\n> It has been a help.\n>\n> Philip\n\nWhile intermittently trying stuff, I was also able to get the `git\nimap-send -v` settings to work (port 993). I did need to change the path\nto my 'Drafts' mailbox (it's not below 'Inbox.' in my Thunderbird). Only\ntested with `sslVerify = false`.\n\nThe `-v` did indicate that the GCM was being invoked, based on some\nwarning text but I haven't taken that further.\n\"warning: see https://aka.ms/gcm/autodetect for more information.\"\n>\n>> On Sat, Apr 16, 2022, 16:04 Philip Oakley <philipoakley@iee.email> wrote:\n>>\n>>     This maybe a wXYz-Problem. But I'm stuck at getting SSL to work with\n>>     `send-email`.\n>>\n>>     I'm trying to update both my home Windows PC (win10) and my Ubuntu\n>>     travel laptop (an old-Acer-i5) `send-email` setup/config to use my\n>>     personal email domain (with authentication), rather than my old\n>>     home ISP\n>>     locked (no auth) connection, but I'm struggling.\n>>\n>>     Z) Does the GCM (Git Credential Manager) integrate well with\n>>     send-email,\n>>     and what guidance is available for setting up and debugging the\n>>     `send-email` configuration?\nMaybe should raise an issue with GCM on supporting send-email and imap-send?\n>>     Y) It's not clear what I should see in the terminal window in either\n>>     Git-for-Windows or Ubuntu when testing the `git send-email` command -\n>>     without/with using GCM.\n>>\n>>     w) Some back story. I set up my existing telephone-line-locked home\n>>     send-email config many years ago around the time of dial-up/ADSL. My\n>>     router logs into my ISP giving me an open port 25 for SMTP (though\n>>     doesn't advertise that any more). My config for the ISP is simple,\n>>     needing only the `smtpServer, smtpServerPort`, and my `from,\n>>     suppressfrom, & chainreplyto` settings. It works for both the Win\n>>     PC and\n>>     my Ubuntu laptop, but I can only use this when at home.\n>>\n>>     I also have a personal email domain (iee.email) whose authentication\n>>     works with Thunderbird for the WinPC at home, and the Ubuntu laptop at\n>>     home and when away from home.  I'd like to be able to use `\n>>     send-email`\n>>     via the personal email domain on the laptop when away from home (final\n>>     goal), and also match that `send-email` use on the Win PC (which would\n>>     also allow easy switching ISP when needed).\nSo port 25 to the rescue as noted. Sufficient to do work.\n>>\n>>     X) Where I've reached. I've discovered `sendemail.identity`, so at\n>>     least\n>>     I can have both configurations available for selection [7]. I've added\n>>     the --smtp-debug=1` with little insight. I've hit a brick wall with\n>>     respect to establishing the connection (I think). It's not clear\n>>     if any\n>>     authentication (password stuff) has started.\n>>\n>>     I fail to get the \"<<<220 xxxxx   server ready\" reply that my ISP\n>>     identity gives, rather I get \"Net::SMTP: Net::Cmd::getline():\n>>     unexpected\n>>     EOF on command channel: Connection reset by peer ... Unable to\n>>     initialize SMTP properly. Check config and use --smtp-debug. VALUES:\n>>     server=smtp.hosts.co.uk <http://smtp.hosts.co.uk> encryption=\n>>     hello=localhost.localdomain port=465\"\n>>\n>>     I've added below the terminal responses [1,3] and extracts of the\n>>     config\n>>     [2,4] for my test 'cover-letter'. Plus my Thunderbird settings [5] for\n>>     comparison. Git build [6]. Domain provider advice [8].\n>>\n>>     Thoughts: Maybe the setting I need for `git-end-email` don't match\n>>     those\n>>     used by Thunderbird; Is there extra debug info if I set some extra\n>>     parameters. Maybe some other tool can provide insight into what's\n>>     failing?\n>>\n>>     Any suggestions?\n>>     --\n>>     Philip\n>>\n>>     [1] Failing case\n>>     phili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git\n>>     (die_preserve_ggg)\n>>     $ git send-email --identity=Names   --to=\"Philip Oakley\n>>     <philipoakley@iee.email>\" --smtp-debug=1  0000*.patch\n>>     0000-cover-letter.patch\n>>     Net::SMTP>>> Net::SMTP(3.13)\n>>     Net::SMTP>>>   Net::Cmd(3.13)\n>>     Net::SMTP>>>     Exporter(5.76)\n>>     Net::SMTP>>>   IO::Socket::IP(0.41)\n>>     Net::SMTP>>>     IO::Socket(1.46)\n>>     Net::SMTP>>>       IO::Handle(1.46)\n>>     Net::SMTP: Net::Cmd::getline(): unexpected EOF on command channel:\n>>     Connection reset by peer at C:/Program\n>>     Files/Git/mingw64/libexec/git-core\\git-send-email line 1698.\n\nI've still to delve into that part of the code. I'm cautious of it being\na bit of a tar pit when other solutions may be simpler (e.g. continuing\nwith the port 25 solution).\n\nThe choice of implicit vs explicit ssl is still something I haven't\nfully understood, though the explanation of the relationship between\nmethods at https://stackoverflow.com/a/29022120/717355 was useful. How\nthe implicit ssl is started is something I'm still unfamiliar with.\n>>     Unable to initialize SMTP properly. Check config and use --smtp-debug.\n>>     VALUES: server=smtp.hosts.co.uk <http://smtp.hosts.co.uk>\n>>     encryption= hello=localhost.localdomain\n>>     port=465 at C:/Program\n>>     Files/Git/mingw64/libexec/git-core\\git-send-email\n>>     line 1725.\n>>\n>>     phili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git\n>>     (die_preserve_ggg)\n>>\n>>     ---\n>>     [2]\n>>     [sendemail \"Names\"]\n>>         chainreplyto = false\n>>         from = Philip Oakley <philipoakley@iee.email>\n>>         suppressfrom = true\n>>         smtpServer = smtp.hosts.co.uk <http://smtp.hosts.co.uk>\n>>         smtpServerPort = 465\nport 25 works here!\n>>         smptEncryption = ssl\n>>         smtpUser = iee.email\n>>\n>>         smtpPass = <password>\n>>\n>>     ----------------------\n>>     [3] Existing (passing) case\n>>     phili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git\n>>     (die_preserve_ggg)\n>>     $ git send-email --identity=TalkTalk   --to=\"Philip Oakley\n>>     <philipoakley@iee.email>\" --smtp-debug=1  0000*.patch\n>>     0000-cover-letter.patch\n>>     Net::SMTP>>> Net::SMTP(3.13)\n>>     Net::SMTP>>>   Net::Cmd(3.13)\n>>     Net::SMTP>>>     Exporter(5.76)\n>>     Net::SMTP>>>   IO::Socket::IP(0.41)\n>>     Net::SMTP>>>     IO::Socket(1.46)\n>>     Net::SMTP>>>       IO::Handle(1.46)\n>>     Net::SMTP=GLOB(0x800c16240)<<< 220 cm4nec smtp.talktalk.net\n>>     <http://smtp.talktalk.net> ESMTP server\n>>     ready\n>>     Net::SMTP=GLOB(0x800c16240)>>> EHLO localhost.localdomain\n>>     Net::SMTP=GLOB(0x800c16240)<<< 250-cm4nec hello [84.13.159.41],\n>>     pleased\n>>     to meet you\n>>     Net::SMTP=GLOB(0x800c16240)<<< 250-HELP\n>>     Net::SMTP=GLOB(0x800c16240)<<< 250-SIZE 30000000\n>>     Net::SMTP=GLOB(0x800c16240)<<< 250-ENHANCEDSTATUSCODES\n>>     Net::SMTP=GLOB(0x800c16240)<<< 250-8BITMIME\n>>     Net::SMTP=GLOB(0x800c16240)<<< 250 OK\n>>     Net::SMTP=GLOB(0x800c16240)>>> MAIL FROM:<philipoakley@iee.email>\n>>     Net::SMTP=GLOB(0x800c16240)<<< 250 2.1.0 <philipoakley@iee.email>\n>>     sender ok\n>>     Net::SMTP=GLOB(0x800c16240)>>> RCPT TO:<philipoakley@iee.email>\n>>     Net::SMTP=GLOB(0x800c16240)<<< 250 2.1.5 <philipoakley@iee.email>\n>>     recipient ok\n>>     Net::SMTP=GLOB(0x800c16240)>>> DATA\n>>     Net::SMTP=GLOB(0x800c16240)<<< 354 OK\n>>     Net::SMTP=GLOB(0x800c16240)>>> From: Philip Oakley\n>>     <philipoakley@iee.email>\n>>     Net::SMTP=GLOB(0x800c16240)>>> To: Philip Oakley\n>>     <philipoakley@iee.email>\n>>     Net::SMTP=GLOB(0x800c16240)>>> Subject: [PATCH 0/1] *** Test Names ***\n>>     Net::SMTP=GLOB(0x800c16240)>>> Date: Sat, 16 Apr 2022 09:54:00 +0100\n>>     Net::SMTP=GLOB(0x800c16240)>>> Message-Id:\n>>     <20220416085400.277-1-philipoakley@iee.email>\n>>     Net::SMTP=GLOB(0x800c16240)>>> X-Mailer: git-send-email\n>>     2.36.0.rc0.windows.1\n>>     Net::SMTP=GLOB(0x800c16240)>>> MIME-Version: 1.0\n>>     Net::SMTP=GLOB(0x800c16240)>>> Content-Transfer-Encoding: 8bit\n>>     Net::SMTP=GLOB(0x800c16240)>>> *** Test BLURB  ***\n>>     [...]\n>>     Net::SMTP=GLOB(0x800c16240)>>> 2.36.0.rc0.windows.1\n>>     Net::SMTP=GLOB(0x800c16240)>>> .\n>>     Net::SMTP=GLOB(0x800c16240)<<< 250 2.0.0 feC1ntahZW5NofeC1ntcj4 mail\n>>     accepted for delivery\n>>     OK. Log says:\n>>     Server: smtp.talktalk.net <http://smtp.talktalk.net>\n>>     MAIL FROM:<philipoakley@iee.email>\n>>     RCPT TO:<philipoakley@iee.email>\n>>     From: Philip Oakley <philipoakley@iee.email>\n>>     To: Philip Oakley <philipoakley@iee.email>\n>>     Subject: [PATCH 0/1] *** Test Names ***\n>>     Date: Sat, 16 Apr 2022 09:54:00 +0100\n>>     Message-Id: <20220416085400.277-1-philipoakley@iee.email>\n>>     X-Mailer: git-send-email 2.36.0.rc0.windows.1\n>>     MIME-Version: 1.0\n>>     Content-Transfer-Encoding: 8bit\n>>\n>>     Result: 250\n>>     Net::SMTP=GLOB(0x800c16240)>>> QUIT\n>>     Net::SMTP=GLOB(0x800c16240)<<< 221 2.0.0 cm4nec smtp.talktalk.net\n>>     <http://smtp.talktalk.net>\n>>     closing connection\n>>\n>>     phili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git\n>>     (die_preserve_ggg)\n>>\n>>     ---\n>>     [4]\n>>     [sendemail \"TalkTalk\"]\n>>         chainreplyto = false\n>>         from = Philip Oakley <philipoakley@iee.email>\n>>         suppressfrom = true\n>>         smtpServer = smtp.talktalk.net <http://smtp.talktalk.net>\n>>         smtpServerPort = 25\n>>\n>>     [5] Thunderbird (IMAP) Server Settings (gui)\n>>     ServerName: imap.hosts.co.uk <http://imap.hosts.co.uk>\n>>     ServerPort: 993\n>>     UserName: iee.email\n>>     ConnectionSecurity: SSL/TLS    [None|StartTLS|Ssl/tls]\n>>     AuthMethod: NormalPass     \n>>     [Normal|Encrypted|Kerebos/Gssapi|NTLM|TLScert|Oath2]\n>>     --\n>>     Thunderbird Outgoing SMPTP Server\n>>     smtp.hosts.co.uk <http://smtp.hosts.co.uk>\n>>     465\n>>     SSL/TLS\n>>     NormalPassword\n>>     iee.email\n>>\n>>     [6] Git Build details\n>>     phili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git\n>>     $ git --version --build-options\n>>     git version 2.36.0.rc0.windows.1\n>>     cpu: x86_64\n>>     built from commit: c61dcf9cfa725959a79a3fb61d63bc05cc13ac7a\n>>     sizeof-long: 4\n>>     sizeof-size_t: 8\n>>     shell-path: /bin/sh\n>>     feature: fsmonitor--daemon\n>>\n>>     phili@Philip-Win10 MINGW64 /c/git-sdk-64/usr/src/git\n>>     $ cat /etc/install-options.txt\n>>     Editor Option: Notepad++\n>>     Custom Editor Path:\n>>     Default Branch Option: main\n>>     Path Option: Cmd\n>>     SSH Option: OpenSSH\n>>     Tortoise Option: false\n>>     CURL Option: OpenSSL\n>>     CRLF Option: CRLFAlways\n>>     Bash Terminal Option: MinTTY\n>>     Git Pull Behavior Option: Merge\n>>     Use Credential Manager: Enabled\n>>     Performance Tweaks FSCache: Enabled\n>>     Enable Symlinks: Disabled\n>>     Enable Pseudo Console Support: Disabled\n>>     Enable FSMonitor: Disabled\n>>\n>>     [7] sendemail.identity now comes straight after the new safe.directory\n>>     entry - serendipity ..\n>>\n>>     [8] Names domain smtp advice\n>>     https://www.names.co.uk/support/articles/sending-emails-via-alternate-smtp-ports/\n>>     [Use SSL/465]\n>>\n>>\n--\nPhilip\n"}]}