[exim] Re: Reduce & inlist

2024-03-01 Thread Jasen Betts via Exim-users
On 2024-02-28, Slavko via Exim-users  wrote:
> Hi all,
>
> i found in ML archives recipe how to remove duplicates from list,
> i tried it in that form in file used -be input:
>
> APPEND_ITEM = ${if def:value {$value,$item}{$item}}
> INLIST = inlist{$item}{<,$value}
>
> ${reduce{<, item1, item2, item1}\
>   {}\
>   {${if INLIST{$value}{APPEND_ITEM
>
> It works in 4.94, but doesn't work in 4.96 nor 4.97 (all stock debian
> packages). In the 4.96 & 97 it returns only "item1". From debug
> output and docs i understand, that when item is in list, the $value
> inside inlist contains matched item not that one from reduce, thus
> that matched item replaces result in reduces..
>
> I found some discussion about that in this thread
> https://lists.exim.org/lurker/message/20220922.124818.33ca8de7.es.html
> but i lost in it...
>
> Then i want to replace inlist by forany, but here is collision with $item
> values, thus i didn't try it. Finally i replaced inlist with match condition,
> which works, but i would to awoid regex if possible .
>
> Please, is here better way to remove duplicates than use regex
> in condition?

I see what you mean, "${if inlist" doesn't seem to work inside "${reduce"


I have in the past written complex loops using "${map" "${foreach" or "${filter"
and "${acl" but I'm not going to say that this is "better". 

Embedded Perl is possibly a better approach, but it's been a decade
since I used that for anything.

-- 
 Jasen.
 🇺🇦 Слава Україні

-- 
## subscription configuration (requires account):
##   https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
##   exim-users-unsubscr...@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


[exim] Re: Dynamic local_domains

2024-03-01 Thread Jasen Betts via Exim-users
On 2024-01-28, Jerry Stuckle via Exim-users  wrote:
> Hi, all,
>
> I saw a similar post on this server from last June but no solution as 
> far as i could tell.  The only difference is I'm using MySQL instead of 
> PGSql and Debian instead of Ubuntu (although both use similar 
> configurations).  Exim version is 4.96.
>
> In my local configuration file I have
>
> MAIN_LOCAL_DOMAINS=${lookup MySQL{SELECT GROUP_CONCAT(DISTINCT domain 
> SEPARATOR ' : ') FROM emailtable}
>
> (one line)

It's missing a }

-- 
 Jasen.
 🇺🇦 Слава Україні
 

-- 
## subscription configuration (requires account):
##   https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
##   exim-users-unsubscr...@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


[exim] Re: tracing SMTP conversations

2024-03-01 Thread Jasen Betts via Exim-users
On 2024-02-24, graeme vetterlein via Exim-users  
wrote:

> What I REALLY REALLY would like to do is watch the SMTP conversation 
> between my exim4 and its smarterhost
>
> (it's probably something I'm sending, so I want as much to see *my* side 
> of the conversation)
>
> I can see over many years people have been asking to do this and been 
> told to use wireshark.

really?

> ...which I eventually did. However , in the past this was fine but nowadays 
> it does a STARTTLS 
> and I can see no more.  Is there really no way I can see the SMTP 
> conversation? If I could just 
> see what I sent it before said "error"
> I feel I could save another block of long nights.

There is a way to tell exim (well the crypto library actually) to save
the decryption keys so that wireshark can see inside the encryption.


However my normal approach is different.

turn off immediate deliveries by setting 'queue_only=yes' in main
config

Then send a test email, and record its ID (you can find that in exim
main log)

then do 

exim -v -M Messag-eIdentifier-Here 

and exim will attempt delivery and emit a cleartext transcript of the SMTP 
session.


-- 
 Jasen.
 🇺🇦 Слава Україні

-- 
## subscription configuration (requires account):
##   https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
##   exim-users-unsubscr...@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


[exim] Re: Reduce & inlist

2024-03-01 Thread Slavko via Exim-users
Dňa 29. februára 2024 6:42:38 UTC používateľ Jasen Betts via Exim-users 
 napísal:
>On 2024-02-28, Slavko via Exim-users  wrote:

>I see what you mean, "${if inlist" doesn't seem to work inside "${reduce"

Not exactly, you can use inlist inside reduce just fain, you only cannot
use $value from reduce in positive case of inlist (as it has value from
inlist match, not from reduce).

>Embedded Perl is possibly a better approach, but it's been a decade
>since I used that for anything.

I am not very familiar with perl, but i will guess, that it is more heavy
than built in (simple) regex.

regards


-- 
Slavko
https://www.slavino.sk/

-- 
## subscription configuration (requires account):
##   https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
##   exim-users-unsubscr...@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


[exim] Re: Reduce & inlist

2024-03-01 Thread Ian Z via Exim-users
On Fri, Mar 01, 2024 at 11:39:57AM +, Slavko via Exim-users wrote:

> I am not very familiar with perl, but i will guess, that it is more
> heavy than built in (simple) regex.

There is definitely some overhead with the embedded perl approach,
but if you just mean the regexps themselves, they are almost 100%
compatible (the library exim uses for regexps is called PCRE with
good reason).

-- 
Ian

-- 
## subscription configuration (requires account):
##   https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
##   exim-users-unsubscr...@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


[exim] Re: Reduce & inlist

2024-03-01 Thread Slavko via Exim-users
Dňa 1. marca 2024 19:06:22 UTC používateľ Ian Z via Exim-users 
 napísal:

>There is definitely some overhead with the embedded perl approach,

Yes, i mean that overhead.

regards


-- 
Slavko
https://www.slavino.sk/

-- 
## subscription configuration (requires account):
##   https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
##   exim-users-unsubscr...@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/