In 2022 I wrote about
Sending Mail via Gmail using OAuth2.
But it turned out that Google expires OAuth2 tokens on a weekly basis.
So if you use that method, once a week you'll have to bring up a browser,
log in to your Google account and go through the five or so pages of
re-authorizing. Which will invariably happen when you're in a hurry
and just wanted to send a quick email so you can move on to other things.
However, it turns out there's an easier way, which apparently doesn't
expire: App passwords. I switched to using app passwords back then
(I've been using that app password since then),
and I even wrote it up, and then forgot to post it. What a dingbat!
But I changed my GMail password recently, and it turns out when you change
your Gmail account password, Google revokes all app passwords you've
set up (and, of course, doesn't bother to tell you that, and the
error message you get when you try to sign in with the old app password
has nothing whatever to do with the actual problem, which is that your
app password has been revoked and you need to create a new one).
So I dug out this old never-got-posted article and used it to
make a new app password, and have updated the parts that were a little
out of date.
Read more ...
Tags: email, mutt, gmail
[
20:32 Mar 29, 2024
More tech/email |
permalink to this entry |
]
Update: Google's OAuth2 turns out to be not a good way to send mail,
because passwords have to be renewed weekly. So you probably want to
use a
GMail App Password
instead. I'm leaving this article up in case there's some reason someone
would actually want to use OAuth2 with GMail.
There's been lots of talk on mailing lists for various mail programs,
like Alpine and Mutt,
about Google's impending dropping of password access.
Although my regular email address is on a Linux server, I subscribe
to several Google Groups. I use a gmail address for those, because
Google Groups doesn't work well with non-gmail addresses (you can't
view the archives or temporarily turn off mail, and unsubscribing
may or may not work depending on the phase of the moon).
I prefer not to have to sign on to Google and use the clunky browser
interface when I have a perfectly good mailer (I use mutt) on my computer.
I send mail from mutt using a program called msmtp.
But to post to a Google Group, I need to use Google's SMTP server.
(SMTP is the Simple Mail Transfer Protocol,
the way mail gets from one computer to another across the internet.)
Up to now, I've been using an msmtp configuration that includes my
Gmail password. That requires clicking through several Gmail pages to
enable the "Less Secure Apps" setting. Google resets that preference
every month or so and I have to go find the "Less Secure Apps" page to
click through the screens again; but aside from that, it works okay.
But now Google has announced they'll be
removing
support for password access on May 30, 2022.
Read more ...
Tags: email, mutt, gmail, oauth
[
00:00 May 20, 2022
More tech/email |
permalink to this entry |
]