Tip: unsubscribing from GitHub notifications from within mutt

2023-09-12 Thread Sébastien Hinderer
Dear all,

Here is something I have been wanting for a long time.

For those who don't know, the email notifications sent by GitHub do have
all the information to unsubscribe from the corresponding thread in
their header, not only as the href of a link of their HTML attachment.

This little script, stored as ~/bin/github-unsubscribe, extracts the
unsubscription URL from the email header andpasses it to curl, which is
enough to be unsubscribed, no Javascript is required for this to work.
Here is the script:

```

#!/bin/sh
# Unsubscribe from a GitHub notification
url=`grep https://github.com/notifications/unsubscribe/ - | \
sed -e 's///g'`
curl -s $url > /dev/null 2>&1
```

And then the mutt macro to invoke that script from the index  and pager:

# Unsubscribe from GitHub notifications

macro index,pager "," "github-unsubscribe\n" "Unsubscribe from 
GitHub notifications"

Enjoy,

Seb.


Re: Scheduling deferred sending of emails

2023-07-31 Thread Sébastien Hinderer
Dear Jakub,

Jakub Jindra via Mutt-users (2023/07/31 08:50 +0200):
> I remember replying to a similar post on Unix Stackexchange in the past:
> https://unix.stackexchange.com/a/554369/85046

That sounds like a very cool starting point, thanks!

AIUI it uses MSMTP as an intermediate queuing system.

I'm guessing that the system can be made so that eachmessage, based on
its id, has a different scheduled send time.

The thing I am not sure about with such a setting is what the date of
the message willbe. For me, it should be the date when the message is
sent, not the date when I really wrote it.

BTW perhpas it's possible to use Mutt's postponed folder as the local
queue. Say a cron dameon scans this directory regularly. It should deal
only with messages that have a special header saying they are enqueued.
Another header says at which date they should be sent. If that date has
arrived then the script strips these two headers and runs mutt normally
to send themessage. Sometiing like that.

Best wishes,

Seb.


Re: Scheduling deferred sending of emails

2023-07-29 Thread Sébastien Hinderer
Many thanks, Claus. I'll definitely investigate these ideas and see how
they map or don't map in Exim terminology. Will report back here in any
case.


Re: Scheduling deferred sending of emails

2023-07-29 Thread Sébastien Hinderer
Christopher Zimmermann (2023/07/29 12:55 +0200):
> I'm pretty sure this feature is only implemented in the MUA, not the MTA.
> Therefore if the MUA is offline at the time of the scheduled dispatch, the
> mail will be delayed longer.

Yeah that's why I had the idea of doing it in the MTA because it is more
likely to be running at the givne time, although that's not qguaranteed
either if it's on a laptop, say, the laptop may be turned off at that
time. But the givne time can be a minimal, meaning wait at least until
that time.

> In a unix environment you could accomplish such a task using a cronjob via
> at(1).

Yeah that's what I started to think. For instance, there could be a fake
sendmail that would be called in place of the real one, on deferred
message. That fake sendmail would store the messages somewhere and then
another process owuld check that somewhere regularly andi, if time has
arrived to send an email, it wouldsend it. And that would be a cron or
something. But that's where it felt to me that this logic is very
similar to the one implemented in a MTA and I saw is as kind of a design
smell saying thisis not the right way to go andrather try to have this
implemented in an existing MTA. I wish they were not so much beyond
me...

Seb.


Re: Unsubscribing from GitHub notifications from mutt

2023-07-29 Thread Sébastien Hinderer
Kevin J. McCarthy (2023/07/29 18:07 +0800):
> On Sat, Jul 29, 2023 at 11:38:00AM +0200, Sébastien Hinderer wrote:
> > Has anybody already set-up such a feature? Would be interested in the
> > details on (1) then.
> 
> If you don't mind using the mailto URL, Mutt 2.1+ has , bound
> to 'Esc-L' by default.

I'll certainly give it a try! Thanks!

I thiink what will matter to me, then, is to _not_ receive a
confirmation by email that the subscription has been taken into account,
because then this would mean havingto do some more processing later,
even if that processing boils down to deleting the confirmation email.

