Andrew C Aitchison via Exim-users wrote on 12.03.2023 13:38:

>> without ${expand:
>>
>> # exim -be
>> '${lookup{smtp.gmail.com<@>v.corvax.t...@gmail.com<@>oauth2}lsearch*{/usr/local/etc/exim/smtpauthdb}{$value}fail}'
>>
>> ${run{/bin/sh -c
>> /usr/local/bin/get_oauth2_access_token-v.corvax.t...@gmail.com.sh}{$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.t...@gmail.com.sh 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:vic...@corvax.kiev.ua
public GnuPG/PGP key: https://victor.corvax.kiev.ua/corvax.asc

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to