nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] XOAUTH2 integration, and a few questions

2016-06-29 09:27:22
Ken wrote:

It occurs to me that this makes it hard to have a postproc that sends
to different mail servers based on the "From" address ... because this
mechanism is unique in that it requires "send" to generate the access
token, and you can't change things when postproc is called.

Well, you can (and I did in sendfrom.c) by relying on the fact that (most)
MH switches only use their last value if repeated.

Ah, I see.  THAT works because send(1) reads the profile for you and
passes down the "credentials" entry via the -credentials switch.
Hm.  Could something like that work for post?  It would require some
rejiggering (that I would be willing to do), but instead of passing down
the access token on the post command line, we could do:

-oauth-cred-file      <cred file>
-oauth-client-id      client_id
-oauth-client-secret  client_secret

... and so on.

There'd be 6 or 7 of them, so this is getting a bit ugly for switches, but OK.
But should we consider alternatives, such as pseudoheaders?

A postproc could get all of those entries via mhparam.  That seems like it
"fits" a bit better.  Thoughts?  Like I said, I'd be willing to do this
work since I'm the one asking for it.

Or let me know if you want me to do it.  The OAUTH code is quite clean so
this won't be hard.  And I need to integrate sendfrom into send, and it
will have to change a bit.

And it would be good to have Eric's thoughts.

David

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>