Doing it by email also feels a bit more involved because it relies on
other machines and it "leaks" informaiton that could be not leaking.

Seb.


Scheduling deferred sending of emails

2023-07-29 Thread Sébastien Hinderer
Dear all,

I would like to be able to respond to emails quickly to have it done but
defer the actual sending of the response to slow down conversations.
Ideally at the moment of sending I would specify a date and time after
which I am fine with the mail being sent. For example, I respond to an
email on Friday afternoon but can express that I want it to be actually
sent anytime after next Monday 9pm. That could be by adding a special
header to the email or by responding to questions at send time, I don't
mind and it's not really the usesr interface I'd like to discuss here.

What I rather would like to discuss is rather whether and how this could
be implemented in the MUA/MTA framework mutt belongs to. I believe that
more integrated solutions like Thunderbird do have such scheduled
deferred sending features, but I have no idea how this can be achieved in
presence of both an MUA and an MTA because the feature seems to be at
the interface between the two: there needs to be a way for the MUA to
tell the MTA about the deferred sending and of course the MTA does not
only need to undestand it, it also needs to actually implement it.

I had a superficial look to exim4 which I use as an MTA but didn't find
anything related, but perhaps my search has been too shallow.

I also considered adding another MTA between mutt and Exim4 which would
keep the deferred mails until the scheduled date and pass them to Exim4
only at that moment but it felt a bit a pity to have to use one
dedicated software component just for that as, I assume, it would
widely resemble a traditional MTA, having a lot in common with it.

Any idea will be more than welcome.

Best wishes,

Seb.


Unsubscribing from GitHub notifications from mutt

2023-07-29 Thread Sébastien Hinderer
Dear all,

I would like to be able to unscribe from GitHub threads directly from
within mutt (the index, say).

I noticed that the emails sent by GitHubcontain this Header:

List-Unsubscribe:
,


So there seem to be two steps to be able to unsubscribe form a GitHub
thread from within mutt: (1) extracting the  URL from the message, which
should not be too hard, and (2) querying this URL. I thought (2) is going
to be hard because I expected it to require an interpreter of the URL
that can run javascript but I just tried to pass such an URL to wget and
it seems it has been enough to get me unsubscribed.

Has anybody already set-up such a feature? Would be interested in the
details on (1) then.

Many thanks in advance for any comment on any aspect of the question
that comes to anybody's mind, divagations welcome.

Seb.


PLAIN auth mechanism fails with outlook.office365.com imap server

2023-04-13 Thread Sébastien Hinderer
Dear all,

I am unfortunate enough to have to use an Office365 e-mail account.

I am told by its sysadmin that IMAP support is enabled.

I am using mutt version 2.2.9-1+b1 (Debian).

When trying to authenticate, the only mechanism mutt and the server have
in common is PLAIN, which is not ideal but tolerable since the
transaction happens over an encrypted layer.

However the PLAIN method fails and I can't understand why.

Here is the relevant bit of ~/.muttdebug0:

4< * CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS ID 
UNSELECT CHILDREN IDLE NAMESPACE LITERAL+
Handling CAPABILITY
4< a OK CAPABILITY completed.
IMAP queue drained
imap_authenticate: Using any available method.
imap_auth_gsasl: using mech PLAIN
Authentification (PLAIN)...
4> a0001 AUTHENTICATE [...]
4< a0001 NO AUTHENTICATE failed.
IMAP queue drained
imap_auth_gsasl: PLAIN failed

I don't know how to proceed from here. I really would like PLAIN to work
because the only other mechanism supported is XAUTH2, which feels like a
hell.

Am I correct in trusting the sysadmin that IMAP support is indeed enabled
for this account?

If the problem would be an incorrect password, would that be written
explicitly in the debug output, or would I get this error message and no
more details?

Many thanks for any help and please, keep mutt going because it's
awesome.

Sébastien.


Re: Incompatible IMAP authentication methods

2023-04-10 Thread Sébastien Hinderer
Dear Kira and Ranjan,

Many thanks to the  two of you for your OAuth2-related pointers.

