Re: [exim] Get the value of an external script in a conditio…

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Jeremy Harris
Datum:  
To: exim-users
Betreff: Re: [exim] Get the value of an external script in a condition
On 20/02/18 09:15, Mueller via Exim-users wrote:
> #!/bin/bash
> out=$(/usr/bin/whois $1|grep "Registrar:"| cut -d ':' -f2| awk '{print $1}')
> echo "$out"
>
> I tried it with the $run command, but it uis always set to false!
>
> defer condition= ${if match{run{/etc/exim/panama
> $sender_address_domain}{NameCheap}{true}{false}}


The docs say:

"If the command succeeds (gives a zero return code) <string1> is
expanded and replaces the entire item; during this expansion, the
standard output/error from the command is in the variable $value. If the
command fails, <string2>, if present, is expanded and used."
--
Jeremy