[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [nmh-workers] success using the OAUTH2 with gmail.

From: Ralph Corderoy
Subject: Re: [nmh-workers] success using the OAUTH2 with gmail.
Date: Sun, 07 Jul 2019 15:29:37 +0100

Hi Ken,

> Let's say in a hypothetical future we support IMAP.  That means that
> nearly every command would take a whole pile of arguments like
> -initialtls, -host, -port, -sasl, and more.  Obviously changing your
> profile for every nmh command would be awful.  So there should be some
> way of handling that.  What I had thought maybe was tying profile
> entries to mailboxes, so if you did "scan my-imap-server:foo" it could
> possibly look in your profile and find:
>     my-imap-server: -host my.server.com -port imap -tls -sasl
>         -saslmech GSSAPI -user me

That seems very specific and introduces a new colon operator that
restricts what's available for other features later.

How about allowing an mh-profile(5) in a folder's directory with its
content having higher priority than the ancestor folders' .mh_profile
and the general ~/.mh_profile.  This could be used for more general
things, e.g. the template used for replies to emails in that folder, or
the preferred format for scanning it.

In the IMAP case, the folder exists locally, and its .mh_profile, but
the emails are remote, as are sub-folders.

> You get the idea.  But thinking about this more makes me think that we
> should extend this a bit so it's not tied to folders, but a generic
> connection profile defaults and we could provide ones that work with
> Gmail.  I don't have it all jelled in my head how this would look and
> you'd need to do something to ADD to an existing connection profile so
> you could supply your own username, for example.  But it seems like it
> should be doable.  But I guess my idea is that you should be able to
> do something like
>     inc -conn gmail -user address@hidden
> and the right stuff should happen.  Make sense?

If `foo: -bar xyzzy...' is in an .mh_profile then often, depending on
the value's complexity, it can be interpolated with «`mhparam foo`» in
the shell.  What if a similar capability existed on the value side of an
.mh_profile's `key: value'.  Except it could cope with the interpolated
value having quotes.

This would allow collections of options to be defined and then
referenced with a shorthand.  Either back quotes copied from sh(1), or
`-use foo' so it can work easily at the shell too.

Cheers, Ralph.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]