I can definitely give them a try but I first would like to see why
thePLAIN method seems actually not towork.

Has anyone an idea on how to debug this, please?

Plenty of thanks in advance,

Sébastien.

Kira Oakley (2023/03/18 08:25 -0700):
> On 03/18  08:41, Sébastien Hinderer wrote:
> > I did try fetchmail but it segfaulted. I don't know how I should proceed
> > from here. Any suggestion welcome.
> 
> I saw this article on XOAUTH2 with mutt. I haven't tried it, but it
> might be of help:
> 
> https://www.dcs.gla.ac.uk/~jacobd/posts/2022/03/configure-mutt-to-work-with-oauth-20/
> 
> ~ Kira
> 


Re: Incompatible IMAP authentication methods

2023-03-18 Thread Sébastien Hinderer
Hi Kevin, many thanks for your repsonse!

Kevin J. McCarthy (2023/03/17 19:31 -0700):
> On Fri, Mar 17, 2023 at 11:53:05PM +0100, Sébastien Hinderer wrote:
> > I am trying to read emails on an exchange server through IMAP.
> > 
> > The server only accepts the PLAIN and XOAUTH2 authentication methods,
> > whereas mutt offers SASL, GSSAPI, CRAM-MD5 et LOGIN.
> 
> When compiled with SASL support (either GNU or Cyrus), Mutt can use the
> PLAIN authentication method provided by the library.
> 
> Try setting imap_authenticators='plain' and see if that works.

I updated mutt and it seems that the PLAIN method is now available but,
for a reason that is not logged when mutt is run with -d2, it is tried
but fails:

imap_authenticate: Using any available method.
imap_auth_gsasl: using mech PLAIN
Authentification (PLAIN)...
4> a0001 AUTHENTICATE PLAIN [long-string]
4< a0001 NO AUTHENTICATE failed.

imap_auth_gsasl: PLAIN failed

I did try fetchmail but it segfaulted. I don't know how I should proceed
from here. Any suggestion welcome.

Sébastien.


Incompatible IMAP authentication methods

2023-03-17 Thread Sébastien Hinderer
Dear all,

I am trying to read emails on an exchange server through IMAP.

The server only accepts the PLAIN and XOAUTH2 authentication methods,
whereas mutt offers SASL, GSSAPI, CRAM-MD5 et LOGIN.

Since there is no authentication method in common they can not
come to an agreement.

Given that I don't have much hope to have the server support more
authentication methods than it does, would there be a hope for
mutt to support more authenticaiton methods? In particular,
wouldn't it be possible to have mutt support the PLAIN method
since the transaction takes place over imaps so the passwords
won't be sent in clear text anyway?

How about the XOAUTH2 way? Last time I tried it was an epic fail but perhaps I 
did things in a wrong way and it's a genuine possibility?

Any help warmly appreciated.

Sébastien.


Re: Re: Re: Re: Loading several intialisation files at startup

2022-09-15 Thread Sébastien Hinderer
Jan Eden via Mutt-users (2022/09/15 21:39 +0200):
> > I think what I described in the first e-mail would allow you to have
> > only one file per account and to not repeat the line, no?
> 
> Right, I misread your initial request. Sorry!

No problem. Seeing your macros will a source of inspiraiton so thanks
for that!

Sébastien.


Re: Re: Re: Loading several intialisation files at startup

2022-09-15 Thread Sébastien Hinderer
Jan,

I think I got it.

Am I correct that, for each account, you have actually two files: one
that you use in your alias and one that you use in your macro. Is that
right?

I think what I described in the first e-mail would allow you to have
only one file per account and to not repeat the line, no?

Cheers,

Sébastien.


Re: Re: Loading several intialisation files at startup

2022-09-15 Thread Sébastien Hinderer
Hello Jan, thanks a lot for your response and the link!

Jan Eden via Mutt-users (2022/09/15 11:42 +0200):
> I defined aliases for my accounts in .zshrc, because I do not mind
> restarting mutt when switching to a different account:
> 
> alias m1='cd ~/Downloads && /opt/homebrew/bin/mutt -F ~/.mutt/account1.cf && 
> cd'
> alias m2='cd ~/Downloads && /opt/homebrew/bin/mutt -F
> ~/.mutt/account2.cf && cd'

