Re: [exim] help with syntax to disable AUTH on port 25

Top Page
Delete this message
Reply to this message
Author: Zakaria
Date:  
To: exim-users
Subject: Re: [exim] help with syntax to disable AUTH on port 25
Hi there,
This is how I did it yet not sure if its the best way therefore I
suggest to use below base if statement example, note you can then nest
inside with more and as many as you like if statements to achieve AND
clause and use else in fourth curly bracket to achieve OR clause like
the following.
{If eq{var1}{var2}{statement}{else}}
In short copy and replace above example with statement text to achieve
AND clause and replace with else text to achieve OR clause, surely with
adjusting var1 and var2 to match each relevant condition.
So what you want I guess should be something along the following
lines:-
{If !eq{$tls_cipher}{}{{If
eq{$received_port}{465}{465_AND_tls_cipher_not_empty_expansion_var}{{If
eq{$received_port}{587}{587_OR_expansion_var}{{If
eq{$received_ip_address}{127.0.0.1}{localhost_connection_expansion_var}
{not_localhost_465_587_connection_expansion_var}}}}}}}{tls_cipher_is_em
pty_expansion_var}}
Good luck.
Zakaria.
On 26 Feb 2022 23:40, v via Exim-users <exim-users@???> wrote:

     hi.
     I'm still having trouble with the if/then/and/or syntax.  could
     someone help me rewrite the following
     auth_advertise_hosts = ${if and { {!eq {$tls_cipher}{}} {eq
     {$received_port}{587}} } {*}{}}
     to say
     {!eq {$tls_cipher}{}}  AND  (  {eq {$received_port}{465}}  OR  {eq
     {$received_port}{587}}  OR  connection is from localhost )
     thanks.
     --
     ## 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/