Re: [exim] expansion error in OAuth2 client authenticator

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Victor Ustugov
Fecha:  
A: Andrew C Aitchison via Exim-users
Temas nuevos: [exim] OAuth2 client authenticator
Asunto: Re: [exim] expansion error in OAuth2 client authenticator
Andrew C Aitchison via Exim-users wrote on 12.03.2023 13:38:

>> without ${expand:
>>
>> # exim -be
>> '${lookup{smtp.gmail.com<@>v.corvax.test@???<@>oauth2}lsearch*{/usr/local/etc/exim/smtpauthdb}{$value}fail}'
>>
>> ${run{/bin/sh -c
>> /usr/local/bin/get_oauth2_access_token-v.corvax.test@???}{$value}{$value}}
>>
>
> Can you tell me more about this get_oauth2_access_token script
> -  I do not see it in https://packages.debian.org/source/sid/exim4 ?
>
> Thanks,
>


This script is not a part of https://packages.debian.org/source/sid/exim4

I wrote about https://packages.debian.org/source/sid/exim4 because Exim
4.95 is still in the FreeBSD ports tree. I had to create the exim 4.96
port for FreeBSD myself. I added my patches and many patches from
https://packages.debian.org/source/sid/exim4 to it. I mean 75_*.patch

Script get_oauth2_access_token-v.corvax.test@??? is based on
https://github.com/pcw11211/exim4-oauth2/blob/main/get_bearer_tocken.sh

This is just a prototype. I'm going to cache responses to requests to
get an access_token, taking into account the expires_in value, in order
to reduce the number of HTTP requests.

Client id, client secret and refresh token will be stored in the
database, so there will be no need to create a script to get an access
token for each user.

Later, I'm going to make requests to get an access token using
${readsocket. In this case, I won't need to call ${run and curl.


--
Best wishes Victor Ustugov
mailto:victor@corvax.kiev.ua
public GnuPG/PGP key: https://victor.corvax.kiev.ua/corvax.asc