That's what I am doing currently, yse. But then, am I correct that each
of your account.cf file needs to source the main configuration file to
get the default values in? Precisely, it's the repetition of this line
that I wanted to avoid. Plus, that way, when you change configuraiton
interactively, all the common settings are read in again useessly. It's
cheap of course but I'de still like to avoid it.

Cheers,

Sébastien.


Re: Loading several intialisation files at startup

2022-09-15 Thread Sébastien Hinderer
Hello,

Many thanks for your reponse!

Cameron Simpson (2022/09/15 08:27 +1000):
> I thought the common approach was what you next outline: a single muttrc
> which sources the appropriate account-specific muttrc.

[...]

For files that define different thisgs yes, that works. But for
accounts, which have different values for the smae variables, I think
you don't want to include all them simultaneously, because then the last
one would win, but you want to source exactly one of them. And then if
you wnat to change accout without leaving mutt you just source another
one...

Do I make sense?

Sébastien.


Loading several intialisation files at startup

2022-09-13 Thread Sébastien Hinderer
Dear all,

I would like to have a nice way to deal with several accounts in mutt. I
am talking just about the .muttrc file aspect here.

My present configuration is that each account has its own muttrc file
which sources a common one.

I find it a pity to repeat the source main-mutt-config-file line in each
account-file and also, I would like to be able to load just the file
specific to an account (without leaving mutt) without reloading the main
configuration file each time.

So my idea would be to have the main configuration file, with no account
information, and then, besides to it, one file per account.

then at startup I had the idea to load (1) the main configuration file
and (2) an acocunt specifile. I could then define macros for each
account that would source the specified account file.

But, at startup, the -F option can be specified only once. If specified
several times, only the last one is taken into account.

One way around would be to use -E 'source account-file' but is that the
recommended solution or are there better known alternatives?

Wouldn't be nice to be able to specify -F several times and to have the
files given as arguemnts to it sourced in the order specified on the
command-line?

thanks for your thoughts,

Sébastien.


Re: Using several SMTP servers

2022-08-12 Thread Sébastien Hinderer
Hey Sam, many thanks, again, for your response,

Sam Kuper (2022/08/12 19:56 +):
> CASE 1
> 
> IIRC, msmtp can be configured to use a different smarthost per *email
> address*.  (To emphasise: you would set that up in msmtp's config, not
> in msmtp-queue's config.  msmtp-queue doesn't really have or need much
> configuration.)  So, if that's what you meant, then yes, it's possible.
> 
> 
> CASE 2

I am definitely in that case. Thanks for having raised the point,
because it was obvious to me but, fortunately for everybody, not
everybody is living in my head.

As I see it, the SMTP configuration to use is fully determined by the
from address of the mail to be sent.

> If, instead, you want to be able to choose, per outgoing *email* (rather
> than per *email address* of yours), which smarthost to use, then I think
> you would have to either:
> 
> -   write a wrapper for msmtp-queue to give you an interactive menu for
> choosing which smarthost to use for each outgoing email you send, or
> 
> -   rewrite your installed msmtp-queue script to give you such a menu.

Again, as I see it, there shouldn't be any need for interactivity. For
each outoging mail, pick up the right SMTP config based on who (which
address) is sending (From header). As simple as that, I think.

And, thanks a lot for the idea of installing msmtp manally rather than
through the package manager. It should be possible, I think, to handle
it with the package manager, because manually installing is a pain, but
as long as it's not, that sounds like a good idea.

Once I'll have everything set-up, if I manage to, I'll report here,
either in this thread, or in a dedicated one.

Cheers,

Sébastien.


Re: Using several SMTP servers

