[exim] Access to $value from lookups

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Peter Velan
Datum:  
To: exim-users
Betreff: [exim] Access to $value from lookups
*Exim 4.50*

Hi all,

I want to dump a detailed reason along with 5xx,
like: "550 Blacklisted address <spam@???> - reason-xx"

content of /xyz/file.txt:
(^?)spam@spam\.tld$ : reason-xx

Now I use (works perfectly):

  deny
    message = Blacklisted address <$sender_address>
    condition =
    ${lookup \
        {$sender_address} \
      nwildlsearch{/xyz/file.txt} \
      {yes}{no} \
    }


How does I get access to $value?

What I tried so far:

a)
  deny
    message = Blacklisted address <$sender_address> - $value
    condition =
    ${lookup \
        {$sender_address} \
      nwildlsearch{/xyz/file.txt} \
      {yes}{no} \
    }


    ==> $value is empty


b)
  deny
    condition =
    ${lookup \
        {$sender_address} \
      nwildlsearch{/xyz/file.txt} \
      {yes}{no} \
    }
    message = Blacklisted address <$sender_address> - $value


    ==> $value is empty


c)
  deny
    message = Blacklisted address <$sender_address> - $value
    condition =
    ${lookup \
        {$sender_address} \
      nwildlsearch{/xyz/file.txt} \
      {$value}{no} \
    }


    ==> invalid "condition" value "reason-xx"


TIA for any tip,
Peter