mirror of
https://github.com/d99kris/nmail.git
synced 2026-04-26 17:56:00 +03:00
[GH-ISSUE #57] Are gmail "app passwords" supported? #53
Labels
No labels
bug
enhancement
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nmail#53
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sc0ttj on GitHub (Nov 15, 2020).
Original GitHub issue: https://github.com/d99kris/nmail/issues/57
Originally assigned to: @d99kris on GitHub.
Is it possible to use 2FA Gmail with
nmail? ... I setup my Gmail, create an "App password", which you give your app instead of your password, if using 2FA, and it doesn't work..https://support.google.com/accounts/answer/185833?hl=en-GB
To be specific: I can see my emails, I can read emails, but I cannot delete them, or send them .. I am able to create drafts, which end up in the drafts folder (can see them in my browser), but they won't send from
nmail..Is this related to the fact I'm using 2FA with an "App password"? My SMTP settings seem to be OK..
@d99kris commented on GitHub (Nov 16, 2020):
Hi @sc0ttj - yes, GMail "app passwords" should work. I set up 2FA and generated an app password for one of my GMail accounts just now, and it works fine with
nmail(reading, deleting, moving, composing, sending) for me.I'll add some note about GMail app passwords to the README to make it clear for future users.
Regarding your issues, it almost seems as if you have "read-only" access - although I am not aware if there are such types of restricted GMail app passwords.
To create the app password I assume you used https://myaccount.google.com/apppasswords from a web browser and selected app "Mail"? Are you using
nmailfrom the same machine / public IP address, or different?For
nmailsetup / configuration, did you use the built-in setup wizardnmail -s gmail?Are you getting any error message in the UI (bottom of screen) when trying to delete an email for example?
One troubleshooting step could be to try using the same app password with another email client, like Thunderbird, and see if everything is working there?
Another option would be to run
nmail --verboseand try sending an email and deleting an email, and then sharing the~/.nmail/log.txtwith me (d99kris at gmail dot com).FWIW - I am using
nmailwith my primary GMail account, under both macOS Catalina and Ubuntu 20.04, on daily basis with no IMAP or SMTP issues.@sc0ttj commented on GitHub (Nov 16, 2020):
Thanks for getting back to me... I have managed to send/delete emails with other clients, so have sent u an email with some extra info.
@d99kris commented on GitHub (Nov 17, 2020):
Hi @sc0ttj - thanks for sharing the log-file. I can see that there's a mismatch between what
nmailthinks your trash-folder is named ([Gmail]/Trash) vs. its actual name ([Gmail]/Bin). Please try edit your~/.nmail/main.confand change the linetrash=[Gmail]/Trashto
trash=[Gmail]/BinThis should fix the deletion issue.
As for the sending issue I am not sure yet. I can tell from the log that you're running
fossapup64 9.5. Could you please help share the steps you took to install the nmail dependencies?I tried finding some info on puppy linux package management, but it seems there are many ways to install software. I figure I'll be more lucky in reproducing the issue if I install the dependencies the same way as you.
@sc0ttj commented on GitHub (Nov 17, 2020):
Thanks, I renamed the Trash folder in my nmail config, and can delete emails now..
...As for the rest:
I installed the deps using Pkg, but they could also be installed using the default package manager (a GUI program called 'Puppy Package Manager'.. in Menu -> Setup -> Puppy Package Manager).
Here's the output if me (re)installing the deps:
Here's a list of the relevant installed packages:
Note, these are standard Ubuntu .deb packages from the Ubuntu focal repos..
..and the output of using
cmake, from the 'build' dir:Thanks
@d99kris commented on GitHub (Nov 18, 2020):
Thanks a lot for the detailed information! Very useful!
Could you try installing the following package, then start nmail and try send an email again:
Please let me know if it fixes the issue. Later I'll see how I can improve documentation or UI to cover this indirect dependency.
@d99kris commented on GitHub (Nov 18, 2020):
Leaving the issue open until confirmed fixes the problem.
@sc0ttj commented on GitHub (Nov 19, 2020):
I installed the dep, which was indeed not yet installed... Unfortunately, it still did not send the email..
I ran nmail with
-ee, and have the logs from when i tried to send.. If they're of any use to you?Full disclosure, I'm using a VPN, but this didn't stop claws-mail or aerc from sending emails OK..
@d99kris commented on GitHub (Nov 19, 2020):
That is quite odd. I was able to reproduce your issue under
fossapup64 9.5until I installed the modules. I might've run the command:but as far as I could tell it installed the libsasl2-modules package, which is the important part.
I'm preparing a new version of
nmailwhich will have it query libsasl2 for system installed authentication mechanisms and log it to the log file, but it's not ready yet. Meanwhile, yeah the extended verbosity log would be interesting to see, thanks.@d99kris commented on GitHub (Nov 19, 2020):
VPN should not be an issue (as it's working fine with other email clients like you mentioned).
@sc0ttj commented on GitHub (Nov 19, 2020):
Good news! I found a bug in my system (dpkg-deb related, specifically "pkgbinarymangler") that prevented the
libsasl2package from working OK once installed..I fixed that, re-ran
pkg add libsasl2-modules_2.1.27+dfsg-2, and openednmail..I sent an email .. Didn't get any error message, checked with recipient, they received it OK.
So looks like the problem was indeed that my system did not have
libsasl2-modules_2.1.27installed.. Now that it is (finally) installed, I'm happy to saynmailworks for sending, receiving and deleting emails.Thanks for all your help! Sorry for the troubles..
@d99kris commented on GitHub (Nov 19, 2020):
That's great to hear! Thanks for the update. I will close this issue for now.