2022-08-12 Thread Sébastien Hinderer
Daniel Tameling (2022/08/12 20:53 +0200):
> On Fri, Aug 12, 2022 at 03:58:02PM +, Sam Kuper wrote:
> > -   Test/tweak/re-test msmtp until working.  (E.g. using Mutt or GNU
> > Mailutils's `mail` command to send emails from the command-line,
> > with relevant command-line options set so as to ensure that msmtp is
> > used as the MTA).  Hopefully it would work first time, if configured
> > correctly and if your computer has a suitable internet connection.
> 
> You can check whether msmtp is working with just the echo command. See the
> "Test functionality" section at https://wiki.archlinux.org/title/msmtp
> 
> The whole page is valuable if your starting with msmtp.

Many thanks for the link!

Sébastien.


Re: Using several SMTP servers

2022-08-12 Thread Sébastien Hinderer
Thanks a lot, Sam!

Everything you write makes sense.

Just one question and one remark, if you don't mind.

1. Am I correct that it will be possible, when calling smstp-queue, to
specify which smarthost to use?

In other words, am I correct that this will let me associate one smart
host (SMTP configuration) to each mail in the queue, rather than using
the smae smarthost for allthe mails in the queue?

2. I think one of the things for which exim is used is the local
delivery of e-mails. So for instance thee-mails from the cron user are
delivered to root, but then the e-mails from root are delivered to my
main local user account and I think it's exim which deals with this bit
and I probably won't touch that, unless I have to.

Also, there is a subtlety that I'll need to figure out, on Debian. there
are two packages: msmtp and msmtp-mta. the second one conflicts with
exim son both can not coexist on the same system (they both provide the
mail-transpor-agent package). At least that's my understanding.

Indeed if I try to install msmtp-mta it wants to remove 7 packages:
exim4 exim4-base exim4-config exim4-daemon-light libgsasl7 libmailutils6
libmu-dbm6. So I'll start with msmtp alone and see what happens,
perhaps.

Cheers,

Sébastien.


Re: Using several SMTP servers

2022-08-12 Thread Sébastien Hinderer
Hello Sam, many thanks for your interesting response!

Sam Kuper (2022/08/11 17:43 +):
> Consider using msmtp for sending, and msmtp-queue for queueing:
> 
>
>https://lists.mutt.org/pipermail/mutt-users/Week-of-Mon-20210208/002485.html

My understanding is that, on one side, mutt would call msmtp-queue as a
replacement for sendmail and that, on the other side, msmtp needs to
somehow be called on a regular basis to try to send the messages that
are in the queue, if network is available. Is this understanding
correct?

Also, given how important e-mail is, I am a bit worried about the
transition: any advice on how to switch from exim4 to this new set-up as
smoothly as possible and without risking to be unable to send e-mail for
some time?

I am considering trying on a different machine, or perhaps in a chroot
or docker container, although even with these two last options I am
scared because once in the past I deleted my whole home directory by
removing a chroot in which that home directory was bind-mounted. Since
then I have backups, but still...

Best wishes,

Sébastien.


Using mutt with ProtonMail

2022-08-11 Thread Sébastien Hinderer
Dear all,

Has anybody experience with using mutt to read/send e-mails through
ProtonMail, please?
Am I correct that, to make this work, one has to both pay and
install ProtonMail's bridge on ones computer so that it acts as an
IMAP/POP/SMTP gateway?

I am a bit reluctant, to pay but perhaps even more to install this
kind of tool on my machine. Is it safe? Do you recommend any safety
measure, perhaps doing that in a VM or docker container? It sounds
heavy...

Thanks,

Sébastien.


Using several SMTP servers

2022-08-11 Thread Sébastien Hinderer
Dear all,

Sorry if the question is off-topic, hopefully not completely though.

I am wondering what's the best way to use different SMTP servers to send
mails, depending on which e-mail account I am currently using (the From 
address).

I do realise that the two things (the SMTP server used to send an e-mail
on the one hand, and the e-mail address in the From header of that mail
on the other hand) are not necessarily related and that's actually
my current setting: I use the same SMTP server, with authentication,
no matter where I am and no matter which e-mail address there is
in the From header of the e-ml am sending.

My question is: can that be changed and, if yes, how.

So far I use exim4 to send e-mails but I didn't see a way to specify
which "smarthost" to use to send e-mails e.g. on the sendmail command
line. So, even if I could use mutt send hooks to choose which SMTP
configuration to use based on my From address, I don't know how to pass
this information to the MTA and I am assuming this should not even happen.

