reddit / emacs

HELP mbsync setup on mac failing to login (super basic cleartext send)

ImportanceFit1412 · 2022-11-11 18:25
UPDATE: You can see the quote below, but looks like google got rid of apps that sign in with "only username and password." So, wtf aside, what's the technique then? (looks like they didn't break legacy so this will only affect new setups). Thanks again. &#x200B; To eliminate possibilities and simplify I'm just sending my password in Pass "" in the .mbsyncrc. Everything installed via homebrew on mac. (following the System Crafters youtube setup instructions). The first error was: \--------- ... Connection is now encrypted Logging in... Authenticating with SASL mechanism PLAIN-CLIENTTOKEN... Error performing SASL authentication step: SASL(-7): invalid parameter supplied: Parameter Error in /System/Volumes/Data/SWE/macOS/BuildRoots/d7e177bcf5/Library/Caches/com.apple.xbs/Sources/passwordserver\_saslplugins/passwordserver\_saslplugins-194/plain\_clienttoken.c near line 195 C: 1/1 B: 0/0 F: +0/0 \*0/0 #0/0 N: +0/0 \*0/0 #0/0 \------------ From ([https://macowners.club/posts/email-emacs-mu4e-macos/](https://macowners.club/posts/email-emacs-mu4e-macos/)) I added AuthMechs PLAIN to the .mbsynrc file (also tried adding SSLVersions and SystemCertificates no). After that the error is just: Connection is now encrypted Logging in... Authenticating with SASL mechanism PLAIN... IMAP command 'AUTHENTICATE PLAIN <authdata>' returned an error: NO \[AUTHENTICATIONFAILED\] Invalid credentials (Failure) C: 1/1 B: 0/0 F: +0/0 \*0/0 #0/0 N: +0/0 \*0/0 #0/0 \------\_ But the password is verified correct so I'm very confused to be stuck so early. Thank for any light you can shed on this (or if maybe there is a better place to post this... its all about getting email into emacs). I also used the info in the mac link above to export my certificates for a root certificate, don't know if that would be related since I never quite groked certs. &#x200B; Thanks.
FrostyX_cz · 2022-11-11 18:34
I think we will need to see your `.mbsyncrc` to be able to help. (don't forget to redact your passwords and other private information)
ImportanceFit1412 · 2022-11-11 20:02
Sounds good... here you go: (spent way too long trying to be able to cut/paste into a code block and get line feeds preserved, didn't even work from textEdit. So I added the returns manually below, which seems odd, no whitespace even between blocks) IMAPAccount gmail Host imap.gmail.com User redacted@gmail.com Pass "redacte_pw" Port 993 SSLType IMAPS #from macowners club post https://macowners.club/posts/email-emacs-mu4e-macos/ SSLVersions TLSv1.2 AuthMechs PLAIN SystemCertificates no #end #CertificateFile /etc/ssl/certs/ca-certificates.crt CertificateFile ~/.maildir/certs/root-certificates.pem IMAPStore gmail-remote Account gmail MaildirStore gmail-local Subfolders Verbatim Path ~/.maildir/gmailJG Inbox ~/.maildir/gmailJG/Inbox Channel gmail Master :gmail-remote: Slave :gmail-local: Patterns * ![Gmail]* "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail" "[Gmail]/Trash" Create Both #macowners s# etup doesnt have above but instead.. # Create Near # Sync All # Expunge Both #end SyncState * # to get root cert on mac... # Open the Application Keychain Access.app # Select System Roots in the sidebar # Select all items listen here – ⌘ + a # Export the items with ⇧ + ⌘ + e to the file ~/.maildir/certificates/root-certificates.pem That's it. The code error gets hit from commenting out the AuthMechs line above (which the video of a unix install doesn't have). Adding the plain auth just gives a bad pw error. &#x200B; Thanks for any help.
FrostyX_cz · 2022-11-11 20:12
Recently, after months of struggle, I wrote a blog post specifically about `mbsync` and Gmail. Please take a look, hopefully, it will help. http://frostyx.cz/posts/synchronize-your-2fa-gmail-with-mbsync
ImportanceFit1412 · 2022-11-11 20:16
Ok... so I found reference to turning on "less secure apps" for gmail, And following that up found... &#x200B; > To help keep your account secure, from May 30, 2022, ​​Google no longer supports the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password. Important: This deadline does not apply to Google Workspace or Google Cloud Identity customers. The enforcement date for these customers will be announced on the Workspace blog at a later date. &#x200B; They haven't broken everyone yet but the check is in the mail. It suggests turning it off if you have it left on from a previous setup. So...... now what?!? If you can't lose the username and password method I'm at a loss.
FrostyX_cz · 2022-11-11 20:42
Why can't you turn on 2FA and generate an App password, as I do in the blog post?
ImportanceFit1412 · 2022-11-11 21:36
You dah man!!!! Yep, the app password dance did the trick. Now new weirdness from my actual rc file: There is the .maildir/gmailJG/ but now also a .maildir/gmailJG\[Gmail\]. gmailJG has Inbox under it and the other has All Mail, Sent Mail, Starred and Trash. Both have some cur, new, and tmp dirs underneath. Any tips on this one? The backslash mania makes my head explode... I'll try to remap all dirs to single word dirs with no spaces. &#x200B; Thanks again. Actual progress.
ImportanceFit1412 · 2022-11-11 21:37
I did, old response was before I saw the blog post. Thanks again.
FrostyX_cz · 2022-11-11 21:41
Aha, sorry. I didn't realize that.
ImportanceFit1412 · 2022-11-11 22:57
Hmmm... choking on everything but Inbox... any ideas? Synchronizing...C: 0/1 B: 1/5 F: +0/0 \*0/0 #0/0 N: +0/0 \*0/0 #0/0Opening far side box \[Gmail\]/All Mail...Opening near side box \[Gmail\]/All Mail...Error: channel gmail: near side box \[Gmail\]/All Mail cannot be opened.C: 0/1 B: 2/5 F: +0/0 \*0/0 #0/0 N: +0/0 \*0/0 #0/0Opening far side box \[Gmail\]/Sent Mail...Opening near side box \[Gmail\]/Sent Mail...Error: channel gmail: near side box \[Gmail\]/Sent Mail cannot be opened.C: 0/1 B: 3/5 F: +0/0 \*0/0 #0/0 N: +0/0 \*0/0 #0/0Opening far side box \[Gmail\]/Starred...Opening near side box \[Gmail\]/Starred...Error: channel gmail: near side box \[Gmail\]/Starred cannot be opened.C: 0/1 B: 4/5 F: +0/0 \*0/0 #0/0 N: +0/0 \*0/0 #0/0Opening far side box \[Gmail\]/Trash...Opening near side box \[Gmail\]/Trash...Error: channel gmail: near side box \[Gmail\]/Trash cannot be opened.C: 1/1 B: 5/5 F: +0/0 \*0/0 #0/0 N: +0/0 \*0/0 #0/0
ImportanceFit1412 · 2022-11-11 23:05
I guess that video is just to old to be a guide. mu changed how it works too? This seems like a fragile setup if all the helper apps just change interface often.... &#x200B; \~/.maildir $ mu index --maildir=\~/.maildir/ --my-address=[redacted@gmail.comNOTE](mailto:redacted@gmail.comNOTE): as of mu 1.3.8, 'mu index' no longer uses the--maildir/-m or --my-address options.Instead, these options should be passed to 'mu init'.See the mu-init(1) or the mu4e reference manual,'Initializing the message store' for details.error: /Users/..>/.cache/mu/xapian/iamglass: Failed to open glass revision file for reading
ImportanceFit1412 · 2022-11-12 02:08
Need trailing / at the end of path. lol.