Re: [exim] Execute shell command on condition

Page principale
Supprimer ce message
Répondre à ce message
Auteur: John W. Baxter
Date:  
À: exim-users
Sujet: Re: [exim] Execute shell command on condition
On 10/18/2004 3:42, "Fahd Korambayil" <fahd.korambayil@???> wrote:

> This is what I have so far and it works perfectly fine the way I want it to:
>
> drop message = No such user at domain.com
>       condition = ${lookup mysql{select username from usernames
> where username='$local_part'}{no}fail}

>
> However, I would like to do one additional thing; whenever the above
> condition returns true (that is the message is being rejected) I would
> like to execute the shell command "perl denyexim.pl
> $sender_host_address".


Take a look at the ${run ... } expansion. (Section 11.4 in the Exim 4.4
spec.)

Clearly, you would need to use a new-enough Exim version (whatever that is
for this expansion item).

--John