One other alternative may be to let mutt send e-mails to SMTP servers
itself, directly, without going through sendmail/exim4, but then I
am wondering what is going to happen if I try to send an e-mail while
my computer is off-line. Am I correct that mutt has no queue or
whatsoever that would allow it to defer sending e-mails until the
computer is back online, which is exactly what the MTA does?

I can't come up with a satisfactory solution and would really appreciate
feedback on this topic.

Many thanks in advance,

Sébastien.


Re: mutt, imaps and OAuth2

2022-08-05 Thread Sébastien Hinderer
Hello,

Will Yardley (2022/08/04 16:44 -0700):
> Yeah, if you can use an application password, and if your org has IMAP
> enabled, this is the easiest approach and the path of least
> resistence.

That indeed corresponds to my experience.

> There's also the external Python script used for oauth2, if it hasn't
> been mentioned elsewhere in the thread
> 
> https://gitlab.com/muttmua/mutt/-/blob/master/contrib/mutt_oauth2.py
> https://gitlab.com/muttmua/mutt/-/blob/master/contrib/mutt_oauth2.py.README
> 
> IIRC, it will / can work w/ Gmail

I was aware of it but it has not been mentionned. Thanks.

I came accross another similar project:

https://github.com/google/gmail-oauth2-tools

I think both projects work the same way and the difficulty I encountered
while trying to use both of them was the creation of the appropriate
"project". I was able to create one but then when I tried to use it I
was told that it was not following Google's rules but with no more
precision (was it the logo which was missing? Should I have given it a
scope? Permissions...?).

Also, what I didn't like so much about the approach provided by the
script in mutt's repository was that it kindo of made it mandatory to
use an encryption tool. Not that I think it's a bad idea, but it feels
to me that given the complexity the process already has, it would be
nice to be provided with a way to start _without_ encryption, at least
to remove some of the complexity at the beginning.

Best wishes,

Sébastien.


Re: mutt, imaps and OAuth2

2022-08-04 Thread Sébastien Hinderer
Dear Francesco,

Thank you, so much, for your response!!

Francesco Ariis (2022/08/04 12:27 +0200):
> Have you considered enabling 2fa and then adding an application-specific
> password?

I knew about app passwords but I stayed with the impression that they
gad been abandonned and that OAuth2 was the only way to go.

Apparently I was wrong and indeed, I enabled 2fa and could then create
an app password which I was able to use with mutt!

So, just to make sure I understand correctly: it is required that 2FA is
enabled so that app passwords work? Any insight on why this is so?
Because, to me, the two things look rather orthogonal.

One other thing I found disappointing is that the app password Google
generated for me was rather short, compared to what I would have come up
with. So I don't relaly see the point, except that okay, thi password
gies access only to my mails and not to the whole universe a Google
account is.

> I did that because I could not get OAuth2 to work

It really made my day. Many thanks for your assistance!

I think it'd be nice if this would be documented somewhere but I am not
sure where.

Best wishes,

Sébastien.


Re: mutt, imaps and OAuth2

2022-08-04 Thread Sébastien Hinderer
Hi Matthias,

Matthias Apitz (2022/08/04 12:14 +0200):
> Be prepared to run into troubles sending mails to GMail/GoogleMail.
> Google requires very special DNS configs to accept mails for their
> users. I gave up on this and do not send any mails to Google users
> anymore.

So far I didn't encounter any problem that I was aware of, as far
sending e-mails is concerned.

But thanks, still, since if something happens, at least I'll be
prepared.

Best wishes,

Sébastien.


Re: mutt, imaps and OAuth2

2022-08-04 Thread Sébastien Hinderer
Hello,

Sam Kuper (2022/08/04 10:07 +):
> On Thu, Aug 04, 2022 at 09:40:03AM +0200, Sébastien Hinderer wrote:
> > I am about to work for an organization whose e-mails are managed by
> > Google.
> 
> Commiserations.

Thanks. I was not very happy about that. :-)

