Re: [exim] Error while checking expression with exim -be

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Victor Ustugov
Dátum:  
Címzett: Jeremy Harris via Exim-users
Tárgy: Re: [exim] Error while checking expression with exim -be
Jeremy Harris via Exim-users wrote on 15.03.2023 01:21:
> On 14/03/2023 13:17, Victor Ustugov via Exim-users wrote:
>> Office365 OAutn2 access token response size is over 4K)
>
> You are seriously stretching the original intent of Exim's
> string-handling with this.


Don't underestimate exim. It already let me implement Oauth2 support for
gmail and office365 without ${run, curl, grep, cut, gawk, M365-IMAP,
python, msal, PyJWT and other external stuff.

Only exim, ${acl, ${lookup mysql{ (or whatever you prefer for caching),
${extract{, ${sg{, ${if match{, ${readsocket{ with patch for SNI support
(thanks a lot for it), ${extract json{ and ${extract jsons{.

The only thing I'm missing is a native check if a string is JSON.
Checking such a string against a regular expression is quite primitive.


Many other features are implemented such way:

integration with spamd;
integration with rspamd;
support for memcached;
getting information from whois servers;
getting information about ASN from https://api.iptoasn.com/;
and so on.

I once wanted to implement dspam support in the same way.


> [ Have you considered writing an Exim authenticator module? ]


No.

I'm a postmaster. I haven't really programmed for many years. My skills
are only enough to create patches and intricate things in the exim config.

It was not easy to figure out how to get a refresh token. Especially for
Office365. But this is a one-time manual task for each sender.
No module is needed to use the refresh token to get an access token and
use the access token for OAuth2. You just need a few dozen lines in the
config.


>> Entering this expression interactively
>> many times will be very inconvenient.
>
> a) you should be able to use stdin.  If you are
> having problems with it, they are probably from
> the shell (as in Bourne Shell, Ksh, Csh) expanding
> or dequoting things you didn't expect


I've already got everything I wanted from exim -be to implement OAuth2
support, thanks.


> b) recent version of the "-be" support let you
> define macros and set variables


I'll take that into account, thanks.


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