Re: [exim] run a command

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Jakob Hirsch
Dátum:  
Címzett: exim users
Tárgy: Re: [exim] run a command
Cyborg, 19.07.2012 11:36:

> how can i make that visible ?


As always, just use

> this is not working, because it's an example :
>
> drop  message    = you have been blacklisted.
>         condition = ${run{/usr/bin/id >/tmp/id}{yes}{yes}}

>
> (id will try to id the term ">/tmp/id" instead of reroute the output to
> it.)


It's not working because the ">/tmp/id" is a shell idiom. You have to use
${run{/bin/bash -c "/usr/bin/id >/tmp/id"}{yes}{yes}}

But you don't need the redirection for what you want.

> How do i get the output of id ( not to find that userdata ) and log it
> to the mainlog ?


This is not working?

drop
condition = ${run{/usr/bin/id}{yes}{no}}
log_message = output of id: $value