> As a *temporary workaround*, maybe see if you can edit the
> GMail/GoogleMail settings so that a copy of each incoming email is
> forwarded to an email address you control that is hosted by a
> standards-compliant (and therefore Mutt-friendly) email hosting company.
> IIRC, the GMail settings interface has an option for this - or failing
> that, you can create a catch-all "filter" with a rule to forward the
> emails.
> 
> That will at least get your inbound mails into Mutt.

Thanks! It's good to have this solution in case others would not have
worked!

> (Perhaps, as an adjunct to that workaround, if you are lucky, you will
> manage to get outbound email working directly from Mutt via GMail, so
> that you can also *send* work emails from Mutt.)

Well for that I have an SMTP server with authnetication, which I expect
will accept to send my e-mails no matter their headers. At least, it has
been like this so far.

> Good luck!

thanks!

Best wishes,

Sébastien.


Re: mutt, imaps and OAuth2

2022-08-04 Thread Sébastien Hinderer
Francesco Ariis (2022/08/04 13:26 +0200):
> Il 04 agosto 2022 alle 12:51 Sébastien Hinderer ha scritto:
> > > > I tried to configure mutt to read those e-mails, in particular to make
> > > > the OAuth2 authentification method work for imaps.
> > > 
> > > Have you considered enabling 2fa and then adding an application-specific
> > > password?
> > 
> > Practically speaking, are you requested to confirm your authentication
> > through your phone each time you read your e-mails withmutt, or just
> > from time to time?
> 
> Just once!

that sounds really cool and worthexperimenting! I really hope the
organization permits it, if it has the ability not to do so by default.

When you created your app passowrd, did you have to associate special
domains or permissions with it? Or did it "just work"?

> But once you have 2fa turned on, you will not be able to turn
> it off when you log in — say — in the web based gmail client.

I won't do such things (I'm blind and such clients are not at all
ocnvenient for me). However, I hpe that won't limit the ability to read
such e-mails from the regular iPhone mail app, for instance?

> I specifically use this feature with getmail (rather with mutt itself
> directly), I suspect there are other mutters reading this conversation
> which can bring their experience to the table.

I see. In the past I used fetchmail and even procmail for sometime. But
then, for some reason I wouln't be able to give, I switched to reading
my e-mails directly from  within Mutt through imap(s).

Thanks again for your help, so valuable to have this way out of the
OAuth2 business!

Sébastien.


Re: mutt, imaps and OAuth2

2022-08-04 Thread Sébastien Hinderer
Hello Francesco!

Francesco Ariis (2022/08/04 12:27 +0200):
> Hello Sébastien,
> 
> Il 04 agosto 2022 alle 09:40 Sébastien Hinderer ha scritto:
> > I am about to work for an organization whose e-mails are managed by
> > Google.
> > 
> > I tried to configure mutt to read those e-mails, in particular to make
> > the OAuth2 authentification method work for imaps.
> 
> Have you considered enabling 2fa and then adding an application-specific
> password?

I didn't realise this possibility was there, actually, many thanks for
mentionning it!
> 
> I did that because I could not get OAuth2 to work

I think there are ways, but which do not look very straightforward to
me, sadly.

Practically speaking, are you requested to confirm your authentication
through your phone each time you read your e-mails withmutt, or just
from time to time?

If confirming authentication on the phone on each e-mail read is
required, then I fear it's quicly going to become a burden. If it's just
a matter of ocnfirming from time to time, then I think it's okay.

I will also need to check whether my company allows this, which  I am
not sure but will check still today.

Best wishes,

Sébastien.


mutt, imaps and OAuth2

2022-08-04 Thread Sébastien Hinderer
Dear all,

I am about to work for an organization whose e-mails are managed by
Google.

I tried to configure mutt to read those e-mails, in particular to make
the OAuth2 authentification method work for imaps.

So far the problem seems to be that the project I have created in my
organisation to describe mutt seems to not have enough permissions.
Indeed when I try to obtain an OAuth token with the client id and secret
id, I am said that the app does not respect Google's rules and I don't
know which rules are missing. Perhaps I need to add a scope, or
permissions, or a logo, I don't know.

Could anybody help, please?

Many thanks,

Sébastien.