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

2018-02-22 Thread Phil Pennock via Exim-users
On 2018-02-20 at 13:54 +, Andrew C Aitchison via Exim-users wrote: > Interesting idea to use the whois database to detect spammers. > Since whois data has expiry info and doesn't change every day, > I wonder how easy it would be to cache the results. The jwhois client does this; it's a GNU

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

2018-02-20 Thread Mueller via Exim-users
This finaly did the job: acl_check_mail: deny condition= ${if match{${run{/etc/exim/panama $sender_address_domain}}}{NameCheap}{true}{false}} Now all Spamer from NameCheap are out. Greetings Daniel -Ursprüngliche Nachricht- Von: Andrew C Aitchison via Exim-users

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

2018-02-20 Thread Andrew C Aitchison via Exim-users
From the documentation that Jeremy quoted, I think that your script should use "exit 0" and "exit 1" (or other non-zero value). Your exim config snippet does not use $value in the match; you need to do that or do the match in your script and use exit 0 *only if there is a match*.

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

2018-02-20 Thread Jeremy Harris via Exim-users
On 20/02/18 13:00, Mueller via Exim-users wrote: > So when I run Exim in verbose. It turns out the expansion is working, but > nervertheless it points to false but it should be true?: > > > 13:54:04 9383 processing "defer" > 13:54:04 9383 expanding: run{/etc/exim/panama $sender_address_domain

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

2018-02-20 Thread Mueller via Exim-users
So when I run Exim in verbose. It turns out the expansion is working, but nervertheless it points to false but it should be true?: 13:54:04 9383 processing "defer" 13:54:04 9383 expanding: run{/etc/exim/panama $sender_address_domain 13:54:04 9383result: run{/etc/exim/panama timerunr.com

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

2018-02-20 Thread Jeremy Harris via Exim-users
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 >