[exim] Get the value of an external script in a condition

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Mueller
Date:  
À: exim-users
Sujet: [exim] Get the value of an external script in a condition
Dear all,

I try to put an acl in my exim config.
I want to get the registrar of the "$sender_address_domain" of incoming
mails. So i can block known spam-registrars (Panama).
This is my shell script:
#!/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}}

Any idea?

Greetings
Daniel